For hardware functions such asinput and output andmemory allocation, the operating system acts as an intermediary between programs and the computer hardware,[1][2] although the application code is usually executed directly by the hardware and frequently makessystem calls to an OS function or isinterrupted by it. Operating systems are found on many devices that contain a computer – from cellular phones and video game consoles toweb servers andsupercomputers.
As of November 2025[update],Android is the most popular operating system with a 38% market share, followed byMicrosoft Windows at 33%,iOS andiPadOS at 15%,macOS at 4%, andLinux at 1%. Android, iOS, and iPadOS are operating systems for mobile devices such as smartphones, while Windows, macOS, and Linux are for desktop computers.[3]Linux distributions are dominant in the server and supercomputing sectors. Other specialized classes of operating systems (special-purpose operating systems),[4][5] such asembedded and real-time systems, exist for many applications.Security-focused operating systems 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 aUSB stick).
Definition and purpose
An operating system is difficult to define,[6] but has been called "thelayer of software that manages a computer's resources for its users and theirapplications".[7] Operating systems include the software that is always running, called akernel—but can include other software as well.[6][8] The two other types of programs that can run on a computer aresystem programs—which are associated with the operating system, but may not be part of the kernel—and applications—all other software.[8]
There are three main purposes that an operating system fulfills:[9]
Operating systems allocate resources between different applications, deciding when they will receivecentral processing unit (CPU) time or space inmemory.[9] On modernpersonal computers, 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).[10][11] 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.[12]
Operating systems provide an interface that abstracts the details of accessinghardware details (such as physical memory) to make things easier for programmers.[9][13]Virtualization also enables the operating system to mask limited hardware resources; for example,virtual memory can provide a program with the illusion of nearly unlimited memory that exceeds the computer's actual memory.[14]
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.[15] Which services to include in an operating system varies greatly, and this functionality makes up the great majority of code for most operating systems.[16]
Types of operating systems
Multicomputer operating systems
Withmultiprocessors multiple CPUs share memory. Amulticomputer orcluster computer has multiple CPUs, each of whichhas its own memory. Multicomputers were developed because large multiprocessors are difficult to engineer and prohibitively expensive;[17] they are universal incloud computing because of the size of the machine needed.[18] The different CPUs often need to send and receive messages to each other;[19] to ensure good performance, the operating systems for these machines need to minimize this copying ofpackets.[20] Newer systems are oftenmultiqueue—separating groups of users into separatequeues—to reduce the need for packet copying and support more concurrent users.[21] Another technique isremote direct memory access, which enables each CPU to access memory belonging to other CPUs.[19] Multicomputer operating systems often supportremote procedure calls where a CPU can call aprocedure on another CPU,[22] ordistributed shared memory, in which the operating system usesvirtualization to generate shared memory that does not physically exist.[23]
Distributed systems
Adistributed 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.[24]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.[25]
Embedded
Embedded operating systems are designed to be used inembedded computer systems, whether they areinternet of things 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 10kilobytes,[26] and the smallest are forsmart cards.[27] Examples includeEmbedded Linux,QNX,VxWorks, and the extra-small systemsRIOT andTinyOS.[28]
Real-time
Areal-time operating system is an operating system that guarantees to processevents or data by or at a specific moment in time. Hard real-time systems require exact timing and are common inmanufacturing,avionics, military, and other similar uses.[28] With soft real-time systems, the occasional missed event is acceptable; this category often includes audio or multimedia systems, as well as smartphones.[28] 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 aseCos.[28]
Hypervisor
Ahypervisor is an operating system that runs avirtual machine. The virtual machine is an application that emulates hardware; in other words, it operates as much as possible like the actual hardware the operating system was designed to run on.[14][29] Virtual machines can be paused, saved, and resumed, making them useful for operating systems research, development,[30] and debugging.[31] They also enhance portability by enabling applications to be run on a computer even if they are not compatible with the base operating system.[14]
Library
Alibrary operating system (libOS) is one in which the services that a typical operating system provides, such as networking, are provided in the form oflibraries and composed with a single application and configuration code to construct aunikernel:[32] a specialized (only the absolute necessary pieces of code are extracted from libraries and bound together[33]),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 separatedprotection 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 (potentiallyinlining them based on compiler thresholds), without the usual overhead ofcontext switches,[34] in a way similarly to embedded and real-time OSes. This overhead is not negligible: to the direct cost of mode switching it's necessary to add the indirect pollution of important processor structures (likeCPU caches, theinstruction pipeline, and so on) which affects both user-mode and kernel-mode performance.[35]
IBM System/360 Model 50 operator's console and CPU; the operator's console is aterminal used by the operating system to communicate with the operator.
The first computers in the late 1940s and 1950s were directly programmed either withplugboards or withmachine code inputted on media such aspunch cards, withoutprogramming languages or operating systems.[36] After the introduction of thetransistor in the mid-1950s,mainframes began to be built. These still needed professional operators[36] who manually do what a modern operating system would do, such as scheduling programs to run,[37] but mainframes still had rudimentary operating systems such asFortran Monitor System (FMS) andIBSYS.[38] In the 1960s,IBM introduced the first series of intercompatible computers (System/360). All of them ran the same operating system—OS/360—which consisted of millions of lines ofassembly language that had thousands ofbugs. The OS/360 also was the first popular operating system to supportmultiprogramming, such that the CPU could be put to use on one job while another was waiting oninput/output (I/O). Holding multiple jobs inmemory necessitated memory partitioning and safeguards against one job accessing the memory allocated to a different one.[39]
Around the same time,teleprinters began to be used asterminals so multiple users could access the computer simultaneously. The operating systemMULTICS was intended to allow hundreds of users to access a large computer. Despite its limited adoption, it can be considered the precursor tocloud computing. TheUNIX operating system originated as a development of MULTICS for a single user.[40] Because UNIX'ssource code was available, it became the basis of other, incompatible operating systems, of which the most successful wereAT&T'sSystem V and theUniversity of California'sBerkeley Software Distribution (BSD).[41] To increase compatibility, theIEEE released thePOSIX standard for operating systemapplication programming interfaces (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 softwareLinux. Since 2008, MINIX is used in controllers of mostIntelmicrochips, while Linux is widespread indata centers andAndroid smartphones.[42]
The invention oflarge scale integration enabled the production ofpersonal computers (initially calledmicrocomputers) from around 1980.[43] For around five years, theCP/M (Control Program for Microcomputers) was the most popular operating system for microcomputers.[44] Later, IBM bought adisk operating system fromMicrosoft, which IBM sold asIBM PC DOS and Microsoft branded asMS-DOS (MicroSoft Disk Operating System) and was widely used onIBM PC compatible microcomputers. Later versions increased their sophistication, in part by borrowing features from UNIX.[44]
Apple'sMacintosh was the first popular computer to use agraphical user interface (GUI). The GUI proved much moreuser friendly than the text-onlycommand-line interface earlier operating systems had used. Following the success of Macintosh, MS-DOS was updated with a GUI overlay calledWindows. Windows later was rewritten as a stand-alone operating system, borrowing so many features from another (VAX VMS) that a largelegal settlement was paid.[45] In the twenty-first century, Windows continues to be popular on personal computers but has lessmarket share of servers. UNIX operating systems, especially Linux, are the most popular onenterprise systems and servers but are also used onmobile devices and many other computer systems.[46]
On mobile devices,Symbian OS was dominant at first, being usurped byBlackBerry OS (introduced 2002) andiOS foriPhones (from 2007). Later on, the open-sourceAndroid operating system (introduced 2008), with a Linux kernel and a C library (Bionic) partially based on BSD code, became most popular.[47]
Components
The components of an operating system are designed to ensure that various parts of a computer function cohesively. With the de facto obsoletion ofDOS, all usersoftware must interact with the operating system to access hardware.
The kernel is the part of the operating system that providesprotection 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 ofmalicious software and protecting private data, and ensuring that one program cannot monopolize the computer's resources.[48] Most operating systems have two modes of operation:[49] inuser mode, the hardware checks that the software is only executing legal instructions, whereas the kernel hasunrestricted powers and is not subject to these checks.[50] The kernel also managesmemory for other processes and controls access toinput/output devices.[51]
Program execution
A kernel connects the application software to the hardware of a computer.
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 aprocess by the operating systemkernel, 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., theLINK andATTACH facilities ofOS/360 and successors.
Aninterrupt (also known as anabort,exception,fault,signal,[52] ortrap)[53] provides an efficient way for most operating systems to react to the environment. Interrupts cause thecentral processing unit (CPU) to have acontrol flow change away from the currently running program to aninterrupt handler, also known as an interrupt service routine (ISR).[54][55] An interrupt service routine may cause thecentral processing unit (CPU) to have acontext switch.[56][a] 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.[57] However, several interrupt functions are common.[57] The architecture and operating system must:[57]
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 aprocess that an event has occurred.[52] This contrasts with ahardware interrupt — which is a message to thecentral processing unit (CPU) that an event has occurred.[58] Software interrupts are similar to hardware interrupts — there is a change away from the currently running process.[59] Similarly, both hardware and software interrupts execute aninterrupt service routine.
Software interrupts may be normally occurring events. It is expected that atime slice will occur, so the kernel will have to perform acontext switch.[60] Acomputer program may set a timer to go off after a few seconds in case too much data causes an algorithm to take too long.[61]
Users can send messages to the kernel to modify the behavior of a currently running process.[61] For example, in thecommand-line environment, pressing theinterrupt character (usuallyControl-C) might terminate the currently running process.[61]
To generatesoftware interrupts inUnix-like operating systems, thekill(pid,signum)system call will send asignal to another process.[63]pid is theprocess identifier of the receiving process.signum is the signal number (inmnemonic format)[b] to be sent. (The abrasive name ofkill was chosen because early implementations only terminated the process.)[64]
In Unix-like operating systems,signals inform processes of the occurrence of asynchronous events.[63] To communicate asynchronously, interrupts are required.[65] One reason a process needs to asynchronously communicate to another process solves a variation of the classicreader/writer problem.[66] The writer receives a pipe from theshell for its output to be sent to the reader's input stream.[67] Thecommand-line syntax isalpha | bravo.alpha will write to the pipe when its computation is ready and then sleep in the wait queue.[68]bravo will then be moved to theready queue and soon will read from its input stream.[69] The kernel will generatesoftware interrupts to coordinate the piping.[69]
Signals may be classified into 7 categories.[63] 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 (I/O)devices are slower than the CPU. Therefore, it would slow down the computer if the CPU had towait for each I/O to finish. Instead, a computer may implement interrupts for I/O completion, avoiding the need forpolling or busy waiting.[70]
Some computers require an interrupt for each character or word, costing a significant amount of CPU time.Direct memory access (DMA) is an architecture feature to allow devices to bypass the CPU and accessmain memory directly.[71] (Separate from the architecture, a device may perform direct memory access[c] to and from main memory either directly or via a bus.)[72][d]
When acomputer user types a key on the keyboard, typically the character appears immediately on the screen. Likewise, when a user moves amouse, thecursor immediately moves across the screen. Each keystroke and mouse movement generates aninterrupt calledInterrupt-driven I/O. An interrupt-driven I/O occurs when a process causes an interrupt for every character[72] or word[73] transmitted.
Direct memory access
Devices such ashard disk drives,solid-state drives, andmagnetic tape 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 achannel or adirect memory access controller; an interrupt is delivered only when all the data is transferred.[74]
If acomputer program executes asystem call to perform a block I/Owrite operation, then the system call might execute the following instructions:
Create an entry in the device-status table.[76] The operating system maintains this table to keep track of which processes are waiting for which devices. One field in the table is thememory address of the process control block.
Place all the characters to be sent to the device into amemory buffer.[65]
Set the memory address of the memory buffer to a predetermined device register.[77]
Set the buffer size (an integer) to another predetermined register.[77]
While the writing takes place, the operating system will context switch to other processes as normal. When the device finishes writing, the device willinterrupt the currently running process byasserting aninterrupt request. The device will also place an integer onto the data bus.[78] Upon accepting the interrupt request, the operating system will:
Among other things, a multiprogramming operating systemkernel 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 thekernel'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 tocrash the system.
Memory protection enables thekernel to limit a process' access to the computer's memory. Various methods of memory protection exist, includingmemory segmentation andpaging. All methods require some level of hardware support (such as the80286 MMU), which does not exist in all computers.
In both segmentation and paging, certainprotected mode 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-entersupervisor mode, placing thekernel in charge. This is called asegmentation 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, thekernel 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. Ageneral protection fault would be produced, indicating a segmentation violation had occurred; however, the system would often crash anyway.
Many operating systems can "trick" programs into using memory scattered around the hard disk and RAM as if it is one continuous chunk of memory, called 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[e] memory, but nonetheless has been allocated to it, the kernel is interrupted(see§ Memory management). This kind of interrupt is typically apage fault.
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 calledswapping, 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.[80]
Concurrency refers to the operating system's ability to carry out multiple tasks simultaneously.[81] Virtually all modern operating systems support concurrency.[82]
Threads enable splitting a process' work into multiple parts that can run simultaneously.[83] The number of threads is not limited by the number of processors available. If there are more threads than processors, the operating systemkernel schedules, suspends, and resumes threads, controlling when each thread runs and how much CPU time it receives.[84] During acontext switch a running thread is suspended, its state is saved into thethread control block and stack, and the state of the new thread is loaded in.[85] Historically, on many systems a thread could run until it relinquished control (cooperative multitasking). Because this model can allow a single thread to monopolize the processor, most operating systems now caninterrupt a thread (preemptive multitasking).[86]
Threads have their own thread ID,program counter (PC), aregister set, and astack, but share code,heap data, and other resources with other threads of the same process.[87][88] Thus, there is less overhead to create a thread than a new process.[89] On single-CPU systems, concurrency is switching between processes. Many computers have multiple CPUs.[90]Parallelism with multiple threads running on different CPUs can speed up a program, depending on how much of it can be executed concurrently.[91]
File systems are anabstraction used by the operating system to simplify access to permanent storage. They provide human-readablefilenames and othermetadata, increase performance viaamortization of accesses, prevent multiple threads from accessing the same section of memory, and includechecksums to identifycorruption.[96] File systems are composed of files (named collections of data, of an arbitrary size) anddirectories (also called folders) that list human-readable filenames and other directories.[97] An absolutefile path begins at theroot directory and listssubdirectories divided by punctuation, while a relative path defines the location of a file from a directory.[98][99]
System calls (which are sometimeswrapped 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.[100] The operating system's efforts to reduce latency include storing recently requested blocks of memory in acache andprefetching data that the application has not asked for, but might need next.[101]Device drivers are software specific to eachinput/output (I/O) device that enables the operating system to work without modification over different hardware.[102][103]
Another component of file systems is adictionary that maps a file's name and metadata to thedata block where its contents are stored.[104] Most file systems use directories to convert file names to file numbers. To find the block number, the operating system uses anindex (often implemented as atree).[105] Separately, there is a free spacemap to track free blocks, commonly implemented as abitmap.[105] 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 reducefragmentation.[106]
Maintaining data reliability in the face of a computer crash or hardware failure is another concern.[107] 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.[108] Data corruption is addressed by redundant storage (for example, RAID—redundant array of inexpensive disks)[109][110] andchecksums 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.[110]
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.[111] Operating systems security rests on achieving theCIA 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 adenial of service attack).[112] As with other computer systems, isolatingsecurity domains—in the case of operating systems, the kernel, processes, andvirtual machines—is key to achieving security.[113] Other ways to increase security include simplicity to minimize theattack surface, 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, and reducing shared data.[114]
Some operating system designs are more secure than others. Those with no isolation between the kernel and applications are least secure, while those with amonolithic kernel like most general-purpose operating systems are still vulnerable if any part of the kernel is compromised. A more secure design featuresmicrokernels that separate the kernel's privileges into many separate security domains and reduce the consequences of a single kernel breach.[115]Unikernels are another approach that improves security by minimizing the kernel and separating out other operating systems functionality by application.[115]
Most operating systems are written inC orC++, which create potential vulnerabilities for exploitation. Despite attempts to protect against them, vulnerabilities are caused bybuffer overflow attacks, which are enabled by the lack ofbounds checking.[116] Hardware vulnerabilities, some of themcaused by CPU optimizations, can also be used to compromise the operating system.[117] There are known instances of operating system programmers deliberately implanting vulnerabilities, such asback doors.[118]
Operating systems security is hampered by their increasing complexity and the resulting inevitability of bugs.[119] Becauseformal verification of operating systems may not be feasible, developers use operating systemhardening to reduce vulnerabilities,[120] e.g.address space layout randomization,control-flow integrity,[121]access restrictions,[122] and other techniques.[123] 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.[124] Open source developers strive to work collaboratively to find and eliminate security vulnerabilities, usingcode review andtype checking to expunge malicious code.[125][126]Andrew S. Tanenbaum advises releasing thesource code of all operating systems, arguing that it prevents developers from placing trust in secrecy and thus relying on the unreliable practice ofsecurity by obscurity.[127]
graphical user interface (GUI) using a visual environment, most commonly a combination of the window, icon, menu, and pointer elements, also known asWIMP.
For personal computers, includingsmartphones andtablet computers, and forworkstations, user input is typically from a combination ofkeyboard,mouse, andtrackpad ortouchscreen, all of which are connected to the operating system with specialized software.[128] 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.[129] 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.[130]
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.[131]
In some cases, hobby development is in support of a "homebrew" computing device, for example, a simplesingle-board computer powered by a6502 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 includeSyllable andTempleOS.
Diversity of operating systems and portability
If an application is written for use on a specific operating system, and isported 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 otherwisemaintained.
This cost in supporting operating systems diversity can be avoided by instead writing applications forsoftware platforms such asJava orQt. These abstractions have already borne the cost of adaptation to specific operating systems and theirsystem libraries.
Another approach is for operating system vendors to adopt standards. For example,POSIX andOS abstraction layers provide commonalities that reduce porting costs.
As of October 2025[update],Android, based on the Linux kernel, is the most popular operating system with a 38% market share, followed byMicrosoft Windows at 31%,iOS andiPadOS at 15%,macOS at 7%, andLinux at 1%. Android, iOS, and iPadOS aremobile operating systems, while Windows, macOS, and Linux are desktop operating systems.[3]
Linux isfree software distributed under theGNU General Public License (GPL), which means that all of its derivatives are legally required to release theirsource code.[132] 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.[133]
Security descriptor for a file that is read-only by default, specified no access for Elvis, read/write access for Cathy, and full access for Ida, the owner of the file[140]
Windows is aproprietary operating system that is widely used on desktop computers, laptops, tablets, phones,workstations,enterprise servers, andXbox consoles.[141] The operating system was designed for "security, reliability, compatibility, high performance, extensibility, portability, and international support"—later on,energy efficiency and support fordynamic devices also became priorities.[142]
^Modern CPUs provide instructions (e.g. SYSENTER) to invoke selected kernel services without an interrupts. Visithttps://wiki.osdev.org/SYSENTER for more information.
^Soares, Livio Baldini; Stumm, Michael (4 October 2010).FlexSC: Flexible System Call Scheduling with Exception-Less System Calls.OSDI '10, 9th USENIX Symposium on Operating System Design and Implementation.USENIX. Retrieved9 August 2024. p. 2:Synchronous implementation of system calls negatively impacts the performance of system intensive workloads, both in terms of thedirect costs of mode switching and, more interestingly, in terms of theindirect pollution of important processor structures which affects both user-mode and kernel-mode performance. A motivating example that quantifies the impact of system call pollution on application performance can be seen in Figure 1. It depicts the user-mode instructions per cycles (kernel cycles and instructions are ignored) of one of the SPEC CPU 2006 benchmarks (Xalan) immediately before and after apwrite system call. There is a significant drop in instructions per cycle (IPC) due to the system call, and it takes up to 14,000 cycles of execution before the IPC of this application returns to its previous level. As we will show, this performance degradation is mainly due to interference caused by the kernel on key processor structures.
^abKerrisk, Michael (2010).The Linux Programming Interface. No Starch Press. p. 388.ISBN978-1-59327-220-3.A signal is a notification to a process that an event has occurred. Signals are sometimes described as software interrupts.
^Hyde, Randall (1996)."Chapter Seventeen: Interrupts, Traps and Exceptions (Part 1)".The Art Of Assembly Language Programming. No Starch Press.Archived from the original on 22 December 2021. Retrieved22 December 2021.The concept of an interrupt is something that has expanded in scope over the years. The 80x86 family has only added to the confusion surrounding interrupts by introducing the int (software interrupt) instruction. Indeed, different manufacturers have used terms like exceptions, faults, aborts, traps and interrupts to describe the phenomena this chapter discusses. Unfortunately there is no clear consensus as to the exact meaning of these terms. Different authors adopt different terms to their own use.
^Tanenbaum, Andrew S. (1990).Structured Computer Organization, Third Edition. Prentice Hall. p. 308.ISBN978-0-13-854662-5.Like the trap, the interrupt stops the running program and transfers control to an interrupt handler, which performs some appropriate action. When finished, the interrupt handler returns control to the interrupted program.
^Silberschatz, Abraham (1994).Operating System Concepts, Fourth Edition. Addison-Wesley. p. 32.ISBN978-0-201-50480-4.When an interrupt (or trap) occurs, the hardware transfers control to the operating system. First, the operating system preserves the state of the CPU by storing registers and the program counter. Then, it determines which type of interrupt has occurred. For each type of interrupt, separate segments of code in the operating system determine what action should be taken.
^Silberschatz, Abraham (1994).Operating System Concepts, Fourth Edition. Addison-Wesley. p. 105.ISBN978-0-201-50480-4.Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process. This task is known as a context switch.
^abcdeSilberschatz, Abraham (1994).Operating System Concepts, Fourth Edition. Addison-Wesley. p. 31.ISBN978-0-201-50480-4.
^Silberschatz, Abraham (1994).Operating System Concepts, Fourth Edition. Addison-Wesley. p. 30.ISBN978-0-201-50480-4.Hardware may trigger an interrupt at any time by sending a signal to the CPU, usually by way of the system bus.
^Kerrisk, Michael (2010).The Linux Programming Interface. No Starch Press. p. 388.ISBN978-1-59327-220-3.Signals are analogous to hardware interrupts in that they interrupt the normal flow of execution of a program; in most cases, it is not possible to predict exactly when a signal will arrive.
^Kerrisk, Michael (2010).The Linux Programming Interface. No Starch Press. p. 388.ISBN978-1-59327-220-3.Among the types of events that cause the kernel to generate a signal for a process are the following: A software event occurred. For example, ... the process's CPU time limit was exceeded[.]
^abcdeKerrisk, Michael (2010).The Linux Programming Interface. No Starch Press. p. 388.ISBN978-1-59327-220-3.
Auslander, M. A.; Larkin, D. C.; Scherr, A. L. (September 1981). "The Evolution of the MVS Operating System".IBM Journal of Research and Development.25 (5):471–482.doi:10.1147/rd.255.0471.ISSN0018-8646.
Berntsson, Petter Sainio; Strandén, Lars; Warg, Fredrik (2017).Evaluation of Open Source Operating Systems for Safety-Critical Applications. Springer International Publishing. pp. 117–132.ISBN978-3-319-65948-0.