CPU Scheduling
CPU Scheduling
1.When a process switches from the running state to the waiting state (for
example, as the result of an I/O request or an invocation of wait() for the
termination of a child process).
2.When a process switches from the running state to the ready state (for
example, when an interrupt occurs)
3.When a process switches from the waiting state to the ready state (for
example, at completion of I/O)
P1 P2 P3
0 24 27 30
P2 P3 P1
0 3 6 30
14
time for a given set
Ms. Shagun Arora
[email protected]
of processes
CSE 4th
Operating System
Example of Non-Preemptive
SJF
Process Arrival Time Burst Time
P1 0.0 7
P2 2.0 4
P3 4.0 1
P4 5.0 4
SJF (non-preemptive)
P1 P3 P2 P4
0 3 7 8 12 16
P1 P2 P3 P2 P4 P1
0 2 4 5 7 11 16
P1 P2 P3 P4 P1 P3 P4 P1 P3 P3
Interactive Process
The Interactive Process is a process in which there should be the same kind of
interaction (basically an online game ).
Batch Processes
Batch processing is basically a technique in the Operating system that collects the
programs and data together in the form of the batch before the processing starts.
Student Process
The system process always gets the highest priority while the student processes
always get the lowest priority.
In an operating system, there are many processes, in order to obtain the result we
cannot put all processes in a queue; thus this process is solved by Multilevel queue
scheduling.
Ms. Shagun Arora
23 [email protected] CSE 4th
Operating System