Question
. List the most common shared resources in (a) multi-process programs; (b) multithreaded programs. 5. Why do multithreaded programs generally require more synchronization than multiprocess
. List the most common shared resources in (a) multi-process programs; (b) multithreaded programs.
5. Why do multithreaded programs generally require more synchronization than multiprocess programs? (Hint: think about how multithreaded and multi-process programs differ, and why synchronization is needed.)
6. Explain why a mutex is equivalent to a binary semaphore.
7. Explain why texts use of wait() and signal() functions for semaphores/mutexes is consistent with Dijkstras decrement() and increment() functions.
8. Consider the producer-consumer problem with an unbounded buffer (producer can add any number of objects to queue). How would the solution to the bounded buffer problem need to be modified for this variation. I.e., the bounded version uses three synchronization mechanisms (what are they?), what mechanisms are required for the unbounded version?
9. What (if anything) is required to extend the standard solution to the bounded buffer problem to the case of multiple producers and multiple consumers?
10. Explain the key differences between the bounded buffer problem and: (a) the readerswriters problem; (b) the dining philosophers problem.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started