955 views
1 votes
1 votes
Pno Arrival Time 1st IO Burst time 2nd IO
P1 0 4 14 2
P2 0 8 28 4
P3 0 12 42 6

Using SRTF:-

Completion time :- P1 -  18, P2 - 46, P3 - 88

Turnaround Time:- According to the definition of Galvin it is 

Turnaround time is the sum of the periods spent waiting to get into the memory, waiting in the ready queue, executing on the CPU, and Doing I/O. Page no = 187, 8th Edition

P1 - 20, P2 - 50, P3 - 94.

Waiting time :- According to the definition of Galvin it is

Waiting time is the sum of periods spent waiting in the ready queue. Page no = 187, 8th Edition

WT = TAT - Burst time - IO time

P1 = 20 - 14 - 4 - 2 = 0.

P2 = 50 - 28 - 8 - 4 = 10

P3 = 94 - 42 - 12 - 6 = 34.

Someone Verify these calculations.

2 Answers

0 votes
0 votes
i think completion time of a process is defined as completion of all the service time of the process.then it includes before i/o,burst time,after i/o..so p1 may complete at 20ms and p2 may complete at 50ms and p3 may complete at 94 ms....so the tat for all process is equal to its completion time...wait time for p1 is (20-4-14-2)=0 ms,for p2 is (50-8-28-4)=10 ms,for p3 is (94-12-42-6)=34 ms
0 votes
0 votes
CPU IDLE P1 P2 P3 CPU IDLE                    

0..................................4..............18.............46...............88......................94

i/o for P0 ,P1,P2 FOR 4 UNIT OF TIME 

Related questions

0 votes
0 votes
3 answers
1
Chaitanya Kale asked Sep 22, 2022
657 views
If we are using non-preemptive CPU scheduling then can there be process state transition from running to ready state?
1 votes
1 votes
1 answer
2
iarnav asked Jan 12, 2022
401 views
Does non preemptive CPU scheduling needs hardware support.kindly explain.
1 votes
1 votes
1 answer
4
Ram Ahuja asked Feb 13, 2019
2,765 views
In which of the following case CPU utilization will be higher?(a) If all the processes are I/O bound(b) Is all the processes are equally CPU bound and I/O bound(c) If all...