Process Scheduling
Process Scheduling
PROCESS MANAGEMENT
PROCESS SCHEDULING
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.
5.TWO STATE PROCESS MODEL
Two-state process models are:
∙ Running
∙ Not Running
Running
In the Operating system, whenever a new process is built, it is
entered into the system, which should be running.
Not Running
The process that are not running are kept in a queue, which is
waiting for their turn to execute. Each entry in the queue is a point
to a specific process.
S.N. State & Description
1 Running
When a new process is created, it enters into the system as
in the running state.
2 Not Running
Processes that are not running are kept in queue, waiting
for their turn to execute. Each entry in the queue is a
pointer to a particular process. Queue is implemented by
6. SCHEDULING OBJECTIVES
Here, are important objectives of Process scheduling
∙ Maximize the number of interactive users within acceptable
response times.
∙ Achieve a balance between response and utilization. ∙ Avoid
7.SCHEDULERS
Schedulers are special system software which handle process
scheduling in various ways. Their main task is to
select the jobs
to be submitted into the system and
to decide which process to run.
Schedulers are of three types −
∙ Long-Term Scheduler
∙ Short-Term Scheduler
∙ Medium-Term Scheduler
8.CONTEXT SWITCH
It is a method to store/restore the state or of a CPU in PCB.
So that process execution can be resumed from the same
point at a later time.
The context switching method is important for multitasking
OS.
Using this technique, a context switcher enables multiple
processes to share a single CPU. Context switching is an
essential part of a multitasking operating system features.
When the scheduler switches the CPU from executing one
process to execute another, the state from the current running
process is stored into the process control block. After this,
the state for the process to run next is loaded from its own
PCB and used to set the PC, registers, etc. At that point, the
second process can start executing.
Context switches are computationally intensive since register
and memory state must be saved and restored.
To avoid the amount of context switching time, some
hardware systems employ two or more sets of processor
registers. When the process is switched, the following
information is stored for later use.
∙ Program Counter
∙ Scheduling information
∙ Accounting information
Summary:
∙ Process scheduling is an OS task that schedules the processes
of different states like ready, waiting, and running. ∙ Two-state
process models are 1) Running, and )Not Running ∙ Process
scheduling maximizes the number of interactive users, within
acceptable response times.
∙ A scheduler is a type of system software that allows you to
Medium-term
∙ Long term scheduler regulates the program and select process
from the queue and loads them into memory for execution.
∙ The medium-term scheduler enables you to handle the
swapped out-processes.
∙ The main goal of short term scheduler is to boost the system