An operating system (OS) is
system software
System software is software designed to provide a platform for other software. An example of system software is an operating system (OS) (like macOS, Linux, Android, and Microsoft Windows).
Application software is software that allows users to d ...
that manages
computer hardware
Computer hardware includes the physical parts of a computer, such as the central processing unit (CPU), random-access memory (RAM), motherboard, computer data storage, graphics card, sound card, and computer case. It includes external devices ...
and
software
Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications.
The history of software is closely tied to the development of digital comput ...
resources, and provides common
services for
computer program
A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. It is one component of software, which also includes software documentation, documentation and other intangibl ...
s.
Time-sharing
In computing, time-sharing is the Concurrency (computer science), concurrent sharing of a computing resource among many tasks or users by giving each Process (computing), task or User (computing), user a small slice of CPU time, processing time. ...
operating systems
schedule tasks for efficient use of the system and may also include accounting software for cost allocation of
processor time,
mass storage
In computing, mass storage refers to the storage of large amounts of data in a persisting and machine-readable fashion. In general, the term ''mass'' in ''mass storage'' is used to mean ''large'' in relation to contemporaneous hard disk drive ...
, peripherals, and other resources.
For hardware functions such as
input and output and
memory allocation, the operating system acts as an intermediary between programs and the computer hardware, although the application code is usually executed directly by the hardware and frequently makes
system call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
s to an OS function or is
interrupt
In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
ed by it. Operating systems are found on many devices that contain a computerfrom cellular phones and video game consoles to
web server
A web server is computer software and underlying Computer hardware, hardware that accepts requests via Hypertext Transfer Protocol, HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, co ...
s and
supercomputer
A supercomputer is a type of computer with a high level of performance as compared to a general-purpose computer. The performance of a supercomputer is commonly measured in floating-point operations per second (FLOPS) instead of million instruc ...
s.
,
Android is the most popular operating system with a 46% market share, followed by
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
at 26%,
iOS and
iPadOS at 18%,
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
at 5%, and
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
at 1%. Android, iOS, and iPadOS are mobile operating systems, while Windows, macOS, and Linux are desktop operating systems.
Linux distribution
A Linux distribution, often abbreviated as distro, is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro—if distributed on its own—is oft ...
s are dominant in the server and supercomputing sectors. Other specialized classes of operating systems (special-purpose operating systems),
such as
embedded and real-time systems, exist for many applications.
Security-focused operating system
This is a list of operating systems specifically focused on computer security, security. Similar concepts include security-evaluated operating systems that have achieved certification from an code audit, auditing organization, and trusted operati ...
s also exist. Some operating systems have low system requirements (e.g.
light-weight Linux distribution). Others may have higher system requirements.
Some operating systems require installation or may come pre-installed with purchased computers (
OEM-installation), whereas others may run directly from media (i.e.
live CD) or flash memory (i.e. a LiveUSB from a
USB
Universal Serial Bus (USB) is an industry standard, developed by USB Implementers Forum (USB-IF), for digital data transmission and power delivery between many types of electronics. It specifies the architecture, in particular the physical ...
stick).
Definition and purpose
An operating system is difficult to define, but has been called "the
layer of software that manages a computer's resources for its users and their
applications". Operating systems include the software that is always running, called a
kernel—but can include other software as well. The two other types of programs that can run on a computer are
system programs—which are associated with the operating system, but may not be part of the kernel—and applications—all other software.
There are three main purposes that an operating system fulfills:
*Operating systems allocate resources between different applications, deciding when they will receive
central processing unit
A central processing unit (CPU), also called a central processor, main processor, or just processor, is the primary Processor (computing), processor in a given computer. Its electronic circuitry executes Instruction (computing), instructions ...
(CPU) time or space in
memory
Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembe ...
. On modern
personal computer
A personal computer, commonly referred to as PC or computer, is a computer designed for individual use. It is typically used for tasks such as Word processor, word processing, web browser, internet browsing, email, multimedia playback, and PC ...
s, users often want to run several applications at once. In order to ensure that one program cannot monopolize the computer's limited hardware resources, the operating system gives each application a share of the resource, either in time (CPU) or space (memory). The operating system also must isolate applications from each other to protect them from errors and security vulnerabilities in another application's code, but enable communications between different applications.
*Operating systems provide an interface that abstracts the details of accessing
hardware details (such as physical memory) to make things easier for programmers.
Virtualization
In computing, virtualization (abbreviated v12n) is a series of technologies that allows dividing of physical computing resources into a series of virtual machines, operating systems, processes or containers.
Virtualization began in the 1960s wit ...
also enables the operating system to mask limited hardware resources; for example,
virtual memory
In computing, virtual memory, or virtual storage, is a memory management technique that provides an "idealized abstraction of the storage resources that are actually available on a given machine" which "creates the illusion to users of a ver ...
can provide a program with the illusion of nearly unlimited memory that exceeds the computer's actual memory.
*Operating systems provide common services, such as an interface for accessing network and disk devices. This enables an application to be run on different hardware without needing to be rewritten. Which services to include in an operating system varies greatly, and this functionality makes up the great majority of code for most operating systems.
Types of operating systems
Multicomputer operating systems
With
multiprocessor
Multiprocessing (MP) is the use of two or more central processing units (CPUs) within a single computer system. The term also refers to the ability of a system to support more than one processor or the ability to allocate tasks between them. The ...
s multiple CPUs share memory. A
multicomputer or
cluster computer has multiple CPUs, each of which
has its own memory. Multicomputers were developed because large multiprocessors are difficult to engineer and prohibitively expensive; they are universal in
cloud computing
Cloud computing is "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," according to International Organization for ...
because of the size of the machine needed. The different CPUs often need to send and receive messages to each other; to ensure good performance, the operating systems for these machines need to minimize this copying of
packets. Newer systems are often
multiqueue—separating groups of users into separate
queues—to reduce the need for packet copying and support more concurrent users. Another technique is
remote direct memory access, which enables each CPU to access memory belonging to other CPUs. Multicomputer operating systems often support
remote procedure call
In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared computer network), which is written as if it were a ...
s where a CPU can call a
procedure on another CPU, or
distributed shared memory, in which the operating system uses
virtualization
In computing, virtualization (abbreviated v12n) is a series of technologies that allows dividing of physical computing resources into a series of virtual machines, operating systems, processes or containers.
Virtualization began in the 1960s wit ...
to generate shared memory that does not physically exist.
Distributed systems
A
distributed system is a group of distinct,
networked computers—each of which might have their own operating system and file system. Unlike multicomputers, they may be dispersed anywhere in the world.
Middleware, an additional software layer between the operating system and applications, is often used to improve consistency. Although it functions similarly to an operating system, it is not a true operating system.
Embedded
Embedded operating systems are designed to be used in
embedded computer systems, whether they are
internet of things
Internet of things (IoT) describes devices with sensors, processing ability, software and other technologies that connect and exchange data with other devices and systems over the Internet or other communication networks. The IoT encompasse ...
objects or not connected to a network. Embedded systems include many household appliances. The distinguishing factor is that they do not load user-installed software. Consequently, they do not need protection between different applications, enabling simpler designs. Very small operating systems might run in less than 10
kilobytes, and the smallest are for
smart cards
A smart card (SC), chip card, or integrated circuit card (ICC or IC card), is a card used to control access to a resource. It is typically a plastic credit card-sized card with an Embedded system, embedded integrated circuit (IC) chip. Many smart ...
. Examples include
Embedded Linux,
QNX,
VxWorks
VxWorks is a real-time operating system (or RTOS) developed as proprietary software by Wind River Systems, a subsidiary of Aptiv. First released in 1987, VxWorks is designed for use in embedded systems requiring real-time, Deterministic system, ...
, and the extra-small systems
RIOT
A riot or mob violence is a form of civil disorder commonly characterized by a group lashing out in a violent public disturbance against authority, property, or people.
Riots typically involve destruction of property, public or private. The p ...
and
TinyOS.
Real-time
A
real-time operating system
A real-time operating system (RTOS) is an operating system (OS) for real-time computing applications that processes data and events that have critically defined time constraints. A RTOS is distinct from a time-sharing operating system, such as Unix ...
is an operating system that guarantees to process
events or data by or at a specific moment in time. Hard real-time systems require exact timing and are common in
manufacturing
Manufacturing is the creation or production of goods with the help of equipment, labor, machines, tools, and chemical or biological processing or formulation. It is the essence of the
secondary sector of the economy. The term may refer ...
,
avionics
Avionics (a portmanteau of ''aviation'' and ''electronics'') are the Electronics, electronic systems used on aircraft. Avionic systems include communications, Air navigation, navigation, the display and management of multiple systems, and the ...
, military, and other similar uses. With soft real-time systems, the occasional missed event is acceptable; this category often includes audio or multimedia systems, as well as smartphones. In order for hard real-time systems be sufficiently exact in their timing, often they are just a library with no protection between applications, such as
eCos.
Hypervisor
A
hypervisor is an operating system that runs a
virtual machine
In computing, a virtual machine (VM) is the virtualization or emulator, emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve ...
. The virtual machine is unaware that it is an application and operates as if it had its own hardware. Virtual machines can be paused, saved, and resumed, making them useful for operating systems research, development, and debugging. They also enhance portability by enabling applications to be run on a computer even if they are not compatible with the base operating system.
Library
A ''library operating system'' (libOS) is one in which the services that a typical operating system provides, such as networking, are provided in the form of
libraries
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
and composed with a single application and configuration code to construct a
unikernel:
a specialized (only the absolute necessary pieces of code are extracted from libraries and bound together
),
single address space, machine image that can be deployed to cloud or embedded environments.
The operating system code and application code are not executed in separated
protection domains (there is only a single application running, at least conceptually, so there is no need to prevent interference between applications) and OS services are accessed via simple library calls (potentially
inlining them based on compiler thresholds), without the usual overhead of
context switches,
in a way similarly to embedded and real-time OSes. Note that this overhead is not negligible: to the direct cost of mode switching it's necessary to add the indirect pollution of important processor structures (like
CPU cache
A CPU cache is a hardware cache used by the central processing unit (CPU) of a computer to reduce the average cost (time or energy) to access data from the main memory. A cache is a smaller, faster memory, located closer to a processor core, whi ...
s, the
instruction pipeline
In computer engineering, instruction pipelining is a technique for implementing instruction-level parallelism within a single processor. Pipelining attempts to keep every part of the processor busy with some instruction by dividing incoming Mac ...
, and so on) which affects both user-mode and kernel-mode performance.
History

The first computers in the late 1940s and 1950s were directly programmed either with
plugboards or with
machine code
In computer programming, machine code is computer code consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). For conventional binary computers, machine code is the binaryOn nonb ...
inputted on media such as
punch card
A punched card (also punch card or punched-card) is a stiff paper-based medium used to store digital information via the presence or absence of holes in predefined positions. Developed over the 18th to 20th centuries, punched cards were wide ...
s, without
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s or operating systems. After the introduction of the
transistor
A transistor is a semiconductor device used to Electronic amplifier, amplify or electronic switch, switch electrical signals and electric power, power. It is one of the basic building blocks of modern electronics. It is composed of semicondu ...
in the mid-1950s,
mainframe
A mainframe computer, informally called a mainframe or big iron, is a computer used primarily by large organizations for critical applications like bulk data processing for tasks such as censuses, industry and consumer statistics, enterpris ...
s began to be built. These still needed professional operators who manually do what a modern operating system would do, such as scheduling programs to run,
but mainframes still had rudimentary operating systems such as
Fortran Monitor System (FMS) and
IBSYS. In the 1960s,
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
introduced the first series of intercompatible computers (
System/360
The IBM System/360 (S/360) is a family of mainframe computer systems announced by IBM on April 7, 1964, and delivered between 1965 and 1978. System/360 was the first family of computers designed to cover both commercial and scientific applicati ...
). All of them ran the same operating system—
OS/360—which consisted of millions of lines of
assembly language
In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
that had thousands of
bugs. The OS/360 also was the first popular operating system to support
multiprogramming, such that the CPU could be put to use on one job while another was waiting on
input/output
In computing, input/output (I/O, i/o, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, such as another computer system, peripherals, or a human operator. Inputs a ...
(I/O). Holding multiple jobs in
memory
Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembe ...
necessitated memory partitioning and safeguards against one job accessing the memory allocated to a different one.
Around the same time,
teleprinter
A teleprinter (teletypewriter, teletype or TTY) is an electromechanical device that can be used to send and receive typed messages through various communications channels, in both point-to-point (telecommunications), point-to-point and point- ...
s began to be used as
terminals so multiple users could access the computer simultaneously. The operating system
MULTICS
Multics ("MULTiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of t ...
was intended to allow hundreds of users to access a large computer. Despite its limited adoption, it can be considered the precursor to
cloud computing
Cloud computing is "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," according to International Organization for ...
. The
UNIX
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
operating system originated as a development of MULTICS for a single user. Because UNIX's
source code
In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.
Since a computer, at base, only ...
was available, it became the basis of other, incompatible operating systems, of which the most successful were
AT&T
AT&T Inc., an abbreviation for its predecessor's former name, the American Telephone and Telegraph Company, is an American multinational telecommunications holding company headquartered at Whitacre Tower in Downtown Dallas, Texas. It is the w ...
's
System V and the
University of California
The University of California (UC) is a public university, public Land-grant university, land-grant research university, research university system in the U.S. state of California. Headquartered in Oakland, California, Oakland, the system is co ...
's
Berkeley Software Distribution
The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginn ...
(BSD). To increase compatibility, the
IEEE
The Institute of Electrical and Electronics Engineers (IEEE) is an American 501(c)(3) organization, 501(c)(3) public charity professional organization for electrical engineering, electronics engineering, and other related disciplines.
The IEEE ...
released the
POSIX
The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
standard for operating system
application programming interface
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
s (APIs), which is supported by most UNIX systems.
MINIX was a stripped-down version of UNIX, developed in 1987 for educational uses, that inspired the commercially available,
free software
Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
. Since 2008, MINIX is used in controllers of most
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
microchips, while Linux is widespread in
data center
A data center is a building, a dedicated space within a building, or a group of buildings used to house computer systems and associated components, such as telecommunications and storage systems.
Since IT operations are crucial for busines ...
s and
Android smartphones.
Microcomputers

The invention of
large scale integration enabled the production of
personal computer
A personal computer, commonly referred to as PC or computer, is a computer designed for individual use. It is typically used for tasks such as Word processor, word processing, web browser, internet browsing, email, multimedia playback, and PC ...
s (initially called
microcomputers) from around 1980. For around five years, the
CP/M
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
(Control Program for Microcomputers) was the most popular operating system for microcomputers. Later, IBM bought the
DOS (Disk Operating System) from
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
. After modifications requested by IBM, the resulting system was called
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
( Disk Operating System) and was widely used on IBM microcomputers. Later versions increased their sophistication, in part by borrowing features from UNIX.
Apple
An apple is a round, edible fruit produced by an apple tree (''Malus'' spp.). Fruit trees of the orchard or domestic apple (''Malus domestica''), the most widely grown in the genus, are agriculture, cultivated worldwide. The tree originated ...
's
Macintosh
Mac is a brand of personal computers designed and marketed by Apple Inc., Apple since 1984. The name is short for Macintosh (its official name until 1999), a reference to the McIntosh (apple), McIntosh apple. The current product lineup inclu ...
was the first popular computer to use a
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
(GUI). The GUI proved much more
user friendly
''User Friendly'' was a webcomic written by J. D. Frazer, also known by his pen name Illiad. Starting in 1997, the strip was one of the earliest webcomics to make its creator a living. The comic is set in a fictional internet service provider a ...
than the text-only
command-line interface
A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
earlier operating systems had used. Following the success of Macintosh, MS-DOS was updated with a GUI overlay called
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
. Windows later was rewritten as a stand-alone operating system, borrowing so many features from another (
VAX VMS) that a large
legal settlement was paid. In the twenty-first century, Windows continues to be popular on personal computers but has less
market share
Market share is the percentage of the total revenue or sales in a Market (economics), market that a company's business makes up. For example, if there are 50,000 units sold per year in a given industry, a company whose sales were 5,000 of those ...
of servers. UNIX operating systems, especially Linux, are the most popular on
enterprise systems and servers but are also used on
mobile device
A mobile device or handheld device is a computer small enough to hold and operate in hand. Mobile devices are typically battery-powered and possess a flat-panel display and one or more built-in input devices, such as a touchscreen or keypad. ...
s and many other computer systems.
On mobile devices,
Symbian OS was dominant at first, being usurped by
BlackBerry OS (introduced 2002) and
iOS for
iPhone
The iPhone is a line of smartphones developed and marketed by Apple that run iOS, the company's own mobile operating system. The first-generation iPhone was announced by then–Apple CEO and co-founder Steve Jobs on January 9, 2007, at ...
s (from 2007). Later on, the open-source
Android operating system (introduced 2008), with a Linux kernel and a C library (
Bionic) partially based on BSD code, became most popular.
Components
The components of an operating system are designed to ensure that various parts of a computer function cohesively. With the de facto obsoletion of
DOS, all user
software
Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications.
The history of software is closely tied to the development of digital comput ...
must interact with the operating system to access hardware.
Kernel

The kernel is the part of the operating system that provides
protection between different applications and users. This protection is key to improving reliability by keeping errors isolated to one program, as well as security by limiting the power of
malicious software
Malware (a portmanteau of ''malicious software'')Tahir, R. (2018)A study on malware and malware detection techniques . ''International Journal of Education and Management Engineering'', ''8''(2), 20. is any software intentionally designed to caus ...
and protecting private data, and ensuring that one program cannot monopolize the computer's resources. Most operating systems have two modes of operation: in
user mode
A modern computer operating system usually uses virtual memory to provide separate address spaces or regions of a single address space, called user space and kernel space. This separation primarily provides memory protection and hardware prote ...
, the hardware checks that the software is only executing legal instructions, whereas the kernel has
unrestricted powers and is not subject to these checks. The kernel also manages
memory
Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembe ...
for other processes and controls access to
input/output
In computing, input/output (I/O, i/o, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, such as another computer system, peripherals, or a human operator. Inputs a ...
devices.
Program execution
The operating system provides an interface between an application program and the computer hardware, so that an application program can interact with the hardware only by obeying rules and procedures programmed into the operating system. The operating system is also a set of services which simplify development and execution of application programs. Executing an application program typically involves the creation of a
process
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
* Business process, activities that produce a specific s ...
by the operating system
kernel, which assigns memory space and other resources, establishes a priority for the process in multi-tasking systems, loads program binary code into memory, and initiates execution of the application program, which then interacts with the user and with hardware devices. However, in some systems an application can request that the operating system execute another application within the same process, either as a subroutine or in a separate thread, e.g., the LINK and ATTACH facilities of
OS/360 and successors.
Interrupts
An
interrupt
In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
(also known as an
abort,
exception, ''fault'',
signal
A signal is both the process and the result of transmission of data over some media accomplished by embedding some variation. Signals are important in multiple subject fields including signal processing, information theory and biology.
In ...
,
or ''trap'')
provides an efficient way for most operating systems to react to the environment. Interrupts cause the
central processing unit
A central processing unit (CPU), also called a central processor, main processor, or just processor, is the primary Processor (computing), processor in a given computer. Its electronic circuitry executes Instruction (computing), instructions ...
(CPU) to have a
control flow
In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an '' ...
change away from the currently running program to an
interrupt handler
In computer systems programming, an interrupt handler, also known as an interrupt service routine (ISR), is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, software ...
, also known as an interrupt service routine (ISR).
An interrupt service routine may cause the
central processing unit
A central processing unit (CPU), also called a central processor, main processor, or just processor, is the primary Processor (computing), processor in a given computer. Its electronic circuitry executes Instruction (computing), instructions ...
(CPU) to have a
context switch.
The details of how a computer processes an interrupt vary from architecture to architecture, and the details of how interrupt service routines behave vary from operating system to operating system.
However, several interrupt functions are common.
The architecture and operating system must:
# transfer control to an interrupt service routine.
# save the state of the currently running process.
# restore the state after the interrupt is serviced.
=Software interrupt
=
A software interrupt is a message to a
process
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
* Business process, activities that produce a specific s ...
that an event has occurred.
This contrasts with a ''hardware interrupt'' — which is a message to the
central processing unit
A central processing unit (CPU), also called a central processor, main processor, or just processor, is the primary Processor (computing), processor in a given computer. Its electronic circuitry executes Instruction (computing), instructions ...
(CPU) that an event has occurred.
Software interrupts are similar to hardware interrupts — there is a change away from the currently running process.
Similarly, both hardware and software interrupts execute an
interrupt service routine.
Software interrupts may be normally occurring events. It is expected that a
time slice
In computing, preemption is the act performed by an external scheduler — without assistance or cooperation from the task — of temporarily interrupting an executing task, with the intention of resuming it at a later time. This preemptive s ...
will occur, so the kernel will have to perform a
context switch.
A
computer program
A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. It is one component of software, which also includes software documentation, documentation and other intangibl ...
may set a timer to go off after a few seconds in case too much data causes an algorithm to take too long.
Software interrupts may be error conditions, such as a malformed
machine instruction.
However, the most common error conditions are
division by zero
In mathematics, division by zero, division (mathematics), division where the divisor (denominator) is 0, zero, is a unique and problematic special case. Using fraction notation, the general example can be written as \tfrac a0, where a is the di ...
and
accessing an invalid memory address.
Users can send messages to the kernel to modify the behavior of a currently running process.
For example, in the
command-line environment, pressing the ''interrupt character'' (usually
Control-C
Control-C is a common command (computing), computer command. It is generated by holding down the key and typing the key.
In graphical user interface environments, control+C is often used to Cut, copy and paste, copy highlighted text to the Cl ...
) might terminate the currently running process.
To generate ''software interrupts'' for
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
CPUs, the
INT assembly language
In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
instruction is available.
The syntax is
INT X
, where
X
is the offset number (in
hexadecimal
Hexadecimal (also known as base-16 or simply hex) is a Numeral system#Positional systems in detail, positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbo ...
format) to the
interrupt vector table.
=Signal
=
To generate ''software interrupts'' in
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating systems, the
kill(pid,signum)
system call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
will send a
signal
A signal is both the process and the result of transmission of data over some media accomplished by embedding some variation. Signals are important in multiple subject fields including signal processing, information theory and biology.
In ...
to another process.
pid
is the
process identifier
In computing, the process identifier (a.k.a. process ID or PID) is a number used by most operating system kernel (operating system), kernels—such as those of Unix, macOS and Windows—to uniquely identify an active Process (computing), process. ...
of the receiving process.
signum
is the signal number (in
mnemonic
A mnemonic device ( ), memory trick or memory device is any learning technique that aids information retention or retrieval in the human memory, often by associating the information with something that is easier to remember.
It makes use of e ...
format) to be sent. (The abrasive name of
kill
was chosen because early implementations only terminated the process.)
In Unix-like operating systems, ''signals'' inform processes of the occurrence of asynchronous events.
To communicate asynchronously, interrupts are required.
One reason a process needs to asynchronously communicate to another process solves a variation of the classic
reader/writer problem.
The writer receives a pipe from the
shell
Shell may refer to:
Architecture and design
* Shell (structure), a thin structure
** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses
Science Biology
* Seashell, a hard outer layer of a marine ani ...
for its output to be sent to the reader's input stream.
The
command-line syntax is
alpha , bravo
.
alpha
will write to the pipe when its computation is ready and then sleep in the wait queue.
bravo
will then be moved to the
ready queue and soon will read from its input stream.
The kernel will generate ''software interrupts'' to coordinate the piping.
''Signals'' may be classified into 7 categories.
The categories are:
# when a process finishes normally.
# when a process has an error exception.
# when a process runs out of a system resource.
# when a process executes an illegal instruction.
# when a process sets an alarm event.
# when a process is aborted from the keyboard.
# when a process has a tracing alert for debugging.
=Hardware interrupt
=
Input/output
In computing, input/output (I/O, i/o, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, such as another computer system, peripherals, or a human operator. Inputs a ...
(I/O)
devices are slower than the CPU. Therefore, it would slow down the computer if the CPU had to
wait for each I/O to finish. Instead, a computer may implement interrupts for I/O completion, avoiding the need for
polling or busy waiting.
Some computers require an interrupt for each character or word, costing a significant amount of CPU time.
Direct memory access
Direct memory access (DMA) is a feature of computer systems that allows certain hardware subsystems to access main system computer memory, memory independently of the central processing unit (CPU).
Without DMA, when the CPU is using programmed i ...
(DMA) is an architecture feature to allow devices to bypass the CPU and access
main memory
Computer data storage or digital data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers.
The central processin ...
directly.
(Separate from the architecture, a device may perform direct memory access to and from main memory either directly or via a bus.)
[
]
Input/output
=Interrupt-driven I/O
=
When a
computer user
A user is a person who uses a computer or Computer network, network Service (systems architecture), service.
A user often has a user account and is identified to the system by a username (or user name).
Some software products provide serv ...
types a key on the keyboard, typically the character appears immediately on the screen. Likewise, when a user moves a
mouse
A mouse (: mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus'' ...
, the
cursor immediately moves across the screen. Each keystroke and mouse movement generates an ''interrupt'' called ''Interrupt-driven I/O''. An interrupt-driven I/O occurs when a process causes an interrupt for every character
or word transmitted.
=Direct memory access
=
Devices such as
hard disk drive
A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating hard disk drive platter, pla ...
s,
solid-state drives, and
magnetic tape
Magnetic tape is a medium for magnetic storage made of a thin, magnetizable coating on a long, narrow strip of plastic film. It was developed in Germany in 1928, based on the earlier magnetic wire recording from Denmark. Devices that use magnetic ...
drives can transfer data at a rate high enough that interrupting the CPU for every byte or word transferred, and having the CPU transfer the byte or word between the device and memory, would require too much CPU time. Data is, instead, transferred between the device and memory independently of the CPU by hardware such as a
channel or a
direct memory access
Direct memory access (DMA) is a feature of computer systems that allows certain hardware subsystems to access main system computer memory, memory independently of the central processing unit (CPU).
Without DMA, when the CPU is using programmed i ...
controller; an interrupt is delivered only when all the data is transferred.
If a
computer program
A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. It is one component of software, which also includes software documentation, documentation and other intangibl ...
executes a
system call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
to perform a block I/O ''write'' operation, then the system call might execute the following instructions:
* Set the contents of the CPU's
registers (including the
program counter
The program counter (PC), commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR), the instruction counter, or just part of the instruction sequencer, ...
) into the
process control block.
* Create an entry in the device-status table.
The operating system maintains this table to keep track of which processes are waiting for which devices. One field in the table is the
memory address
In computing, a memory address is a reference to a specific memory location in memory used by both software and hardware. These addresses are fixed-length sequences of digits, typically displayed and handled as unsigned integers. This numeric ...
of the process control block.
* Place all the characters to be sent to the device into a
memory buffer.
* Set the memory address of the memory buffer to a predetermined device register.
* Set the buffer size (an integer) to another predetermined register.
* Execute the
machine instruction to begin the writing.
* Perform a
context switch to the next process in the
ready queue.
While the writing takes place, the operating system will context switch to other processes as normal. When the device finishes writing, the device will ''interrupt'' the currently running process by ''asserting'' an
interrupt request
In a computer, an interrupt request (or IRQ) is a hardware signal sent to the processor that temporarily stops a running program and allows a special program, an interrupt handler, to run instead. Hardware interrupts are used to handle events s ...
. The device will also place an integer onto the data bus.
Upon accepting the interrupt request, the operating system will:
* Push the contents of the
program counter
The program counter (PC), commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR), the instruction counter, or just part of the instruction sequencer, ...
(a register) followed by the
status register
A status register, flag register, or condition code register (CCR) is a collection of status Flag (computing), flag bits for a Central processing unit, processor. Examples of such registers include FLAGS register (computing), FLAGS register in the ...
onto the
call stack
In computer science, a call stack is a Stack (abstract data type), stack data structure that stores information about the active subroutines and block (programming), inline blocks of a computer program. This type of stack is also known as an exe ...
.
* Push the contents of the other registers onto the call stack. (Alternatively, the contents of the registers may be placed in a system table.)
* Read the integer from the data bus. The integer is an offset to the
interrupt vector table. The vector table's instructions will then:
:* Access the device-status table.
:* Extract the process control block.
:* Perform a context switch back to the writing process.
When the writing process has its
time slice
In computing, preemption is the act performed by an external scheduler — without assistance or cooperation from the task — of temporarily interrupting an executing task, with the intention of resuming it at a later time. This preemptive s ...
expired, the operating system will:
* Pop from the call stack the registers other than the status register and program counter.
* Pop from the call stack the status register.
* Pop from the call stack the address of the next instruction, and set it back into the program counter.
With the program counter now reset, the interrupted process will resume its time slice.
Memory management
Among other things, a multiprogramming operating system
kernel must be responsible for managing all system memory which is currently in use by the programs. This ensures that a program does not interfere with memory already in use by another program. Since programs time share, each program must have independent access to memory.
Cooperative memory management, used by many early operating systems, assumes that all programs make voluntary use of the
kernel's memory manager, and do not exceed their allocated memory. This system of memory management is almost never seen anymore, since programs often contain bugs which can cause them to exceed their allocated memory. If a program fails, it may cause memory used by one or more other programs to be affected or overwritten. Malicious programs or viruses may purposefully alter another program's memory, or may affect the operation of the operating system itself. With cooperative memory management, it takes only one misbehaved program to
crash the system.
Memory protection enables the
kernel to limit a process' access to the computer's memory. Various methods of memory protection exist, including
memory segmentation and
paging
In computer operating systems, memory paging is a memory management scheme that allows the physical Computer memory, memory used by a program to be non-contiguous. This also helps avoid the problem of memory fragmentation and requiring compact ...
. All methods require some level of hardware support (such as the
80286 MMU), which does not exist in all computers.
In both segmentation and paging, certain
protected mode
In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units (CPUs). It allows system software to use features such as Memory_segmentation, segmentation, virtual mem ...
registers specify to the CPU what memory address it should allow a running program to access. Attempts to access other addresses trigger an interrupt, which causes the CPU to re-enter
supervisor mode, placing the
kernel in charge. This is called a
segmentation violation or Seg-V for short, and since it is both difficult to assign a meaningful result to such an operation, and because it is usually a sign of a misbehaving program, the
kernel generally resorts to terminating the offending program, and reports the error.
Windows versions 3.1 through ME had some level of memory protection, but programs could easily circumvent the need to use it. A
general protection fault would be produced, indicating a segmentation violation had occurred; however, the system would often crash anyway.
Virtual memory

The use of virtual memory addressing (such as paging or segmentation) means that the kernel can choose what memory each program may use at any given time, allowing the operating system to use the same memory locations for multiple tasks.
If a program tries to access memory that is not accessible memory, but nonetheless has been allocated to it, the kernel is interrupted . This kind of interrupt is typically a
page fault
In computing, a page fault is an exception that the memory management unit (MMU) raises when a process accesses a memory page without proper preparations. Accessing the page requires a mapping to be added to the process's virtual address space ...
.
When the kernel detects a page fault it generally adjusts the virtual memory range of the program which triggered it, granting it access to the memory requested. This gives the kernel discretionary power over where a particular application's memory is stored, or even whether or not it has been allocated yet.
In modern operating systems, memory which is accessed less frequently can be temporarily stored on a disk or other media to make that space available for use by other programs. This is called
swapping, as an area of memory can be used by multiple programs, and what that memory area contains can be swapped or exchanged on demand.
Virtual memory provides the programmer or the user with the perception that there is a much larger amount of RAM in the computer than is really there.
Concurrency
Concurrency refers to the operating system's ability to carry out multiple tasks simultaneously. Virtually all modern operating systems support concurrency.
Threads enable splitting a process' work into multiple parts that can run simultaneously. The number of threads is not limited by the number of processors available. If there are more threads than processors, the operating system
kernel schedules, suspends, and resumes threads, controlling when each thread runs and how much CPU time it receives. During a
context switch a running thread is suspended, its state is saved into the
thread control block and stack, and the state of the new thread is loaded in. Historically, on many systems a thread could run until it relinquished control (
cooperative multitasking
Cooperative multitasking, also known as non-preemptive multitasking, is a computer multitasking technique in which the operating system never initiates a context switch from a running Process (computing), process to another process. Instead, in o ...
). Because this model can allow a single thread to monopolize the processor, most operating systems now can
interrupt
In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
a thread (
preemptive multitasking).
Threads have their own thread ID,
program counter
The program counter (PC), commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR), the instruction counter, or just part of the instruction sequencer, ...
(PC), a
register set, and a
stack, but share code,
heap data, and other resources with other threads of the same process. Thus, there is less overhead to create a thread than a new process. On single-CPU systems, concurrency is switching between processes. Many computers have multiple CPUs.
Parallelism with multiple threads running on different CPUs can speed up a program, depending on how much of it can be executed concurrently.
File system

Permanent storage devices used in twenty-first century computers, unlike
volatile dynamic random-access memory
Dynamics (from Greek language, Greek δυναμικός ''dynamikos'' "powerful", from δύναμις ''dynamis'' "power (disambiguation), power") or dynamic may refer to:
Physics and engineering
* Dynamics (mechanics), the study of forces and t ...
(DRAM), are still accessible after a
crash or
power failure
A power outage, also called a blackout, a power failure, a power blackout, a power loss, a power cut, or a power out is the complete loss of the electrical power network supply to an end user.
There are many causes of power failures in an el ...
. Permanent (
non-volatile
Non-volatile memory (NVM) or non-volatile storage is a type of computer memory that can retain stored information even after power is removed. In contrast, volatile memory needs constant power in order to retain data.
Non-volatile memory typ ...
) storage is much cheaper per byte, but takes several orders of magnitude longer to access, read, and write. The two main technologies are a
hard drive
A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating hard disk drive platter, pla ...
consisting of
magnetic disks, and
flash memory
Flash memory is an Integrated circuit, electronic Non-volatile memory, non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for t ...
(a
solid-state drive that stores data in electrical circuits). The latter is more expensive but faster and more durable.
File systems are an
abstraction
Abstraction is a process where general rules and concepts are derived from the use and classifying of specific examples, literal (reality, real or Abstract and concrete, concrete) signifiers, first principles, or other methods.
"An abstraction" ...
used by the operating system to simplify access to permanent storage. They provide human-readable
filenames
A filename or file name is a name used to uniquely identify a computer file in a file system. Different file systems impose different restrictions on filename lengths.
A filename may (depending on the file system) include:
* name – base ...
and other
metadata
Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive ...
, increase performance via
amortization of accesses, prevent multiple threads from accessing the same section of memory, and include
checksums to identify
corruption
Corruption is a form of dishonesty or a criminal offense that is undertaken by a person or an organization that is entrusted in a position of authority to acquire illicit benefits or abuse power for one's gain. Corruption may involve activities ...
. File systems are composed of files (named collections of data, of an arbitrary size) and
directories (also called folders) that list human-readable filenames and other directories. An absolute
file path begins at the
root directory
In a Computing, computer file system, and primarily used in the Unix and Unix-like operating systems, the root directory is the first or top-most Directory (computing), directory in a hierarchy. It can be likened to the trunk of a Tree (data st ...
and lists
subdirectories divided by punctuation, while a relative path defines the location of a file from a directory.
System call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
s (which are sometimes
wrapped by libraries) enable applications to create, delete, open, and close files, as well as link, read, and write to them. All these operations are carried out by the operating system on behalf of the application. The operating system's efforts to reduce latency include storing recently requested blocks of memory in a
cache and
prefetching data that the application has not asked for, but might need next.
Device driver
In the context of an operating system, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabli ...
s are software specific to each
input/output
In computing, input/output (I/O, i/o, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, such as another computer system, peripherals, or a human operator. Inputs a ...
(I/O) device that enables the operating system to work without modification over different hardware.
Another component of file systems is a
dictionary
A dictionary is a listing of lexemes from the lexicon of one or more specific languages, often arranged Alphabetical order, alphabetically (or by Semitic root, consonantal root for Semitic languages or radical-and-stroke sorting, radical an ...
that maps a file's name and metadata to the
data block where its contents are stored. Most file systems use directories to convert file names to file numbers. To find the block number, the operating system uses an
index
Index (: indexes or indices) may refer to:
Arts, entertainment, and media Fictional entities
* Index (''A Certain Magical Index''), a character in the light novel series ''A Certain Magical Index''
* The Index, an item on the Halo Array in the ...
(often implemented as a
tree
In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, e.g., including only woody plants with secondary growth, only ...
). Separately, there is a free space
map to track free blocks, commonly implemented as a
bitmap
In computing, a bitmap (also called raster) graphic is an image formed from rows of different colored pixels. A GIF is an example of a graphics image file that uses a bitmap.
As a noun, the term "bitmap" is very often used to refer to a partic ...
. Although any free block can be used to store a new file, many operating systems try to group together files in the same directory to maximize performance, or periodically reorganize files to reduce
fragmentation.
Maintaining data reliability in the face of a computer crash or hardware failure is another concern. File writing protocols are designed with atomic operations so as not to leave permanent storage in a partially written, inconsistent state in the event of a crash at any point during writing. Data corruption is addressed by redundant storage (for example, RAID—
redundant array of inexpensive disks) and
checksums to detect when data has been corrupted. With multiple layers of checksums and backups of a file, a system can recover from multiple hardware failures. Background processes are often used to detect and recover from data corruption.
Security
Security means protecting users from other users of the same computer, as well as from those who seeking remote access to it over a network. Operating systems security rests on achieving the
CIA triad: confidentiality (unauthorized users cannot access data), integrity (unauthorized users cannot modify data), and availability (ensuring that the system remains available to authorized users, even in the event of a
denial of service attack). As with other computer systems, isolating
security domains—in the case of operating systems, the kernel, processes, and
virtual machine
In computing, a virtual machine (VM) is the virtualization or emulator, emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve ...
s—is key to achieving security. Other ways to increase security include simplicity to minimize the
attack surface
The attack surface of a software environment is the sum of the different points (for " attack vectors") where an unauthorized user (the "attacker") can try to enter data to, extract data, control a device or critical software in an environment. Ke ...
, locking access to resources by default, checking all requests for authorization,
principle of least authority (granting the minimum privilege essential for performing a task),
privilege separation
Privilege may refer to:
Arts and entertainment
* Privilege (film), ''Privilege'' (film), a 1967 film directed by Peter Watkins
* Privilege (Ivor Cutler album), ''Privilege'' (Ivor Cutler album), 1983
* Privilege (Television Personalities album ...
, and reducing shared data.
Some operating system designs are more secure than others. Those with no isolation between the kernel and applications are least secure, while those with a
monolithic kernel
A monolithic kernel is an operating system software architecture, architecture with the entire operating system running in kernel space. The monolithic model differs from other architectures such as the microkernel in that it alone defines a high ...
like most general-purpose operating systems are still vulnerable if any part of the kernel is compromised. A more secure design features
microkernel
In computer science, a microkernel (often abbreviated as μ-kernel) is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, ...
s that separate the kernel's privileges into many separate security domains and reduce the consequences of a single kernel breach.
Unikernels are another approach that improves security by minimizing the kernel and separating out other operating systems functionality by application.
Most operating systems are written in
C or
C++, which create potential vulnerabilities for exploitation. Despite attempts to protect against them, vulnerabilities are caused by
buffer overflow attacks, which are enabled by the lack of
bounds checking
In computer programming, bounds checking is any method of detecting whether a variable is within some bounds before it is used. It is usually used to ensure that a number fits into a given type (range checking), or that a variable being used as ...
. Hardware vulnerabilities, some of them
caused by CPU optimizations, can also be used to compromise the operating system. There are known instances of operating system programmers deliberately implanting vulnerabilities, such as
back doors.
Operating systems security is hampered by their increasing complexity and the resulting inevitability of bugs. Because
formal verification
In the context of hardware and software systems, formal verification is the act of proving or disproving the correctness of a system with respect to a certain formal specification or property, using formal methods of mathematics.
Formal ver ...
of operating systems may not be feasible, developers use operating system
hardening to reduce vulnerabilities, e.g.
address space layout randomization,
control-flow integrity,
access restrictions, and other techniques. There are no restrictions on who can contribute code to open source operating systems; such operating systems have transparent change histories and distributed governance structures. Open source developers strive to work collaboratively to find and eliminate security vulnerabilities, using
code review
Code review (sometimes referred to as peer review) is a software quality assurance activity in which one or more people examine the source code of a computer program, either after implementation or during the development process. The persons perf ...
and
type checking
In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a ''type'' (for example, integer, floating point, string) to every '' term'' (a word, phrase, or other set of symbols). Usu ...
to expunge malicious code.
Andrew S. Tanenbaum advises releasing the
source code
In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.
Since a computer, at base, only ...
of all operating systems, arguing that it prevents developers from placing trust in secrecy and thus relying on the unreliable practice of
security by obscurity.
User interface
A
user interface
In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction is to allow effective operation and control of the machine fro ...
(UI) is essential to support human interaction with a computer. The two most common user interface types for any computer are
*
command-line interface
A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
, where computer commands are typed, line-by-line,
*
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
(GUI) using a visual environment, most commonly a combination of the window, icon, menu, and pointer elements, also known as
WIMP.
For personal computers, including
smartphone
A smartphone is a mobile phone with advanced computing capabilities. It typically has a touchscreen interface, allowing users to access a wide range of applications and services, such as web browsing, email, and social media, as well as multi ...
s and
tablet computer
A tablet computer, commonly shortened to tablet, is a mobile device, typically with a mobile operating system and touchscreen display processing circuitry, and a rechargeable battery in a single, thin and flat package. Tablets, being computers ...
s, and for
workstation
A workstation is a special computer designed for technical or computational science, scientific applications. Intended primarily to be used by a single user, they are commonly connected to a local area network and run multi-user operating syste ...
s, user input is typically from a combination of
keyboard,
mouse
A mouse (: mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus'' ...
, and
trackpad or
touchscreen
A touchscreen (or touch screen) is a type of electronic visual display, display that can detect touch input from a user. It consists of both an input device (a touch panel) and an output device (a visual display). The touch panel is typically l ...
, all of which are connected to the operating system with specialized software. Personal computer users who are not software developers or coders often prefer GUIs for both input and output; GUIs are supported by most personal computers. The software to support GUIs is more complex than a command line for input and plain text output. Plain text output is often preferred by programmers, and is easy to support.
Operating system development as a hobby
A hobby operating system may be classified as one whose code has not been directly derived from an existing operating system, and has few users and active developers.
In some cases, hobby development is in support of a "
homebrew" computing device, for example, a simple
single-board computer powered by a
6502 microprocessor. Or, development may be for an architecture already in widespread use. Operating system development may come from entirely new concepts, or may commence by modeling an existing operating system. In either case, the hobbyist is her/his own developer, or may interact with a small and sometimes unstructured group of individuals who have like interests.
Examples of hobby operating systems include
Syllable
A syllable is a basic unit of organization within a sequence of speech sounds, such as within a word, typically defined by linguists as a ''nucleus'' (most often a vowel) with optional sounds before or after that nucleus (''margins'', which are ...
and
TempleOS.
Diversity of operating systems and portability
If an application is written for use on a specific operating system, and is
ported to another OS, the functionality required by that application may be implemented differently by that OS (the names of functions, meaning of arguments, etc.) requiring the application to be adapted, changed, or otherwise
maintained.
This cost in supporting operating systems diversity can be avoided by instead writing applications against
software platforms such as
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
or
Qt. These abstractions have already borne the cost of adaptation to specific operating systems and their
system libraries.
Another approach is for operating system vendors to adopt standards. For example,
POSIX
The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
and
OS abstraction layers provide commonalities that reduce porting costs.
Popular operating systems
,
Android (based on the Linux kernel) is the most popular operating system with a 46% market share, followed by
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
at 26%,
iOS and
iPadOS at 18%,
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
at 5%, and
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
at 1%. Android, iOS, and iPadOS are
mobile operating system
A mobile operating system is an operating system used for smartphones, tablets, smartwatches, smartglasses, or other non-laptop personal mobile computing devices. While computers such as laptops are "mobile", the operating systems used on the ...
s, while Windows, macOS, and Linux are desktop operating systems.
Linux
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
is a
free software
Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
distributed under the
GNU General Public License
The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
(GPL), which means that all of its derivatives are legally required to release their
source code
In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.
Since a computer, at base, only ...
. Linux was designed by programmers for their own use, thus emphasizing simplicity and consistency, with a small number of basic elements that can be combined in nearly unlimited ways, and avoiding redundancy.
Its design is similar to other UNIX systems not using a
microkernel
In computer science, a microkernel (often abbreviated as μ-kernel) is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, ...
. It is written in
C and uses
UNIX System V syntax, but also supports
BSD
The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginni ...
syntax. Linux supports standard UNIX networking features, as well as the full suite of UNIX tools, while
supporting multiple users and employing
preemptive multitasking. Initially of a minimalist design, Linux is a flexible system that can work in under 16
MB of
RAM, but still is used on large
multiprocessor
Multiprocessing (MP) is the use of two or more central processing units (CPUs) within a single computer system. The term also refers to the ability of a system to support more than one processor or the ability to allocate tasks between them. The ...
systems. Similar to other UNIX systems, Linux
distributions are composed of a
kernel,
system libraries, and
system utilities. Linux has a
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
(GUI) with a desktop, folder and file icons, as well as the option to access the operating system via a
command line.
Android is a partially open-source operating system closely based on Linux and has become the most widely used operating system by users, due to its popularity on
smartphones
A smartphone is a mobile phone with advanced computing capabilities. It typically has a touchscreen interface, allowing users to access a wide range of applications and services, such as web browsing, email, and social media, as well as mult ...
and, to a lesser extent,
embedded system
An embedded system is a specialized computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is e ...
s needing a GUI, such as "
smart watches,
automotive dashboards, airplane seatbacks,
medical devices
A medical device is any device intended to be used for medical purposes. Significant potential for hazards are inherent when using a device for medical purposes and thus medical devices must be proved safe and effective with reasonable assura ...
, and
home appliance
A home appliance, also referred to as a domestic appliance, an electric appliance or a household appliance, is a machine which assists in household functions such as cooking, cleaning and food preservation.
The domestic application attached to ...
s". Unlike Linux, much of Android is written in
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
and uses
object-oriented design
Object-oriented analysis and design (OOAD) is a technical approach for analyzing and designing an application, system, or business by applying object-oriented programming, as well as using visual modeling throughout the software development proc ...
.
Microsoft Windows

Windows is a
proprietary operating system that is widely used on desktop computers, laptops, tablets, phones,
workstation
A workstation is a special computer designed for technical or computational science, scientific applications. Intended primarily to be used by a single user, they are commonly connected to a local area network and run multi-user operating syste ...
s,
enterprise servers, and
Xbox
Xbox is a video gaming brand that consists of four main home video game console lines, as well as application software, applications (games), the streaming media, streaming service Xbox Cloud Gaming, and online services such as the Xbox networ ...
consoles. The operating system was designed for "security, reliability, compatibility, high performance, extensibility, portability, and international support"—later on,
energy efficiency and support for
dynamic devices also became priorities.
Windows Executive works via
kernel-mode objects for important data structures like processes, threads, and sections (memory objects, for example files). The operating system supports
demand paging of
virtual memory
In computing, virtual memory, or virtual storage, is a memory management technique that provides an "idealized abstraction of the storage resources that are actually available on a given machine" which "creates the illusion to users of a ver ...
, which speeds up I/O for many applications. I/O
device drivers use the
Windows Driver Model
In computing, the Windows Driver Model (WDM) also known at one point as the Win32 Driver Model is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows su ...
. The
NTFS
NT File System (NTFS) (commonly called ''New Technology File System'') is a proprietary journaling file system developed by Microsoft in the 1990s.
It was developed to overcome scalability, security and other limitations with File Allocation Tabl ...
file system has a master table and each file is represented as a
record with
metadata
Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive ...
. The scheduling includes
preemptive multitasking. Windows has many security features; especially important are the use of
access-control lists and
integrity levels. Every process has an authentication token and each object is given a security descriptor. Later releases have added even more security features.
See also
*
Comparison of operating systems
*
DBOS
DBOS (Database-Oriented Operating System) is a database-oriented operating system meant to simplify and improve the scalability, security and resilience of large-scale distributed applications. It started in 2020 as a joint open source project with ...
*
Interruptible operating system
*
List of operating systems
*
List of pioneers in computer science
*
Glossary of operating systems terms
*
Microcontroller
A microcontroller (MC, uC, or μC) or microcontroller unit (MCU) is a small computer on a single integrated circuit. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Pro ...
*
Network operating system
*
Object-oriented operating system
*
Lisp machine
*
Operating System Projects
*
System Commander
*
System image
*
Timeline of operating systems
Notes
References
Further reading
*
*
*
*
*
*
* O'Brien, J. A., & Marakas, G. M.(2011). ''Management Information Systems''. 10e. McGraw-Hill Irwin.
*
*
*
*
External links
Multics Historyand the history of operating systems
{{Authority control