Process Management & difference between Thread & Process in OS

Process Management: 

Process management is that function of an operating system in which it deals with
running multiple processes on a single computer system. Process management is an integral part
of any modern-day operating system (OS).

Process:  

Following are some definitions of a process: 
  •  A program under execution by a processor (CPU) is called process.  
  •  An instance of a program running on a computer is called a process.  
  •  An entity that can be assigned to and executed on a processor is called process. 

Process States: 

The current activity (or condition) of a process is called its state. A process can be in one of the different states are New, ready, running, block and terminate.

 New state:  

A process is said to be in the new state if it is created newly or When a new process is created then it is said to be in a new state.

Ready state: 

A process is said to be in the ready state if it is ready to be assigned to the CPU for processing
when becoming available. 

Running state: 

A process is said to be in running state if it is under execution by the CPU.

Blocked state:

A process is said to be in the blocked state if it's waiting for some Input/Output (I/O) event to happen.

Terminate state:  

A process is said to be in the terminate state if the CPU has finished its execution. The states of a process can be shown by using the following model

 The current activity (or condition) of a process is called its state. A process can be in one of the  different states: New, ready, running, block and terminate.

Difference between Thread and Process in Operating System:

Thread and Process are two closely related terms. The main difference between the two terms is that the threads are a part of a process, i.e. a process may contain one or more threads, but a thread cannot contain a process.  

Thread: 

A thread can be defined as a piece of the process that can be assigned to CPU for execution. A thread is a small independently executable unit of a process. A thread is considered to be light weighted.  A thread is not dependent on each other. Thread creation is very economical. Program execution using a thread is faster. A thread can access the memory area belonging to another thread within the same process. Thread switching is faster. One thread can belong to exactly one process.

Process: 

A process is an instance of a program that is being executed Or a program is running is called a process. A process is considered to be heavily weighted. Process are dependent on each other. Process creation is very costly in terms of resources. Program execution using process is slower. The process can’t access the memory area belonging to another process. Process consuming is time-consuming. One process can contain several threads.

Post a Comment

0 Comments