The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
24 views

asked in Operating System by (301 points) | 24 views

2 Answers

+2 votes
I will tell you steps for calculating avg TAT in Round Robin Algo:

1] Unlike other algo, we need to maintain a Queue here. Append each and every process to queue, once it executed (for any amount of time, ofcourse < TQ).

2] Allow a process to run for a TQ, then preempt the process (consider P1). Pull next available process into CPU again (consider P2). At the same time, inside queue, delete P1 from queue and add/append P2 to the end of queue and allow it to run again for TQ. But before, appending P2 to end of queue, make sure all process arriving at that time also get added to queue, BEFORE P2.

*available process : decide available processes by inspecting their Arrival time. If multiple processes are available, then go with the one which arrived earlier.

3] With this, prepare a Gantt chart and list Completion time.

                                                      $Turn Around Time = Completion Time - Arrival Time$

Dividing above result with number of processes will give Avg TAT.
answered by (341 points)
0
you may refer to @vikas999's answer for illustration of above steps.
+1 vote

I think the answer is 8.8 units

answered by (241 points)
0
in 5-8 time slot why you are not consider process p2 ????
0
Because p0 will come into the ready queue before p2.
0
got it.it's my mistake.


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,584 questions
46,707 answers
140,137 comments
57,866 users