Process States & Its Attributes

A program in execution is called a process. There exist a number of process states, attributes of a process, state transitions in a process, etc. The process control block is also an important characteristic of a process. To read in detail, just scroll down.

What Is Process?

A process is a program in execution. It is the basic unit of resource allocation in an operating system. A process has a starting and ending point. It must execute and progress sequentially. A process is controlled and scheduled by the operating system.

what is process

An operating system executes different programs depending on the system. A program is a passive entity. It specifies the logic of data manipulation and I/O actions. A program does not perform the actions itself. A process is an active entity that uses system resources. It performs the actions specified in the program.

Read About:

Attributes Of Process

Following are some important attributes of the process:

  • Program Counter
  • Stack
  • Data Section 
  • Heap
  1. Program Counter: It is used to keep track of the address of the next instruction to be executed
  2. Stack: stack is held the second position in the list of important attributes of the process. A stack is employed to store temporary data for the process
  3. Data Section: A data section is employed that will contain global variables
  4. Heap: A process might include a heap. It’s the memory that’s dynamically allotted throughout process execution.

Process States

Process states describe the character of current activity during a process. The state of a process changes because it executes. A method could also be in one in all the following states:

process states

  • New 
  • Running
  • Waiting (Blocked)
  • Ready
  • Terminated
  1. New: the method is being created and isn’t nevertheless in computer memory
  2. Running: the method has an instruction that’s being executed
  3. Waiting (Blocked): the method is expecting some event to occur
  4. Ready: the method is waiting to be executed
  5. Terminated: the method has finished execution and isn’t any longer in memory

States Transition in Process

Different state transitions during a process are as follows:

  • New -> ready: the method is admitted to ready queue and maybe thought-about by computer hardware scheduler
  • Ready -> Running: CPU scheduler chooses that process to execute next according to some planning algorithmic rule
  • Running -> Ready: the process has used its current time slice
  • Running -> Blocked: a process is expecting some event to occur like an I/O operation to be complete
  • Blocked -> Ready: the event has occurred that the process was waiting

Process Control Block

The process control block may be a data structure. It contains all data for a process to be used for controlling its execution. It additionally contains the data associated with the resource allotted to the process. Each method has its own PCB.

process control block

The process control block is incredibly vital. It ought to be kept in a protected space wherever the user cannot access it. The information that has got to be saved usually consists of the following:

  • Process State: It indicates the information regarding the process. The state will be ready, waiting, etc.
  • Program Counter: it points to the next instruction to be executed once the process gains the computer hardware.
  • CPU Register: the contents of the CPU register for the process. All the temporary data will be destroyed by the next process that gets the computer hardware after an interrupt happens.
  • CPU Planning: It holds data required for CPU scheduling, like process priority and any planning queue pointers
  • Memory Management: It is the data needed by the memory manager like base register, limit register, page table for the process, etc.
  • Accounting Data: This part of PCB holds the amount of CPU time and real-time utilized by the process to date, the process range, and then forth.
  • I/O Status Information: This part of the PCB holds a list of the I/O devices that the process has requested, a list of the process’s open files, etc.

 

PointerState
Process Number
Program Counter
Registers
Memory Limits
List of Open Files

 

Available Links:

4 Types of Optical DisksTypes of Mainframe System3 Types of Data Processing
7 Types of Information SystemsWhat is Printer & Its TypesDatabase & Database Approaches

 

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button