305 views

2 Answers

2 votes
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.
1 votes
1 votes

I think the answer is 8.8 units

No related questions found