Categories: Computer Science

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.

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:

  • 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.

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.

 

Pointer State
Process Number
Program Counter
Registers
Memory Limits
List of Open Files

 

Available Links:

4 Types of Optical Disks Types of Mainframe System 3 Types of Data Processing
7 Types of Information Systems What is Printer & Its Types Database & Database Approaches

 

Recent Posts

The Best Personal Loans for People with Bad Credit

Having bad credit can make it challenging to obtain a personal loan, but it's not… Read More

2 weeks ago

How to Travel Cheaper: A Beginner’s Guide to Budget Travel

Traveling doesn't have to break the bank. With some careful planning and smart strategies, you… Read More

2 weeks ago

Fruit Packing Jobs with Free Visa and Tickets: Opportunities and Salaries

Are you looking for a job in the fruit packing industry with the added benefit… Read More

2 weeks ago

Moving to Canada from the United States: Immigration, Work, and Study Visa Options

Are you considering a move from the United States to Canada? Whether it's for a… Read More

2 weeks ago

Credit Card: What It Is, How It Works, and How to Get One

A credit card is a financial tool that allows you to borrow money from a… Read More

2 weeks ago

Mastering Online Sports Streaming: Tips, Tricks, and Tools

Watching sports online for free can be challenging due to the licensing agreements and restrictions… Read More

1 month ago