Question: Consider a situation in which 3 processes are accessing a shared queue. The operation Enq(x) adds the data x to the tail of the queue.

Consider a situation in which 3 processes are accessing a shared queue. The operation Enq(x) adds the data x to the tail of the queue. Assume that Enq() is written with mutual exclusion guaranteed, thus the queue data structure cannot be corrupted by concurrent Enq() operations. The relevant code segment for the processes is given below: Process A: Enq(X); Signal(s); Process B: Wait(s); Enq(Y); Process C: Enq(Z); Signal(s); Assume that the initial value of the semaphore S is 0 . List all possible final states of the queue. Use the editor to format your
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
