On a system using non-preemptive scheduling, processes with expected run times…

20072007

On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?

  1. A.

    5, 12, 9, 18

  2. B.

    5, 9, 12, 18

  3. C.

    12, 18, 9, 5

  4. D.

    9, 12, 18, 5

Attempted by 252 students.

Show answer & explanation

Correct answer: B

To minimize average waiting time in a non-preemptive scheduling environment, the Shortest Job First (SJF) algorithm is optimal. This strategy executes processes in ascending order of their expected run times. Sorting the given run times (5, 18, 9, and 12) results in the sequence: 5, 9, 12, 18.

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

Explore the full course: Isro