edited by
12,059 views
49 votes
49 votes

Three processes $A$, $B$ and $C$ each execute a loop of $100$ iterations. In each iteration of the loop, a process performs a single computation that requires $t_c$ CPU milliseconds and then initiates a single I/O operation that lasts for $t_{io}$ milliseconds. It is assumed that the computer where the processes execute has sufficient number of I/O devices and the OS of the computer assigns different I/O devices to each process. Also, the scheduling overhead of the OS is negligible. The processes have the following characteristics: 

$$\begin{array}{|c|c|c|} \hline \textbf{Process id} & \textbf{$t_c$} & \textbf{$t_{io}$} \\\hline \textbf{A} & \text{100 ms} & \text{500 ms} \\\hline \textbf{B} & \text{350 ms} & \text{500 ms}\\\hline \textbf{C} & \text{200 ms} & \text{500 ms} \\\hline   \end{array}$$

The processes $A$, $B$, and $C$ are started at times $0$, $5$ and $10$ milliseconds respectively, in a pure time sharing system (round robin scheduling) that uses a time slice of $50$ milliseconds. The time in milliseconds at which process C would complete its first I/O operation is ___________. 

edited by

4 Answers

Best answer
59 votes
59 votes
Gantt chart : $ABCABCBCBC$
$C$ completes it CPU burst at$= 500$ milli second.
IO time $= 500$ milli second
$C$ completes $1$st IO burst at $t = 500 + 500 = 1000$ms
edited by
1 votes
1 votes
There are three processes A, B and C that run in 
round robin manner with time slice of 50 ms.

Processes start at 0, 5 and 10 miliseconds.

The processes are executed in below order
A, B, C, A 
50 + 50 + 50 + 50 (200 ms passed)

Now A has completed 100 ms of computations and 
goes for I/O now

B, C, B, C, B, C
50 + 50 + 50 + 50 + 50 + 50 (300 ms passed)

C goes for i/o at 500ms and it needs 500ms to
finish the IO.

So C would complete its first IO at 1000 ms
1 votes
1 votes

It was easy

I have solved IO finish times for all the processes

So C finish at 1000

 

 

Answer:

Related questions

27 votes
27 votes
2 answers
4