in Operating System edited by
12,167 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 ___________. 

in Operating System edited by
12.2k views

2 Comments

 each execute a loop of 100 iterations. 

WHT DOES ITS MEAN?

2
2
Means each ABC do 100 iterations.Each iteration it does tc and tio
0
0

4 Answers

59 votes
59 votes
Best answer
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

4 Comments

LOL, hard to complete the Paper , if we solve this Fully. Definitely its EASY , but too Time Consuming.
0
0

@Sachin Mittal 1 sir why this statement (100 iterations) –

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 tc CPU milliseconds and then initiates a single I/O operation that lasts for tio milliseconds.”

has not taken into consideration.Please explain what does it mean.

1
1

@Shreyas16 they have only asked at what time the first I/O operation of C completes. Hence, we don’t require the “loop of 100 iterations” statement here.

0
0
9 votes
9 votes

please check someone

1 comment

correct
0
0
1 vote
1 vote
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 vote
1 vote

It was easy

I have solved IO finish times for all the processes

So C finish at 1000

 

 

4 Comments

No bro, consider again, Queue doesnt work like this, as all the processes didnt arrive at time 0.
0
0
you should consider again
0
0
IO finish times of process A,B,C are 700ms, 1150ms ,1000ms respectively.
1
1
Answer:

Related questions