/ˈproʊsɛs/
noun — "running instance of a program."
Process is an executing instance of a program along with its associated resources and state information managed by an operating system. It represents the fundamental unit of work in modern computing, providing an isolated environment in which instructions are executed, memory is allocated, and input/output operations are coordinated. A single program can have multiple concurrent processes, each maintaining its own independent state.
Technically, a process consists of several key components: the program code, data segment (including global and static variables), stack for function calls and local variables, heap for dynamically allocated memory, and a set of CPU registers that represent execution state. The operating system tracks each process through a process control block (PCB), which includes identifiers, scheduling information, memory maps, open files, and other metadata necessary for management and context switching.
Execution of a process is coordinated by the operating system’s scheduler, which assigns CPU time according to priority, fairness, or real-time constraints. Context switching allows multiple processes to share the same CPU by saving the current execution state and restoring another process’s state. This provides the appearance of parallelism even on single-core systems, while multi-core systems achieve actual simultaneous execution.
Inter-process communication (IPC) mechanisms enable processes to exchange data or synchronize execution. Common IPC techniques include message passing, shared memory, signals, and semaphores. Resource isolation ensures that one process cannot arbitrarily access another’s memory, providing stability and security. When a process terminates, the operating system reclaims resources, including memory, file descriptors, and other allocated structures.
From a workflow perspective, a process lifecycle includes creation, execution, suspension, resumption, and termination. For example, in a desktop environment, opening a text editor spawns a new process. The process allocates memory, loads the executable code, and begins responding to user input. When the user closes the application, the process terminates and resources are released back to the system.
Example of process creation in Python:
import subprocess
# start a new process
process = subprocess.Popen(['ls', '-l'], stdout=subprocess.PIPE)
# wait for completion and capture output
output, errors = process.communicate()
Conceptually, a process is like a worker in a factory: each worker has its own workstation, tools, and task instructions. While many workers may perform similar tasks, each operates independently, and the factory manager (the operating system) coordinates their activities to optimize throughput and prevent interference.
See Operating System, Thread, Scheduler, Memory Management Unit.