Introduction to Process Management

Before to explain process management, it is important to explain the terms program and process.

Program vs. Process

Process is actually a program in running State. But the main difference between program and process is,

“Every Program which is written in Low or High level language like (Assembly, C++ and Java etc.) is called Program. When CPU executes any program then it becomes a process.”

In simple words we can say,

“A process is program which contains set of instructions to execute.”

CPU execute these instructions. A process may require lot of computer resources to execute these instructions like printer, memory etc.

If more than one processes request for same resource at the same time. Then deadlock may occur. To handle with such situations Operating System is used.

 OS perform the following activities in Process Management

  1. Scheduling processes and threads on the CPU’s.
  2. Creating and deleting both system and user processes.
  3. Context switching (Suspending and resuming processes).
  4. Mechanisms for process communication.
  5. Mechanisms for process synchronization.

How Process Looks in Main Memory?

The following image shows a simple layout of a process inside main memory,


STACK

The Stack contains the temporary data, such as function parameters, returns addresses, and local variables.

HEEP

It is dynamically allocated memory to a process during its execution time.

DATA

It Contains the global and static variables.

TEXT

It includes the current instructions represented by Program Counter. It also represents the contents of the processor’s registers.

 

Operations on the Process 

  1. Creation: OS creates the Processes through System call at secondary level.
  2. Scheduling: Selecting the process which is to be executed next, is known as scheduling.
  3. Execution: When the process is scheduled for the execution .Then CPU starts executing it.
  4. Deletion/killing: Once the process gets over then the OS will kill that process.

Help Other’s By Sharing…

Contact Us

Burewala, Vehari, Punjab, Pakistan

cstaleem1@gmail.com

Website: CStaleem.com

Pin It on Pinterest