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

asked in Operating System by (457 points) | 30 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 Active (1.7k points)
you may refer to @vikas999's answer for illustration of above steps.
+1 vote

I think the answer is 8.8 units

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

No related questions found

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
50,109 questions
53,222 answers
70,463 users