Process Management Part 1 Eng 50
Process Management Part 1 Eng 50
co
1
www.gradeup.co
Process Scheduling
Content :-
1. Process concept
2. Process States
3. Process State Diagram
4. Process Control Block
5. Scheduling Definition
6. Goal of Scheduling
7. Type of Scheduling
8. IPC
Process Concept
An operating system executes a variety of programs and this variety basically divided
into two major systems:
Batch system – jobs
Time-shared systems – user programs or tasks
We can uses the terms job and process almost interchangeably.
Process – When a program is in execution; execution of processes must be in sequential
fashion.
A process includes following things:
program counter
stack
data section
Process State
When a process executes ,it’s always change it’s state. The state includes :-
new: The process is being created.
running: Instructions are being executed.
waiting: The job/process is waiting for some event to occur.
ready: The process/job is waiting to be assigned to a process.
terminated: The process has finished execution.
Process State Diagram:-
2
www.gradeup.co
When the process is created then there is information associated with each process. The
information includes :
Process state
Program counter
CPU registers
CPU scheduling information
Memory-management information
Accounting information
I/O status information.
3
www.gradeup.co
Scheduling
Scheduling refers to the set of the policies and mechanisms that an OS supports for the
determining the order of execution of pending , jobs and processes
Goals of Scheduling:
To optimize the system resource utilization
To ensure that the more critical processes get priority over other processes
To provide as fair deal as possible to all the pending jobs and processes.
Types of Scheduling
Long Term Scheduling (or job scheduler) –The Primary goal of long term scheduling
is to achieve a proper mix of IO-bound and CPU-bound jobs, so as to keep the CPU and I/O
devices as occupied as possible.Processes are selected to enter into the ready queue. In
short when process change the state from New state to Ready State long term scheduler
works.
Medium Term Scheduler– Medium Term scheduler is charged with handling of
swapped out processes. In short when process change its state from suspend to
Resumestate medium term scheduler works
Short Term Scheduler (or CPU scheduler) – selects next executable process from all
the processes and allocates CPU to that particular process. In short when process change
it’s state from Ready to running state short term scheduler works
Shared Memory:-In shared memory there is some variable which is shared among the
variable and it totally depends upon the programmer how it will be using.
4
www.gradeup.co