Consumer problem

1.Consider Figure 5.13.Would the meaning of the program change if the following were

interchanged?

a. semWait(e); semWait(s)

b. semSignal(s); semSignal(n)

c. semWait(n); semWait(s)

d. semSignal(s); semSignal(e)

2. In the discussion of the producer/consumer problem with finite buffer (Figure 5.12),

note that our definition allows at most – 1 entries in the buffer.

a. Why is this?

b. Modify the algorithm to remedy this deficiency. 3. Show that message passing and semaphores have equivalent functionality by

a. Implementing message-passing using semaphores. Hint: Make use of a shared

buffer area to hold mailboxes, each one consisting of an array of message slots.

b. Implementing a semaphore using message passing. Hint: Introduce a separate

synchronization process.

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X