Ø Process scheduling –
1. Scheduling
queue
2. Schedulers
3. Context
switch
·
In a multi-programming environment mat
process run simultaneously so as to maximize CPU utilization.
·
An operating system decide which
process to execute and which process has to wait for cpu, this test of
selecting a process for execution is called process scheduling (cpu
scheduling).
·
In process scheduling switch the CPU
among processes so that user can interact with each program while it is
running.
1)
Scheduling queue –these are three types of
queue in operating system for scheduling –
A.
Job queue
B.
Ready
queue
C.
Device
queue
A.
Job
queue – when a process enters the system they are put into a job
queue which consists of all process in system.
B.
Ready
queue – when a process resides in memory and ready to execute then
the process is kept in ready queue.
C.
Device
queue – when a process is waiting for an input/output device or
event then it must be enter into a device queue or kept in device queue.
Queuing-diagram
representation of process scheduling
Ones a process is allocated a CPU and is executing,
one of several events could occur –
·
The process requests an
input/output device and shifted into device queue (I/O queue).
·
The time of process may expire.
·
The process could create a new child
process and wait for the child termination.
·
The process could remove forcely
from the CPU when any interrupt occur.