Question: . . Assignment - 3 : Queue Each task arrives to CPU at every second and requests to be processed by CPU with a pair
Assignment : Queue
Each task arrives to CPU at every second and requests to be processed by CPU with a pair of values taskID processingTimeNote that taskID is a sequential number starting from This request is inserted into a queue. Then, CPU deletes a request from the queue and processes it for second. If the task is not yet completed, then it is reinserted into the queue with taskID processingTime after inserting all other arriving tasks. For example, a list of tasks is given as below:
The processing at every second is
th second arrives
Add to queue,
Delete a task from queue and
Process it for second: becomes
st second arrives
Add to queue,
Add to queue,
Delete a task from queue and
Process it for second: is completed
nd second arrives
Add to queue
Delete a task from queue
Process it for second: becomes
rd second no further task arrives:
Add
Delete a task from queue
Process it for second: becomes
th second no further task arrives:
Add
Delete a task from queue
Process it for second: is completed
th second no further task arrives:
Delete a task from queue
Process it for second: becomes
th second no further task arrives:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
