in Operating System retagged by
653 views
1 vote
1 vote
P1 and p2 are two processes. Both will run according to SRTF. If p1 wants to do I/O operation then which of the following is correct?

a)p1 goes for I/O come back and again start executing
b)p1 goes for I/O p2 start executing after p1's IO is complete, it goes to the end of the ready queue to get executed
c)p1 leaves p2 enters the execution cycle and continues until its completion
d)p1 goes for I/O meanwhile p2 starts when p1 completes its I/O p1 again comes back and start executing
in Operating System retagged by
653 views

1 comment

Answer will be B.

In SRTF, processes are selected based on smaller burst time and which are available in ready queue.

Let's say P1 goes for I/O, it is removed from running state, now processes are selected from ready state, P2 is available. Once P1 completes I/O, it is again added back to ready queue. On next iteration if P1 remaining BURST time is smaller then it is executed else not.
5
5

Please log in or register to answer this question.

Related questions