Question: A producer and a consumer share a single CPU. The producer periodically passes data items to the consumer using a circular buffer of 6 slots.

A producer and a consumer share a single CPU. The producer periodically passes data items to the consumer
using a circular buffer of 6 slots.
The time to fill one buffer slot = time to empty one buffer slot =1 time unit.
The producer generates a burst of 6 items every 36 time units.
The consumer copies 2 items every 12 time units.
Assuming that at time 0, all buffer slots are empty, determine how many slots are full after each of the first 6 time
units.
t=1:,t=4:
t=2:,t=5:
t=3:,t=6:
Determine at what time all slots are empty again for the first time.
 A producer and a consumer share a single CPU. The producer

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!