Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Last Updated: Mar 27, 2024

Attributes of a Process

Author Amarjeet Kumar
2 upvotes
gp-icon
Operating system track
Free guided path
14 chapters
83+ problems
gp-badge
Earn badges and level up
Operating System

Introduction

This article will explain Process Control Block (PCB), a data structure for storing data about a particular process. The CPU needs this information to complete the process.

The Operating System generates the process control block using the Process characteristics (PCB). The process context is another name for this.

Process Control Block

Multiprogramming vs Multitasking

Process Attributes

The following are the attributes that are kept in the PCB.

Process ID

Each process is given a unique id when it is created, and this id is used to identify it across the system.

Program counter

A program counter keeps track of the last command executed by the process before it was interrupted. When the CPU resumes the execution of this process, it utilizes this address.

  • The program's first instruction address is used to initialize the program counter before it is executed.
  • The program counter's value is automatically updated and increased to refer to the next instruction when each instruction is executed.
  • This procedure continues till the program ends.

Process State

The Process moves through several phases from start to finish, including new, ready, operating, and waiting. We will go through them in further depth later.

Priority

Every procedure has its own set of priorities. The CPU is given to the process with the highest priority. The process control block also stores this information.

General Purpose Registers

Each process has a unique collection of registers used to store data created during the process execution.

  • General-purpose registers are used to store data created during the execution of a task.
  • Each process has its own set of registers, which its PCB keeps track.

List of open files

Every process utilizes files that must be present in the main memory during execution. The OS also keeps track of the open files on the PCB.

List of open devices

The operating system also keeps track of all available devices used throughout the process execution.

You can also read about layered structure of operating system.

Must Read Evolution of Operating System

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Frequently Asked Questions

What is Process Operating System (OS)?

A process is having one or more threads running a type of computer program that executes in computing. It includes the program's code as well as its activities. A process can be of numerous threads of execution that run instructions simultaneously, depending on the operating system (OS).

What is the life cycle of a process in an operating system?

In the operating system, the process life cycle is one of the five stages in which a process might exist from the moment it is submitted for execution until the system performs it.

Which are the four components of a process?

Memory is split into four categories: stack, data, text, and heap. What are the many states in which a process might be? New, up and running, ready to go, then shut off. 

In Linux, what are process attributes?

The ps command is used to see the following attributes of a process: The process ID, or PID, is a one-of-a-kind identifier for the procedure. The number of the Process (PID) that launched this process is also known as the parent process ID or PPID. 

What is Process Control in an Operating System?

A process control block (PCB) is a data structure that contains all process-related information in computer operating systems. It is also known as a process description. The operating system creates a process control block if the process is create.

Conclusion

This article has gone through an essential topic attributes of process and attributes kept in the PCB. Process attributes relate to Process properties such as data set size, kernel scheduling priority, memory page count, and page fault count. Want to learn more about the Functions Of An Operating System? Click here.

Recommended Readings:


Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, Uber, Microsoft, etc. on Coding Ninjas Studio.

Also check out some of the Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Operating Systems, Computer Networks, DBMS, System Design, etc. as well as some Contests, Test Series, Interview Bundles, and some Interview Experiences curated by top Industry Experts only on Coding Ninjas Studio.

Attempt our Online Mock Test Series on Coding Ninjas Studio now! 

Ninja, have a great time learning.

Previous article
How Is Shortest Job First Scheduling Performed In Operating Systems?
Next article
Look Disk Scheduling
Guided path
Free
gridgp-icon
Operating system track
14 chapters
83+ Problems
gp-badge
Earn badges and level up
Live masterclass