An operating system is software (or, sometimes, firmware) that manages and controls a computer, serving as an interface between various applications and the computer hardware. End users do not interact directly with the operating system, which tends to work as a back end to application software. Although graphical user interfaces, like command line interfaces, are packaged as part of operating system software, navigation tools such as icons displayed by Linux, Windows, or other systems are actually modules allowing users to interact with the operating system; one operating system can have many different interfaces.
The key function of an operating system is to manage system resources such as memory, CPU usage, and various devices such as disk drives, printers, and keyboards. The two main components of system software are boot or startup commands, executed when the system is first turned on, and a wait loop in which the system monitors applications (including internal programs that monitor hardware), and executes code that allocates resources as needed when applications set flags or send interrupts requesting some system action. Operating systems also allow programs and devices to exchange information, communicating, for example, keystroke and mouse positioning data to a word processing program.