An OS follows round-robin scheduling with time quantum of 4 ms. Assuming that…

2022

An OS follows round-robin scheduling with time quantum of 4 ms. Assuming that the CPU is free now and there are 20 processes waiting in the ready queue, the maximum amount of time that a process waits before getting into the CPU is

Answer: B. 76 msAnswer: 76 ms Reasoning: Interpretation: The ready queue has 20 processes including the process we're considering (the common interpretation). Worst-case…

  1. A.

    80 ms

  2. B.

    76 ms

  3. C.

    84 ms

  4. D.

    None of the above

Attempted by 480 students.

Show answer & explanation

Correct answer: B

Answer: 76 ms

Reasoning:

  1. Interpretation: The ready queue has 20 processes including the process we're considering (the common interpretation).

  2. Worst-case position: the process is at the end of the queue, so there are 19 processes ahead of it.

  3. Each process ahead can use up to the full time quantum of 4 ms before the CPU reaches our process once: wait time = 19 × 4 ms = 76 ms.

  4. Alternate interpretation: if the 20 processes were all ahead of the considered process (i.e., 20 other processes), the wait would be 20 × 4 ms = 80 ms. The question’s expected answer uses the inclusive interpretation leading to 76 ms.

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

Explore the full course: Mppsc Assistant Professor Computer Science Paper 2

Loading lesson…