Suppose that the following processes arrive for execution at the times…

2026

Suppose that the following processes arrive for execution at the times indicated. Each process will run for the amount of time listed in the given table. Use non-preemptive scheduling and answer the following:

(a) What is the average turnaround time for these processes with the FCFS scheduling algorithm?

(b) What is the average turnaround time for these processes with the SJF scheduling algorithm?

Process

Arrival Time

Burst Time

P1

0.0

8

P2

0.4

4

P3

1.0

1

Attempted by 13 students.

Show answer & explanation

(a) FCFS Scheduling

Execution Order:
P1 → P2 → P3

Completion Times:

  • P1: 0 to 8

  • P2: 8 to 12

  • P3: 12 to 13

Turnaround Time = Completion Time − Arrival Time

Process

Completion Time

Arrival Time

Turnaround Time

P1

8

0.0

8

P2

12

0.4

11.6

P3

13

1.0

12

Average Turnaround Time:

(8 + 11.6 + 12) / 3
= 31.6 / 3
= 10.53

FCFS Average Turnaround Time = 10.53

(b) Non-Preemptive SJF Scheduling

At time 0, only P1 is available, so it executes first.

After P1 completes, both P2 and P3 are ready. Since P3 has the shortest burst time, it executes before P2.

Execution Order:
P1 → P3 → P2

Completion Times:

  • P1: 0 to 8

  • P3: 8 to 9

  • P2: 9 to 13

Process

Completion Time

Arrival Time

Turnaround Time

P1

8

0.0

8

P2

13

0.4

12.6

P3

9

1.0

8

Average Turnaround Time:

(8 + 12.6 + 8) / 3
= 28.6 / 3
= 9.53

SJF Average Turnaround Time = 9.53

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Up Lt Grade Assistant Teacher 2025