in Operating System edited by
1,035 views
0 votes
0 votes

in Operating System edited by
1.0k views

4 Comments

yes you are right how do you get it dear??please explain me
0
0
moved by
19 answer
0
0
@magma will you please share the solution.
0
0

2 Answers

3 votes
3 votes

Ans is 19.67 

I hope it's understandable..but if any doubts than ask me

by

3 Comments

Program 2 arrived at 3 then why didn't it preempted program 1 at that instant only?
0
0
Because priority ( program 2) > priority (program 1)
0
0

@Magma that is what Shivam Kasat is saying if priority ( program 2) > priority (program 1) then program1 should be preempted ?

0
0
0 votes
0 votes
program 1 Program 2 Program 3 
a =2m a =2m a =2m
b=3m b=3m b=3m
c =4m c =4m c =4m
     

Gantt Chart For Program(Completion time )

P1a P1b P1c P2a P2b P2c P2a P2b P2c P2b P3a P3b P3c P3a P3b P3c P3c P2 P1a P2b P2c P2c P P P

0----1-----2----3------4-----5-----6-----7-----8-----9----10----11----12---13----14---15---16--18--21---22---23---24-----27

Program Arrival time  Completion time  Turn Around time  Priority time
1 0 27 27 1 (low )
2 3 25 22 5
3 10 19 9 10(high)
         

 

TAT= (22+9+27)/3=19.33

plz check and correct me if i wrong .. 

edited by

4 Comments

why did you used round robin? In the question it is given that priority preemptive scheduling is used.
0
0

in preemptive scheduling, we used to run the process for only one unit of time, than we preempt the process ..

0
0
Could you please provide any refernere for your statement!
0
0
read the preemptive algorithms.. in the no preemptive we run the process upto burst time and in round-robin we run up to slice time /quantum time
0
0

Related questions