Process Concept

The Process

Memory Layout

Memory layout of a process is divided into sections:

Layout of a process in memory.

Layout of a process in memory.

Multiple Processes

Process State

CleanShot 2022-02-16 at 10.23.33.png

Process Control Block (PCB)

PCB serves as the repository for all data needed to start or restart a process, along with some accounting data.

Process control block (PCB).

Process control block (PCB).

Process state Full states list here.
Program counter Address of the next instruction to be executed.

Saved when an interrupt occurs. | | CPU registers | Accumulators, index registers, stack pointers, general-purpose registers, condition-code information.

Saved when an interrupt occurs. | | CPU-scheduling information | Process priority, pointers to scheduling queues, any other scheduling parameters. | | Memory-management information | Value of the base and limit registers, page tables, segment tables. | | Accounting information | Amount of CPU and real time used, time limits, account numbers, process numbers, etc. | | I/O status information | List of allocated I/O devices, open files, etc. |

Threads