Chapter-2 Process Management
Chapter-2 Process Management
Chapter-2 Process Management
Process
A process is a program in execution. The execution of a process must progress in a sequential
fashion. Definition of process is following.
A process is defined as an entity which represents the basic unit of work to be implemented in
the system.
Program
A program by itself is not a process. It is a static entity made up of program statement while process
is a dynamic entity. Program contains the instructions to be executed by processor.
A program takes a space at single place in main memory and continues to stay there. A program
does not perform any action by itself.
Process States
As a process executes, it changes state. The state of a process is defined as the current activity of
the process.
PCB contains many pieces of information associated with a specific process which are described
below.
Process control block includes CPU scheduling, I/O resource management, file management
information etc.. The PCB serves as the repository for any information which can vary from process to
process.Loader/linker sets flags and registers when a process is created. If that process get
suspended, the contents of the registers are saved on a stack and the pointer to the particular stack
frame is stored in the PCB. By this technique, the hardware state can be restored so that the process
can be scheduled to run again.
Process Scheduling
FCFS (First Come First Served) Scheduling
The FCFS scheduler simply executes processes to completion in the order they are
submitted. We will implement FCFS using a queue data structure. Given a group of process to
run, insert them all into the queue and execute them in that order.
This is the one of the simplest scheduling in the order of their arrival. it implementation
is just like FIFO.
0 24 27 31
0 2 4 12
Do it yourself
P1 P2 P3 P1 P2 P3 P1 P2 P3 P2
0 10