Question

For the following jobs:

job table

The average wait time would be using a FCFS algorithm:

(6-6)+(7-2)+(11-5)+(17-5)+(14-1) -> 0+5+6+10+13 -> 34/5 = 7 (6.8)

What would the average turnaround time be?

Was it helpful?

Solution

You need to determine at what time each job is completed. With a first-come-first-served scheduler, this is simple to calculate: each job starts as soon as the processor becomes free, and takes exactly its burst time to complete. You've already calculated the start and end times to calculate the wait times, so use that to obtain the turnaround time.

For example, A arrives at time 0. The processor is free, so it starts at time 0 and ends at time 6. Then the processor runs B, which had to wait for 5 units, and finishes at time 8, for a turnaround time of 7.

The answer from the book seems to be totaling the completion times, without regard for the arrival time. This is not something I recognize as “turnaround time”.

OTHER TIPS

the turnaround time is TAT= Completion time-arrival time for A=6-0 B=8-1 C=13-2 D=20-3 E=21-7 that gives 6+7+11+17+14/5=11

so average TAT=11

As already said the Tournaround time (TAT) is the time between submission and completion. If we look at the tasks:

A arrives at time 0 (submission time) and takes 6 timeunits to finish. that means the TAT of A is 6.

lets look at task B it arrives at time 1. but it has to wait for A to finish. A finishes at 6 and then B starts working and finishes at 8. Now we subtract the arrival time minus finishing time 8-1=7 which is the TAT.

Now C--> arrival time 2; working time (burst) 5 ;finishing time:13 --> Tat 13-2=11

Now D--> arrival time 3; working time (burst) 7 ;finishing time:20 --> Tat 20-3=17

Now E--> arrival time 7; working time (burst) 1 ;finishing time:21 --> Tat 21-7=14

now the result-->(6+7+11+17+14)/5=11

!tada!

EXECUTION TIME-ARRIVAL TIME=TURN AROUND TIME AND THEN THE EXECUTION ADDS TO THE NEXT EXECUTION TO THE ALREADY EXISTING TIME TO SUBTRACT THE ARRIVAL TIME . THEN ADD ALL THE TURNAROUND TIME AND THE DIVIDE THERE SUM TOTAL BY THERE TOTAL NUMBER

Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange
scroll top