Date: August 31, 2024

Topic: Process Execution State

Recall

The Program Counter (PC), CPU register, Stack Pointer and Process Control Block (PCB) help to manage and control the execution of processes within the CPU

Notes

How does the OS know what a process does?

Components defining what a process does

Program Counter

PC pointing to instruction in assembly code

PC pointing to instruction in assembly code

CPU Register

Stack Pointer

Process Control Block (PCB)


The PCB is a data structure that helps the OS capture all information about a process being managed

Its contents are updated whenever the process state changes

Process Control Block (PCB)

image.png

Data structure that the OS maintains for every single process being managed


A PCB holds the state of a process, which is saved when a context switch occurs and a process becomes idle and is restored when the process runs again


<aside> 📌 SUMMARY: Several components like the program counter, CPU register, stack pointer and process control block help to define a process. The PCB has a variety of mechanisms such as storing all data of a process in a data structure and supporting context switching, allocating memory to processes as needed between the processor cache and memory

</aside>