1
votes

Five processes begins with their execution at (0, 0, 2, 3, 3) seconds and execute for (2, 2, 1, 2, 2) seconds. How do I calculate average turnaround time if:

a) We use Round Robin (quantum 1 sec.)

b) We use FIFO scheduling?

I am not sure how to solve this, could you guys help me out?

Here is the link of .png table;

table link

1
Welcome on StackOverflow. Nevertheless, I really think you should try to do your homework by your own...Christophe
Hi Cristophe, thanks for your welcome. I can try, but I don't think my solution is correct. That's why I asked the question. Here is my try: link to imagephantom
Can someone confirm if that is correct answer?phantom
It is abut scheduling: how many processors do you have ? Two as your answer suggest ? But then, why is there an empty column for the round robin (would the scheduler really prefer doing nothing, and if it's not the case, what would be the difference with FIFO then) ? Or is there one processor, meaning that both answers are false.Christophe

1 Answers

3
votes

I suppose that your exercise is about scheduling tasks on a single processor. My understanding is hence the following:

  • With FIFO, each task is scheduled in order of arrival and is executed until it's completed
  • With RR, earch tasks scheduled is executed for a quantum of time only, sharing the processor between all active processes.

In this case you obtain such a scheduling table:

enter image description here

The turnaround is the time between the time the job is submitted, and the time it is ended. In first case, I find 19 in total thus 3,8 in average. In the second case, I find 25 in total and 5 in average.

In your first try, you have processes running in parralel. This would assume 2 processors. But if 2 processors are available, the round robin and the fifo would have the same result, as there are always enough processors for serving the active proceeses (thus no waiting time). The total turnaround would be 9 and the average 1,8.