635 views

1 Answer

Best answer
6 votes
6 votes
We make the Gantt Chart and find the following execution sequence :
 

idle(0 - 1) --> P0(1 - 3) --> P2(3 - 4) -->  P1(4 - 6) --> idle(6 - 8) --> P3(8 - 10) --> P4(10 - 12) --> P3(12 - 14)

We can see in the above execution sequence , P3 is preeempted and then P4 is allowed to execute since at that remaining burst time of both processes = 2.But in the question , it is mentioned the priority will be given to the process arriving later which is P4 in this case.Hence preemption of P3 is done.

So the completion time of the above execution sequence = 14

Arrival time of 1st process  = 1

So we know throughput  = No of processes / (Max of completion time - Min of arrival time)

                                   =  5 / (14 - 1)

                                   =  5 / 13

                                   = 38.46 %

Hence throughput is 38.46 %
selected by

Related questions