0% found this document useful (0 votes)
9 views

Process Management Part 1 Eng 50

Uploaded by

SANDEEP Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Process Management Part 1 Eng 50

Uploaded by

SANDEEP Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

www.gradeup.

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:-

Process Control Block (PCB)

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.

Process Control Block (PCB)

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

1.Short-term scheduler is invoked very frequently


(milliseconds)  (must be fast).
2.Long-term scheduler is invoked very infrequently
(seconds, minutes)  (may be slow)
3. The degree of multiprogramming is controlled by Long-term scheduler

Inter-Process Communication (IPC):-


Inter-process communication of messages amongst concurrently executing processes is one
of the major functions of an operating system.
Process can communicate to each other basically by two ways:-
1. Message Passing
2. Shared Memory

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

Message Passing :- In message passing there is no common variable which is shared


among the processes.Suppose there are two proces and they want to communicate with
each other than :-
1. Establise communication link between them
2. Exchanging of message is started.

You might also like