3 votes 3 votes Operating System operating-system process-scheduling + – Rohan Sharma 3 asked Nov 12, 2017 Rohan Sharma 3 428 views answer comment Share Follow See 1 comment See all 1 1 comment reply BASANT KUMAR commented Dec 21, 2018 reply Follow Share the completition time of p1=40 and p2=21(SRTF).the solution given below is wrong in time slot between 16-21 p2 will be in running state bcoz it become smallest as compare to p1. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Completion time of P1 & P2 in SRTF : 27 & 24 resp. Completion time of P1 & P2 in RR : 32 & 21 resp. srivivek95 answered Nov 13, 2017 srivivek95 comment Share Follow See all 2 Comments See all 2 2 Comments reply Hira Thakur commented Nov 13, 2017 reply Follow Share plz explain RR approach?? 0 votes 0 votes srivivek95 commented Nov 13, 2017 i edited by srivivek95 Nov 13, 2017 reply Follow Share P1 will execute for 0-3 seconds then it will go for I/O for next 5 seconds. P2 comes for execution & finishes its quantum by 7, but P1 is not yet done with the I/O & P2 comes in the ready queue. As, P2 is the only process in the ready queue it will again be scheduled for next 4 seconds. Then P2 finishes & P1 is in the ready queue after finishing the I/O & P1 will be scheduled for next 3 seconds.After P1 finishes with its quantum, P2 will get CPU time twice as it is the only process in the ready queue. Now, P2 is over & P1 is scheduled for next 3 seconds & then it will go for I/O for the next 5 seconds & then again scheduled for the last 3 seconds. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes In SRTF p1 = 37 p2 = 21 In RR p1 = 37 p2 = 21 Mohnish answered Jul 18, 2020 Mohnish comment Share Follow See all 0 reply Please log in or register to add a comment.