2,384 views
2 votes
2 votes
A uniprocessor computer system has three processes, which alternate 20ms CPU bursts with 80ms I/O bursts. All the processes were created at nearly the same time. The I/O of all the processes can proceed in parallel. The absolute difference of CPU utilization (over a long period of time) using FCFS and Round Robin (time quantum 10ms) for this system is _____ %

1 Answer

Best answer
3 votes
3 votes
For FCFS

each processes will get 20ms CPU time first, hence total CPU time for all 3 processes = 60ms. Now first process will complete I/O within 100ms. After 100 ms the rest of the processes will start their CPU cycles again one after the other.

Hence in a period of 100ms total CPU time = 60ms

CPU utlization = 60%

 

For Round robin

the I/O burst of the first process starts after (10 + 10 + 10 + 10)ms = 40ms after it the other two processes will complete their CPU bursts in the next 20ms hence total CPU time = 60 ms.

The I/O burst of the first process will complete by 120 ms after which the processes will start their CPU cycles in round robin pattern again.

Hence in a period of 120ms , 60 ms of CPU time used.

hence CPU utilization = 50%

Difference = (FCFS pattern) – (Round robin pattern) = 10%
selected by

Related questions

2 votes
2 votes
1 answer
2