Process :-
- A running program is called Process.
- When a program is executing, then it requires various resources and services.
- It requires memory space (RAM Space), CPU time, set of data, etc.
- A process has a number of characteristics, all of their characteristics are defined together as process control block (PCB).
- A process of application software is called application process, where that of system software is called system process.
Process Control Block :-
- It is the set of information related to a process.
- When a process is created then there are a number of parameters (details, properties, characteristics) are required to maintain, so that a process can be managed by the O/S.
- The process control block is defined for the every processes separately.
- The PCB of each process is stored and maintain in the RAM during the execution of the process.
- When the execution of the process is finished, then their PCB is deleted automatically from the RAM.
- In PCB the following details are maintain :-
- Process id :- Every process has its own process id, by which it can be accessed.
- Process size :- The size of a process is the amount of the memory space, which it requires.
- Burst time (BT) :- It is also known as CPU time, and it is the amount of time of CPU, which is require for the execution of the process.
- Scheduling information :- In PCB it is also maintained that which CPU scheduling is used for the execution of a process.
- Register information :- When a process is executing, then it may or may not access the different register of the system. In PCB the set of registers which is used by the process is also maintained.
Process states :-
- In OS there are five states of process, all the states of a process is also known as life cycle together.
- New State
- Ready State
- Running State
- Terminate State
- Blocked State
- New State :- When a process is created then it is called in new state. All the processes of new state are in secondary memory. More than one processes can be in new state.
- Ready State :- When a process is created, then it is loaded in RAM for further execution. A process which is loaded into RAM and wating for CPU attention is called in Ready State. All the processes of ready state are available in RAM. Since the process which are available in RAM are viewed as running process for a user, due to this the user thinks that the multiple programs or processes are executing. So, the degree of multi-programming is due to the ready state
- Running State :- When a process gets the attention of CPU then it starts their execution, a running process is called in running state. A running process may be terminated or goes to blocked state and come back into the ready state. Only and only one process can be in running state, if the system has single CPU.
- Terminated State :- When a process complete their execution then it is called in terminated state. A terminated process is removed from the RAM.
- Blocked State :- Sometimes a running process required to complete some input/output operation, in that case the process leave the running state and goes to the blocked state.
A process involved in I/O
operation is called in blocked state, after completion of the I/O operation the
process goes to the ready state.
NOTE :- Sometimes due to an
interrupt with may a hardware or a software a running process removed suddenly
from the running state and then it goes to the ready state.
0 Comments
Tell us your queries or more topics which you want