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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!