Question: . : 2 1 2 2 2 : 2 1 3 2 : 4 1 1 2 2 3 1 4 2 : 0 1

.
:
2
12
22
:
21
32
:
4
11
22
31
42
:
01
23
32
54
Assignment -3: Queue
Each task arrives to CPU at every second and requests to be processed by CPU
with a pair of values (taskID, processingTime).(Note that taskID is a sequential
number starting from 1.) This request is inserted into a queue. Then, CPU deletes
a request from the queue and processes it for 1 second. If the task is not yet
completed, then it is re-inserted into the queue with (taskID, processingTime-1)
after inserting all other arriving tasks. For example, a list of tasks is given as
below:
. : 2 1 2 2 2 : 2 1 3 2 : 4 1 1 2 2 3 1 4 2 : 0 1

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 Programming Questions!