×

Process Management in OS

A Program will not do anything unless a CPU executes its instructions. An executing program is called a process. The Process requires computer resources to complete its task. More than one process can exist in the system, which needs the same resources at the same time. So, the operating system handles all the resources and processes effectively.

There may be situations where many resources may need to be executed at the same time by one process so that consistency is maintained; otherwise, the system may become inconsistent, and there may be chances of deadlock.  

The operating system performs the following tasks for process management:

  • Suspending and restarting the process.
  • Offering mechanisms for process communication.
  • Offering mechanisms for process synchronization.
  • Process scheduling and threads on the CPU.
  • Create and delete system and user processes.

Process: - A process is defined as a program in execution.

Types of Processes

There are two types of Processes:

  1. I/O-Bound Process
  2. CPU-Bound Process
  1. I/O-Bound Process: - It is a type of process in which the process execution time is calculated with the help of the amount of time a process spends to complete the input/output operations.
  2. CPU-Bound Process: - CPU-Bound Process is another type of process in which the process execution time is calculated with the help of the CPU speed. If we use a faster processor, then the CPU-Bound Process may execute faster.

Components of Process

There are four components of the process:

  1. Text
  2. Data
  3. Stack
  4. Heap
Process Management
  1. Text: - Text consists of the value of the program counter and the processor’s registers content that is represented by the current activity.
  2. Data: - Data contains both static as well as global variables.
  3. Stack: - Stack contains temporary data like local variables, return addresses, and method/function.
  4. Heap: - Heap is a dynamic memory which is allocated during the run time of a process.

Attributes of Process

The attributes of a process are also called the context of the process. These attributes design the Process Control Block (PCB).

The attributes used to store Process Control Block (PCB) are:

  1. Process ID
  2. Program Counter
  3. Process State
  4. Priority
  5. General Purpose Registers
  6. List of open Files
  7. List of open Devices
Process Management

Process ID: - Process ID is a unique ID that is assigned to the process at that time when the process was created.

Program counter: - The Program counter holds the address of the last instruction of the process.

Process State: - The process state may be one of the following states, i.e., running, ready, waiting, terminate, etc.

Priority: - Some priority is assigned to every process in the memory. The process that has the highest priority between the processes gets the CPU first.

General Purpose Registers: - These registers are used to store the data which is generated at the time of process execution.

List of Open Files: - A list of open files contains some files that require to be present in the main memory when the process is executing

List of Open Devices: - List of open devices contains the list of devices that are used when the process is executing.


Related Topics

Android Operating System

What is Android Operating System? Android is a Linux-based and open-source operating system mainly established for mobile devices like tablet computers and Smartphones. The Android operating system was established by the...

5 minutes read.

What is Deadlock in OS?

Deadlock in Operating System In an Operating System, a process uses various resources, and the resources are used in the following manner: Request the ResourceUse the ResourceRelease the Resource In the Operating System, Deadlock is a condition...

4 minutes read.

Need of Operating System

There are various needs of operating system: Managing Input-Output UnitThe Operating system as a platform for application programsMultitaskingConsistent user interface Managing Input-Output Unit: - With the help of the operating system, the...

2 minutes read.

Monitors in Operating System

Monitors in Operating System Monitors are used for process synchronization. With the help of programming languages, we can use a monitor to achieve mutual exclusion among the processes. Example of monitors:...

3 minutes read.

Deadlock Avoidance

Deadlock Avoidance In an operating system, for deadlock avoidance, we perform the following: We only grant the request of the resources if the resulting state of the system will not cause any deadlock in the...

3 minutes read.

Linux Operating System

What is Linux? The Linux operating system is used on various devices, including cellphones, automobiles, supercomputers, household gadgets, personal computers, and business servers. You can find Linux on your phones, thermostats, vehicles,...

8 minutes read.

Starvation in Operating System

Starvation is one of the major problems occurring when resource management is not done properly. This problem arises in the operating system when the resources are not being allocated for...

4 minutes read.

Operating System Tutorial

What is an Operating System? An Operating System is a System Software that handles the resources of a computer such as computer hardware and software and offers frequent services to the...

7 minutes read.

Priority Scheduling in OS

Priority Scheduling is a type of CPU Scheduling algorithm which is used for process scheduling. In Priority Scheduling, we assign some priorities to each process. The process which has higher priority among all...

5 minutes read.

Simple Structure in Operating System

An operating system is a piece of software that lets the user applications talk to the hardware of the system. Because it is such a complicated structure, the operating system...

3 minutes read.

Directory Structure in Operating System

Directory Structure in Operating System What is a Directory A Directory is the collection of the correlated files on the disk. In simple words, a directory is like a container which contains...

8 minutes read.

SCAN Disk Scheduling Algorithm

SCAN Disk Scheduling Algorithm The SCAN disk scheduling algorithm is another type of disk scheduling algorithm. In this algorithm, we move the disk arm into a specific direction (direction can be moved towards...

4 minutes read.

Booting Process in Operating System

What is Booting? Booting is defined as the term which says that the process of loading the operating system into the memory. The process of booting begins when we switch on...

4 minutes read.

Scheduling Algorithms in OS

There are various types of scheduling algorithm which are used by the operating system to schedule the process on the processor. Objective of Scheduling Algorithms There are the following objectives of Scheduling Algorithms: Fare allocation...

2 minutes read.

Difference between Protection and Security in Operating System

Some operating system mechanisms facilitate us to stop tampering with logical and physical resources. Some of these methods are security and protection. Protection and security are distinct concepts, despite the...

3 minutes read.

Components of Operating System

Components of Operating System: An operating system is a complex and vast system. We can only create the operating system by dividing it into small parts. Each part must be...

5 minutes read.

Interested Variable Mechanism

Interested Variable Mechanism It is a must to provide progress to the process synchronization mechanism. In variable mechanism, if there is a process that doesn’t need to enter into the critical section, then due...

5 minutes read.

Contiguous Memory Allocation in Operating System

Memory is a place where data, facts, figures, and information are stored for temporary or permanent access the data in future, which is also considered as the storage place. Allocation of...

4 minutes read.

Difference between SCAN and FCFS Disk Scheduling Algorithm

SCAN / Elevator Algorithm A different form of disc scheduling method is the SCAN disc scheduling algorithm. We move the disc arm in a certain direction in this process (the direction...

3 minutes read.

Resource Allocation Graph in Operating System

Resource Allocation Graph in OS We use the resource allocation graph for the pictographic representation of the state of a system. The resource allocation graph contains all the information related to the processes that...

5 minutes read.