Consider the following set of processes assumed to have arrived at time 0 in…

2026

Consider the following set of processes assumed to have arrived at time 0 in order P1, P2, P3, P4, and P5 with the length of CPU burst given in Milliseconds.

Process

Burst Time

Priority

P1

10

3

P2

1

1

P3

2

4

P4

1

5

P5

5

2

What is the average waiting time (in milliseconds) using priority scheduling?

  1. 8

  2. 8.2

  3. 8.3

  4. 8.4

  1. A.

    1

  2. B.

    2

  3. C.

    3

  4. D.

    4

Attempted by 92 students.

Show answer & explanation

Correct answer: B

Step 1: Identify Priority Order Processes are sorted by priority (lower number = higher priority). Order: P2 (1), P5 (2), P1 (3), P3 (4), P4 (5).

Step 2: Determine Execution Sequence Since all arrive at time 0, execution follows priority order: P2 → P5 → P1 → P3 → P4.

Step 3: Calculate Waiting Times Waiting Time = Turnaround Time - Burst Time. P2: 0 ms P5: 1 ms P1: 6 ms P3: 16 ms P4: 18 ms

Step 4: Compute Average Waiting Time Sum = 0 + 1 + 6 + 16 + 18 = 41 ms. Average = 41 / 5 = 8.2 ms.

Explore the full course: Mppsc Assistant Professor