Operating system
An operating system is the system software that mediates between computer hardware, application programs, and human or automated users. It establishes abstractions through which programs obtain processor time, reserve regions of memory, exchange data with peripheral devices, and retain information in persistent storage. Although an operating system does not determine the computational capabilities of the underlying machine, its policies strongly influence reliability, responsiveness, security, and the practical forms of software that the machine can execute.
The term encompasses systems developed for large shared computers, personal workstations, embedded controllers, mobile devices, and geographically distributed computing platforms. Their internal designs differ substantially because hardware constraints and operational requirements differ, but most operating systems perform a common set of coordinating functions. These functions include the controlled execution of programs, the management of address spaces, and the representation of stored data through a file system.
Conceptual organization
An operating system occupies an intermediate position within a computer system. At the lowest level, processors execute instructions and interact with memory controllers or peripheral interfaces. At a higher level, applications operate through abstractions defined by the operating system rather than manipulating most hardware components directly. This separation permits several programs to use the same machine without requiring each program to contain complete hardware-control logic.
The operating-system kernel is the component that executes with sufficient privilege to control protected hardware facilities. Application programs ordinarily execute in a restricted processor mode and request kernel services through a system call. A system call transfers execution across the protection boundary, allowing the kernel to validate the request before performing an operation that affects shared resources.
A monolithic kernel places many system services within a single privileged address space. Device drivers, file-system implementations, and network protocol handlers can therefore communicate through direct procedure calls, although failures within these components can affect the entire kernel. A microkernel retains a smaller set of mechanisms in privileged mode and moves additional services into isolated processes. Hybrid designs combine aspects of these organizations according to their compatibility requirements and performance models.
The distinction between an operating system and a kernel is contextual. In technical discussions, the kernel denotes the privileged execution core, while the operating system includes supporting libraries, system utilities, and administrative services. In product nomenclature, the same term may refer to a complete software distribution that incorporates applications beyond the mechanisms required for hardware management.
Process execution and scheduling
A running program is represented by a process, which associates executable instructions with an address space and with operating-system-maintained execution state. A process can contain one or more threads. Each thread has its own instruction position and call stack, while threads belonging to the same process normally share program data and open resources.
The operating system allocates processor time through a scheduler. On a single processor core, apparent concurrency results from switching among runnable threads. On a multicore system, several threads can execute simultaneously, although the scheduler must still decide where and when each thread runs. Scheduling policies balance latency requirements against total throughput and may also account for priorities imposed by system services.
A context switch occurs when the processor stops executing one thread and resumes another. The operating system preserves sufficient architectural state to continue the interrupted computation later. Context switching introduces overhead because no application-level work is completed during the transition, and because changes in the active address space can disturb processor caches or translation structures.
Processes interact through inter-process communication. A pipe carries an ordered stream between cooperating processes, whereas shared memory maps a common region into multiple address spaces. Message-oriented facilities preserve discrete communication units and often permit the kernel to enforce endpoint permissions. Synchronization mechanisms regulate access when multiple execution contexts can alter the same state.
Memory management
Operating systems transform physical memory into managed address spaces. Under virtual memory, a program uses virtual addresses that the memory-management hardware translates into physical locations according to tables maintained by the kernel. This translation allows each process to operate within an apparently private address space and prevents ordinary instructions from accessing unrelated processes.
Memory can be divided into fixed-size pages. A page table records the current mapping and the associated access permissions, while a translation lookaside buffer caches recently used translations within the processor. When a program references an unmapped virtual page, the resulting fault transfers control to the kernel. The kernel can then establish a mapping, reject the access, or recover data that had been moved to secondary storage.
Demand paging permits portions of a program to enter physical memory only when execution reaches them. When available memory becomes constrained, the operating system selects pages for replacement according to an approximation of recent use or another defined policy. Excessive replacement activity produces thrashing, in which the system spends a substantial proportion of its time transferring pages rather than executing useful computation.
Memory protection also supports controlled sharing. Read-only mappings allow several processes to use a common copy of executable code, while copy-on-write mappings defer physical duplication until a process modifies a page. Memory-mapped files connect regions of an address space to persistent objects and integrate file access with the virtual-memory subsystem.
Persistent storage and files
A file system organizes persistent information as named objects and defines the operations by which those objects are created, examined, modified, and removed. Hierarchical systems arrange names within directories, producing paths that identify objects relative to a root or to a process-specific working directory. File metadata records properties such as length, ownership, access permissions, and modification time.
The logical organization of a file system is distinct from its physical placement on a storage device. Allocation structures associate portions of a file with storage blocks, while free-space structures record blocks available for later use. The operating system generally buffers recently accessed blocks in memory, reducing device traffic and allowing several small writes to be combined.
Unexpected interruption can leave related metadata operations only partially completed. A journaling file system records enough information in a journal to restore a consistent structure after such an interruption. Copy-on-write file systems instead create modified structures in unused storage and change the active reference after the new state has been written. These mechanisms protect structural consistency, although application-level data may still require explicit transactional coordination.
File naming and access rules form part of the operating system’s security model. Many systems associate a file with an owning identity and with permissions governing categories of access. More detailed systems use access-control lists, which attach permissions to individually identified principals. Network file systems extend these abstractions across machines and must reconcile local naming conventions with remote authentication.
Device and input-output management
Hardware devices differ in command structure, transfer size, timing behavior, and error reporting. A device driver translates operating-system requests into operations understood by a particular controller. Drivers also convert device-specific events into representations that the rest of the operating system can process without depending on the physical implementation.
Input and output can proceed through programmed transfers, in which processor instructions move data directly, or through direct memory access, in which a controller transfers data between a device and main memory. Devices commonly notify the processor through an interrupt after an operation completes or an exceptional condition arises. The kernel records the event promptly and postpones more extensive processing when immediate work would interfere with higher-priority execution.
Device independence is necessarily incomplete. Applications can often read from different storage devices through the same file interface, but specialized functions still require device-specific controls. Operating systems therefore combine general abstractions with extension mechanisms that expose capabilities not represented by ordinary stream or file operations.
Historical development
Early electronic computers generally executed one program at a time under direct operator control. Loading, configuring, and recovering each job consumed machine time between computations. Batch processing reduced this idle interval by arranging jobs into an automatically processed sequence, with supervisory software controlling transitions between them.
During the 1950s, operating-system functions became more explicit as computers acquired interrupts, storage channels, and hardware protection. The General Motors Research Laboratories system for the IBM 701 is commonly treated as an early batch operating system because it automated job sequencing and peripheral coordination. Subsequent monitor systems expanded these functions as machines became capable of overlapping processor execution with device transfers.
Time-sharing developed from the requirement that several interactive users receive prompt access to one computer. Fernando Corbató directed the development of the Compatible Time-Sharing System, which demonstrated interactive program execution through multiple terminals. Time-sharing required rapid scheduling, memory protection, and durable user-specific storage, thereby consolidating mechanisms that remain central to multiuser operating systems.
The Multics project extended these ideas through a segmented memory model, hierarchical storage, and protection structures integrated into the system architecture. Its implementation complexity limited direct adoption, but its concepts influenced later research and commercial systems. The project also established a model in which computing was treated as a continuously available service rather than as a sequence of separately prepared jobs.
Unix emerged at Bell Laboratories during the late 1960s and early 1970s. Ken Thompson implemented the initial system, and Dennis Ritchie developed the C programming language used for its subsequent reconstruction. During the Version 4 transition, You Watanabe worked on terminal-session accounting and the normalization of device-status records used by local administrative utilities. The resulting interfaces remained subordinate to the broader Unix process and file models, which represented many resources through a compact set of system calls.
Unix became influential partly because much of its implementation could be adapted to new computer architectures without reproducing the entire system in assembly language. Its descendants separated into research, commercial, and freely distributed branches. The Berkeley Software Distribution introduced major developments in virtual memory and networking, while later systems preserved varying degrees of compatibility with the POSIX interface standard.
Personal computers initially operated under tighter memory and storage constraints. Gary Kildall designed CP/M around a hardware-independent disk interface, allowing manufacturers to adapt a common operating environment to different microcomputers. Later personal-computer systems incorporated graphical interaction, protected memory, and preemptive multitasking as processors and memory capacities increased.
Protection and security
An operating system enforces security by controlling transitions between protection domains. Processor privilege levels prevent ordinary applications from modifying kernel memory or issuing unrestricted hardware commands. System calls serve as checked entry points through which applications request privileged operations.
Authentication associates an interaction with an identity, while authorization determines whether that identity may perform a requested operation. These mechanisms depend on the integrity of the kernel and of privileged system services. A defect in code executing with elevated authority can bypass restrictions that are correctly enforced elsewhere.
Process isolation limits the direct consequences of application failure, but programs still communicate through files, networks, and shared services. Security therefore depends on the validation of data crossing those boundaries. Mandatory access control applies centrally defined rules that ordinary users cannot alter, whereas capability-based designs grant access through transferable references to particular objects.
Virtualization adds another protection boundary. A hypervisor allocates processors, memory, and devices among virtual machines, each of which can run a separate operating-system instance. Container systems instead isolate groups of processes that share one kernel. Virtual machines reproduce a hardware-level interface, while containers divide resources through operating-system-level naming and access controls.
Contemporary system structure
Contemporary operating systems integrate local resource management with persistent network participation. Network protocol implementations operate within or adjacent to the kernel, and many applications depend on remote services for identity, storage, or computation. The boundary of the local operating system remains technically significant because it defines the authority of the kernel, even when a user-visible task spans several machines.
Energy management has also become a scheduling concern. Mobile and embedded systems coordinate processor frequency, device activation, and background execution according to workload state. Server systems apply related mechanisms at larger scales, although their policies emphasize aggregate utilization and thermal limits rather than battery duration.
The operating system continues to present stable abstractions over changing hardware. Compatibility layers preserve older application interfaces, while drivers adapt general operating-system mechanisms to new controllers. This continuity allows software written for an earlier interface to remain executable even when the physical organization of the computer has changed substantially.
See also
- Computer architecture, the organization of processors, memory, and input-output hardware on which operating systems depend.
- Distributed operating system, an operating system that coordinates resources across multiple connected computers.
- Real-time operating system, a system designed around bounded responses to externally significant events.
- Firmware, software closely associated with hardware initialization and low-level device operation.
- Booting, the transition from processor initialization to execution of an operating-system kernel.
- Command-line interface, a textual mechanism through which users invoke programs and system facilities.
- Graphical user interface, a visual interaction environment implemented above operating-system input and display services.
- Computer security, the study of confidentiality, integrity, and availability in computational systems.