1,148 views
1 1 vote

Consider a system with a single CPU core and three processes A, B, C. Process A arrives at t = 0, and runs on the CPU for 10 time units before it finishes. Process B arrives at t = 6, and requires an initial CPU time of 3 units after which it blocks to perform  for 3 time units. After returning from  wait, it executes for a further 5 units before terminating. Process C arrives at t = 8, and runs for 2 units for time on the CPU before terminating. For shortest remaining time first (preemptive) scheduling policy, calculate the time of completion of each of the three processes. Recall that only the size of the current CPU burst (excluding the time spent for waiting on ) is considered as the “job size” in these schedulers.

A. A = 10, B = 21, C = 15

B. A = 10, B = 23, C = 12

C. A = 15, B = 20, C = 11

D. A = 15, B = 21, C = 12

 

It is mentioned in the question

only the size of the current CPU burst (excluding the time spent for waiting on ) is considered as the “job size” in these schedulers.

Suppose it was not given then we should consider the whole CPU time (before and after the I/O) when choosing the process with the shortest remaining time. Right ?

If the method given in the question is followed then C would be the answer otherwise if the default method is followed then B would be the answer. Am I right ?

 

THE ANSWER KEY for this question is C.

2 Answers

Position:
Show:

Related questions

0 0 votes
0 0 answers
1.3k
1.3k views
sripo asked Jan 1, 2019
1,331 views
For the given question instead of the given order if we take one unit of P2 as its arrival time is 1 and then schedule P1 next we get the same answer,even in the hint th...
0 0 votes
1 1 answer
792
792 views