What is the Process in OS and Its Life Cycle?
A process in os is the actions happening while something is happening or being done. A process contains the program code and its activity. Basically we can say a process is a program in execution.
In other words, A process in os is an entity that represents the basic unit of work to be implemented in the system.
Program and process are quite different but, when a program is loaded into the memory and it becomes a process, it can be divided into four sections ─ stack, heap, text, and data.
What is the Life Cycle Process in os?
During the Life Cycle of a Process in os, it is gone through many stages. But start and terminated or dead are the only two stages in which the process goes only once.
The names of states are not standardized that’s why they may differ.
Following are the states in the Life Cycle Process in os
- New/ Start/ Ideal: When a process is first started/ created it is to be in the initial state.
- Ready: After a process is created it is ready to execute but it requires resources to execute so it is waiting until it gets resources.
- Running: This is State when the Process is being executed i.e. when the process is assigned to a processor.
- Waiting: When the process is stopped for the required resources either it might be acquired by other process or not available and will start running once become available
- Terminated/ Exit/ Dead: The process can be dead or terminated once it completed execution or can be forcefully terminated by the operating system.
What are the attributes of a Process in os?
The attributes of a process are also known as the context of the process.
- Process Id: Process Id is a unique identifier assigned by the operating system
- Process State: Process State can be ready, running, etc.
- CPU registers: Like the Program Counter (CPU registers must be saved and
- restored when a process is swapped in and out of CPU)
- CPU scheduling information: For example, Priority (Different processes
- may have different priorities, for example
- a short process may be assigned a low priority
- in the shortest job first scheduling)
- I/O status information: For example, devices allocated to the process,
- Open files, etc.
If You Want To Get More Daily Such Tech News, Information and Updates Then Press Red Bell Icon At The Right Side of Page To Subscribe our Updates.