Thread

A thread is the smallest unit of execution within a process, representing a single sequence of instructions that the CPU can execute. Each thread within a process shares the process’s resources, such as memory and file handles, but operates with its own set of CPU registers, stack, and program counter. In the Process control block (PCB), the state of each thread is tracked, including its individual register values, program counter, and thread-specific data, while sharing the broader process-level information like memory space and O resources.