Question 124
Identify the circumstances under which preemptive CPU scheduling is used :
(a) A process switches from Running state to Ready state
(b) A process switches from Waiting state to Ready state
(c) A process completes its execution
(d) A process switches from Ready to Waiting state
Choose the correct option :
Answer : 1. (a) and (b) only (a) A process switches from Running state to Ready state
(b) A process switches from Waiting state to Ready state
(c) A process completes its execution
(d) A process switches from Ready to Waiting state
Choose the correct option :
Previous | Next |
UGC NET CS December 2019 - Question 123 | UGC NET CS December 2019 - Question 125 |
Preemptive Scheduling According to Standard book of Galvin,
CPU scheduling decisions take place under one of four conditions:
-
For conditions 1 and 4 there is no choice - A new process must be selected.
-
For conditions 2 and 3 there is a choice - To either continue running the current process, or select a different one.
-
If scheduling takes place only under conditions 1 and 4, the system is said to be non-preemptive, or cooperative. Under these conditions, once a process starts running it keeps running, until it either voluntarily blocks or until it finishes. Otherwise the system is said to be preemptive.
In above discussion. it's given that If scheduling takes place only under conditions 1 and 4, the system is said to be non-preemptive. Otherwise the system is said to be preemptive. Therefore point 2 & 3 are condition for preemptive system.Here point 2 and 3 are as listed below
-
When a process switches from the running state to the ready state.
-
When a process switches from the waiting state to the ready state.
These above point matches with circumstances (a) & (b) given in question.So, option 1 is correct answer
Reference 1 : CPU Scheduling - Preemptive Scheduling