Operating Systems: By: K Hanumantha Rao Assistant Professor CSE Dept. GITAM University, Hyd
Operating Systems: By: K Hanumantha Rao Assistant Professor CSE Dept. GITAM University, Hyd
Unit-2
Process management
CPU Scheduling
By: K Hanumantha Rao
Assistant Professor
CSE Dept.
GITAM University, Hyd.
Process Scheduling
• Process Scheduling is an OS task that schedules processes of different
states like ready, waiting, and running.
• Process scheduling allows OS to allocate a time interval of CPU
execution for each process.
• Another important reason for using a process scheduling system is
that it keeps the CPU busy all the time.
• This allows you to get the minimum response time for programs.
• Maximize CPU use, quickly switch processes onto CPU for
time sharing
• Process scheduler selects among available processes for next
execution on CPU
• Maintains scheduling queues of processes
• Job queue – set of all processes in the system
• Ready queue – set of all processes residing in main
memory, ready and waiting to execute
• Device queues – set of processes waiting for an I/O device
• Processes migrate among the various queues
In the given
Diagram,
• Rectangle
represents a
queue.
• Circle denotes
the resource
• Arrow indicates
the flow of the
process.
1. Every new process first put in the Ready queue .It waits in the ready
queue until it is finally processed for execution. Here, the new process
is put in the ready queue and wait until it is selected for execution or it
is dispatched.
2. One of the processes is allocated the CPU and it is executing
3. The process should issue an I/O request
4. Then, it should be placed in the I/O queue.
5. The process should create a new subprocess
6. The process should be waiting for its termination.
7. It should remove forcefully from the CPU, as a result interrupt. Once
interrupt is completed, it should be sent back to ready queue.
Type of Process Schedulers
• A scheduler is a type of system
software that allows you to LTS STS
handle process scheduling.
• There are mainly three types of
Process Schedulers:
1. Long Term Scheduler (LTS) MTS