Sendfiles Whiteboard Net Meeting Tools Articles: O O O O O
Sendfiles Whiteboard Net Meeting Tools Articles: O O O O O
SENDfiles
Whiteboard
Net Meeting
Tools
Articles
o Facebook
o Google+
o Twitter
o Linkedin
o YouTube
Home
Tutorials Library
Coding Ground
Tutor Connect
Videos
Search
OS - Home
OS - Overview
OS - Types
OS - Services
OS - Properties
OS - Processes
OS - Process Scheduling
OS - Scheduling algorithms
OS - Multi-threading
OS - Memory Management
OS - Virtual Memory
OS - I/O Hardware
OS - I/O Software
OS - File System
OS - Security
OS - Linux
OS - Quick Guide
OS - Useful Resources
OS - Discussion
Selected Reading
HR Interview Questions
Computer Glossary
Who is Who
Definition
The process scheduling is the activity of the process manager that handles the removal of the
running process from the CPU and the selection of another process on the basis of a particular
strategy.
Job queue This queue keeps all the processes in the system.
Ready queue This queue keeps a set of all processes residing in main memory, ready
and waiting to execute. A new process is always put in this queue.
Device queues The processes which are blocked due to unavailability of an I/O device
constitute this queue.
The OS can use different policies to manage each queue (FIFO, Round Robin, Priority, etc.). The
OS scheduler determines how to move processes between the ready and run queues which can
only have one entry per processor core on the system; in the above diagram, it has been merged
with the CPU.
S.N.
1
When a new process is created, it enters into the system as in the running state.
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 using
linked list. Use of dispatcher is as follows. When a process is interrupted, that process is
transferred in the waiting queue. If the process has completed or aborted, the process is
discarded. In either case, the dispatcher then selects a process from the queue to execute.
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
It is also called as CPU scheduler. Its main objective is to increase system performance in
accordance with the chosen set of criteria. It is the change of ready state to running state of the
process. CPU scheduler selects a process among the processes that are ready to execute and
allocates CPU to one of them.
Short-term schedulers, also known as dispatchers, make the decision of which process to execute
next. Short-term schedulers are faster than long-term schedulers.
Long-Term Scheduler
It is a job scheduler
Short-Term Scheduler
It is a CPU scheduler
Medium-Term Scheduler
It is a process swapping
scheduler.
Speed is in between both short
and long term scheduler.
It reduces the degree of
multiprogramming.
It is a part of Time sharing
systems.
It can re-introduce the process
into memory and execution can
be continued.
Context Switch
A context switch is the mechanism to store and restore the state or context of a CPU in Process
Control block so that a process execution can be resumed from the same point at a later time.
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
Changed State
Accounting information
Previous Page
Print
Next Page
Advertisements
Write for us
FAQ's
Helping
Contact