A higher-priority process becomes ready while another process is still using…

2012

A higher-priority process becomes ready while another process is still using its CPU time slice. Under pre-emptive scheduling, the scheduler may temporarily suspend the running process:

Answer: A. before the CPU time slice expiresConceptIn pre-emptive scheduling, the operating system may interrupt a running process without waiting for it to finish or block. Expiration of a time quantum…

  1. A.

    before the CPU time slice expires

  2. B.

    to allow starving processes to run

  3. C.

    when it requests I/O

  4. D.

    to avoid collision

Attempted by 76 students.

Show answer & explanation

Correct answer: A

Concept

In pre-emptive scheduling, the operating system may interrupt a running process without waiting for it to finish or block. Expiration of a time quantum can itself trigger pre-emption, while the arrival of a higher-priority ready process can trigger pre-emption before the current quantum expires. The operating system saves the interrupted process context so that the process can resume later.

Application

  1. One process is in the running state and its allotted CPU time slice is still in progress.

  2. A higher-priority process enters the ready state before the running process reaches the end of that slice.

  3. The scheduler pre-empts the running process, saves its context, and returns it to the ready queue.

  4. The dispatcher gives the CPU to the higher-priority ready process.

Cross-check and contrast

  • An I/O request makes a process block voluntarily and enter a waiting state; that event is not the defining act of pre-emption.

  • Allowing a starving process to run is a fairness objective, usually addressed by aging or priority adjustment; it is not the definition of pre-emption.

  • Collision avoidance concerns coordinated access to a shared resource or communication medium, not the scheduler interrupting a running process.

In this stated scenario, the running process is suspended before the CPU time slice expires.

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

Loading lesson…