Process vs Thread in OS: How PCBs, States and fork() Differ
This explainer contrasts processes and threads in operating systems. A process is a running program with its own address space, open files and resources, while a thread is a single execution path inside a process that shares its code, data and heap but keeps its own program counter, registers and stack. The article describes the four parts of a process's address space (text, data, heap and stack) and how memory grows during function calls and allocation. It also explains the process control block (PCB), which the kernel uses to store each process's ID, state, registers and resource information so it can be paused and resumed. Finally, it outlines the standard five-state process model: new, ready, running, waiting and terminated.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in