Process (computing): execution instance, lifecycle, and characteristics
A computing process is a running instance of a program. This article explains what a process is, its parts and states, how operating systems manage processes, and how processes differ from threads.
Overview
In computing, a process is a runtime program instance that the operating environment executes. A program stored on disk or in memory is a passive set of instructions; a process is the active entity that contains the program code plus the execution context required for that code to run. Modern systems are capable of running many processes concurrently, giving the impression of simultaneous activity even on single-CPU machines through time-slicing.
Image gallery
3 ImagesCharacteristics and components
A process typically comprises several identifiable parts maintained by the operating system. These include unique identifiers, allocated memory regions, and an execution context. The OS keeps bookkeeping information in a process control block or similar structure so it can suspend, resume, and schedule the process.
- Identifiers: a process identifier (PID) and parent/child relationships.
- Memory layout: read-only code (text), initialized and uninitialized data, heap for dynamic allocation, and one or more stacks for function calls and local storage.
- CPU context: register values, program counter, and processor status needed for context switching.
- Resources: open files, network sockets, and other handles the process owns.
- Privileges and environment: user identity, environment variables, and security context.
Lifecycle and behavior
Processes move through a series of states during their lifetime. Commonly described states include: new (created), ready (runnable), running (executing on a CPU), waiting or blocked (stalled for I/O or synchronization), and terminated (finished). Operating systems schedule ready processes onto processors and perform context switches to save and restore CPU context as they alternate execution between processes.
Creation and termination mechanisms vary by system. Unix-like systems often use a fork/exec model where a process duplicates itself and then replaces its image to run new code; other systems provide APIs to spawn processes directly. Problems such as zombie and orphan processes are artifacts of process termination and parent-child bookkeeping.
Uses, distinctions, and notable facts
Processes provide isolation: faults or crashes in one process usually do not corrupt the memory of another. Multiple processes can run the same program simultaneously — for example, opening several windows of an application typically creates multiple process instances. A common contrast is between processes and threads: threads are smaller execution units that share a process’s address space and resources, enabling lighter-weight concurrency but requiring careful synchronization.
Operating systems expose different process models and terminology; for instance, some user-facing environments refer to a running application instance as a "task." Popular systems and environments implement and tune process management differently; developers rely on standard concepts above while using platform-specific APIs to create, inspect, and control processes. For further technical references, see operating system documentation and developer guides via instance, program, concurrency, OS, and Microsoft Windows.
Related articles
Author
AlegsaOnline.com Process (computing): execution instance, lifecycle, and characteristics Leandro Alegsa
URL: https://en.alegsaonline.com/art/79322