DIZNR INTERNATIONAL

Day 01Part 08- Operating system lecture for gate for computer science – Attributes of Processes.

Day 01Part 08- Operating system lecture for gate for computer science – Attributes of Processes.

https://www.gyanodhan.com/video/7B7.%20GATE%20CSEIT/Operating%20System/437.%20Day%2001Part%2008-%20Operating%20system%20lecture%20for%20gate%20for%20computer%20science%20-%20Attributes%20of%20Processes.mp4

 Attributes of Processes – Operating System (GATE CS Lecture)

A process in an Operating System (OS) is an instance of a program in execution. Every process has certain attributes that help the OS manage and schedule it efficiently.

 What is a Process?

A process is a program in execution, consisting of:
Program Code (Text Section) – The instructions to be executed.
Program Counter (PC) – Stores the next instruction to execute.
Stack – Contains function calls, return addresses, and local variables.
Heap – Dynamic memory allocation (e.g., malloc in C).
Data Section – Global variables and static data.

 Attributes of a Process

Each process has a unique set of attributes stored in the Process Control Block (PCB).

1. Process ID (PID)

2. Process State

A process can be in one of the following states:
New – Process is being created.
Ready – Waiting for CPU time.
Running – Currently executing on the CPU.
Waiting (Blocked) – Waiting for I/O or other resources.
Terminated – Process has finished execution.

Example: If a process is waiting for input from the keyboard, it moves to the Waiting state.

3. Program Counter (PC)

4. CPU Registers

5. Memory Management Information

Example: If a process tries to access memory outside its boundary, the OS generates a segmentation fault.

6. Accounting Information

Example: The OS uses this data for scheduling and billing in time-sharing systems.

7. I/O Status Information

Example: If a process is reading a file, it stays in the Waiting state until I/O is complete.

 Process Control Block (PCB)

All process attributes are stored in a data structure called the Process Control Block (PCB).

Attribute Description
Process ID (PID) Unique identifier for the process
Process State New, Ready, Running, Waiting, Terminated
Program Counter Address of the next instruction
CPU Registers Store temporary process data
Memory Management Info Page tables, base & limit registers
Accounting Info CPU time, priority, execution history
I/O Info Files and devices used by the process

The PCB is crucial for context switching between processes!

 Summary

 Every process has attributes stored in the Process Control Block (PCB).
 Key attributes include PID, Process State, Program Counter, CPU Registers, and Memory Information.
 The OS uses these attributes for scheduling, execution, and memory management.

Would you like GATE-level MCQs or more detailed notes on this?

Day 01Part 08- Operating system lecture for gate for computer science – Attributes of Processes.

OPERATING SYSTEMS LECTURE NOTES …

OPERATING SYSTEM

Operating System