Question 9110 – CPU-Scheduling
May 22, 2024Question 7742 – CPU-Scheduling
May 22, 2024Question 7693 – CPU-Scheduling
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:
Correct Answer: A
Question 11 Explanation:
CPU scheduling decisions take place under one of four conditions:
1. When a process switches from the running state to the waiting state, such as for an I/O request or invocation of the wait( ) system call.
2. When a process switches from the running state to the ready state, for example in response to an interrupt.
3. When a process switches from the waiting state to the ready state, say at completion of I/O or a return from wait( ).
4. When a process terminates.
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.
Note: 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.
1. When a process switches from the running state to the waiting state, such as for an I/O request or invocation of the wait( ) system call.
2. When a process switches from the running state to the ready state, for example in response to an interrupt.
3. When a process switches from the waiting state to the ready state, say at completion of I/O or a return from wait( ).
4. When a process terminates.
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.
Note: 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.
(a) and (b) only
(a) and (d) only
(c) and (d) only
(a), (b), (c) only
Subscribe
Login
0 Comments