2. What is CPU Scheduling?
• CPU scheduling is a process which allows one process to use the CPU
while the execution of another process is on hold(in waiting state) due
to unavailability of any resource like I/O etc.
• The aim of CPU scheduling is to make the system efficient, fast and
fair.
• Whenever the CPU becomes idle, the operating system must select one
of the processes in the ready queue to be executed. The selection
process is carried out by the short-term scheduler (or CPU scheduler).
The scheduler selects from among the processes in memory that are
ready to execute, and allocates the CPU to one of them.
3. Types of CPU Scheduling
CPU scheduling decisions may take place under the following four
circumstances:
• When a process switches from the running state to the waiting state(for
I/O request or invocation of wait for the termination of one of the child
processes).
• When a process switches from the running state to the ready state (for
example, when an interrupt occurs).
• When a process switches from the waiting state to the ready state(for
example, completion of I/O).
• When a process terminates.
4. Types :
• Preemptive Scheduling
The scheduling in which a Running program can be interrupted if a
high priority process enters the queue & is allocated to the CPU is
called “Preemptive Scheduling”.
• Non-Preemptive Scheduling :
The scheduling in which a Running program Cannot be interrupted
by any other process is called “Non-Preemptive Scheduling”.
5. Scheduling Algorithms
• First Come First Serve(FCFS) Scheduling
• Shortest-Job-First(SJF) Scheduling
• Priority Scheduling
• Round Robin(RR) Scheduling
6. Process Scheduling solution
Process Burst Time
P1 9
P2 33
P3 2
P 4 5
P5 14
Suppose that the processes arrive in the order: P1 , P2 , P3, P4 .P5.
11. Multiple processor scheduling.
• Multiprocessor scheduling can be used when processes are related
to one another. Scheduling two or more than two threads at the
same time across multiple central processing units is called as
space sharing.
12. Real-time-scheduling
• A real Time scheduling intented to serve real-time-application
requests.it must be able to process data as it comes in, typically
without buffering delays.Processing time requirements ( including
any os delay ) are measured in shorter.
• Determines the order of real time task executions.
• Highest priority process runs first.
• Real time scheduling is one of the most active areas of research in
computer Science.