Operating Systems Week 3
Operating Systems Week 3
Operating Systems Week 3
Mahpara Tunio
PROCESS
A process is a program at the time of execution.
Differences between Process and Program
PROCESS
Process is a dynamic object
Process is sequence of instruction execution
Process loaded in to main memory
Time span of process is limited
Process is a active entity
PROGRAM
Program is a static object
Program is a sequence of instructions
Program loaded into secondary storage devices
Time span of program is unlimited
Program is a passive entity
Process States
When a process executed, it changes the state,
generally the state of process is determined by the
current activity of the process.
Each process may be in one of the following states:
1. New : The process is being created.
2. Running : The process is being executed.
3. Waiting : The process is waiting for some event to
occur.
4. Ready : The process is waiting to be assigned to a
processor.
5. Terminated : The Process has finished execution.
Only one process can be running in any processor at
any time, But many process may be in ready and
waiting states. The ready processes are loaded into a
“ready queue”.
a) New ->Ready : OS creates process and prepares the
process to be executed, then OS moved the process
into ready queue.