87.3k views
3 votes
In the following cases non - preemptive scheduling occurs : (Choose two)

a) When a process switches from the running state to the ready state
b) When a process goes from the running state to the waiting state
c) When a process switches from the waiting state to the ready state
d) When a process terminates

1 Answer

6 votes

Final answer:

Non-preemptive scheduling occurs when a process transitions from the running state to the waiting state or when a process terminates. It allows a process to continue without interruption until it either needs to wait or completes its execution. The correct options are a and b.

Step-by-step explanation:

In non-preemptive scheduling, a running process is not interrupted by the scheduler for another process. Instead, it continues execution until it either voluntarily relinquishes the CPU or it terminates. There are specific instances where this occurs:

  • When a process goes from the running state to the waiting state, usually because it needs to wait for I/O operations to complete or for another event.
  • When a process terminates, which means that it has finished executing and is exiting, allowing the scheduler to allocate the CPU to another process.

It's important to note that when a process switches from the running state to the ready state, known as 'time-slicing' in preemptive scheduling, it is not considered non-preemptive.

Similarly, when a process switches from the waiting state to the ready state, the scheduler may decide to execute another process, depending on the scheduling policy, but this switch alone isn't an example of non-preemptive scheduling. The correct options are a and b.

User Akhil M
by
7.9k points