edited by
30,632 views
60 votes
60 votes

Consider three processes, all arriving at time zero, with total execution time of $10$, $20$ and $30$ units, respectively. Each process spends the first $\text{20%}$ of execution time doing I/O, the next $\text{70%}$ of time doing computation, and the last $\text{10%}$ of time doing I/O again. The operating system uses a shortest remaining compute time first scheduling algorithm and schedules a new process either when the running process gets blocked on I/O or when the running process finishes its compute burst. Assume that all I/O operations can be overlapped as much as possible. For what percentage of time does the CPU remain idle?

  1. $\text{0%}$
  2. $\text{10.6%}$
  3. $\text{30.0%}$
  4. $\text{89.4%}$
edited by

7 Answers

2 votes
2 votes
  $i/o$ $cpu$ $i/o$
1 2 7 1
2 4 14 2
3 6 21 3

 

Assume that all I/O operations can be overlapped as much as possible.

 

$\underbrace{0-2}$ $\underbrace{2-9}$ $\underbrace{9-23}$ $\underbrace{23-44}$ $\underbrace{44-47}$
$idle$ $p1$ $p2$ $p3$ $idle$

$\dfrac{5}{47}\times 100=10.6\%$

2 votes
2 votes

Please see my diagram for crisp and clear understanding

Although it took me 10 minutes to draw

But strategy here is to make sure that IO does not overlap

Process Burst time is taken as such that IO never overlaps

 

Answer:

Related questions