A if round-robin scheduling is used to execute the


Suppose we have a producer and a consumer. The producer produces items and inserts them into a queue owned by the consumer, while the consumer consumes items from its queue in FIFO order. Each item requires 1 time quantum to produce and 1 time quantum toconsume. The queue is initially empty and has a maximum size of 3. If the queue is full when a producer wants to run, the producer will spin wait until the queue is not full. If the queue is empty when the consumer wants to run, the consumer will spin wait until the queue is not empty. Consider the case when we run three producers P1, P2, and P3, and one consumer C1 and all of the processes are runnable starting at time zero.

a) If round-robin scheduling is used to execute the processes, how many items will each process have produced and consumed
at the end of 10 time quanta? Assume that the initial run queue order is P1, P2, P3, C1.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: A if round-robin scheduling is used to execute the
Reference No:- TGS0815508

Now Priced at $20 (50% Discount)

Recommended (96%)

Rated (4.8/5)