Various synchronization problems such as the bounded-buffer problem and the dining-philosophers problems are important mainly because they are examples of a large class of concurrency control problem. a) Present the problem: write pseudo-code of the producer (P) process and the pseudo-code of the consumer (C) process.
Various synchronization problems such as the bounded-buffer problem and the dining-philosophers problems are important mainly because they are examples of a large class of concurrency control problem.
a) Present the problem: write pseudo-code of the producer (P) process and the pseudo-code of the consumer (C) process.
b) Make a possible simulation of the entire system considering a NON preemptive execution of the P and C processes.
c) Make a possible simulation of the entire system considering the preemptive execution of the P and C processes.
d) Where is the problem? Explain.
e) Modify the previous pseudo-code to solve the bounded-buffer problem using semaphores.
f) Make a possible simulation of the entire system when using semaphores.
Step by step
Solved in 2 steps