An operating system is a collection of software that controls the operation of a computer. The operating system includes programs that initialize the hardware of the computer, manage and schedule the execution of other programs, maintain system integrity and handle errors among others. It also provides an interface that allows a user to interact with the computer.
The operating system is stored on the hard disk drive, but is automatically loaded into random access memory, or RAM, when the computer starts up, or boots. The loading and initialization of the operating system is performed by a program, known as the bootstrap loader, which is typically stored on a read-only memory chip, or ROM; the bootstrap loader must run before any other program can run.
The operating system is responsible for managing resources, including input and output devices, storage devices and memory. Input devices, including keyboard and mouse, provide input signals such as commands to the operating system, while output devices, such as monitor screen and printer, receive information from the operating system. The operating system actually sits between the basic input/output system, or BIOS, -- a small program that controls the computer hardware -- and the user applications programs.
The operating system also creates a hierarchical or tree-like file structure on the hard disk. The uppermost element of the tree is known as the root directory, or folder, and all other folders and files are created beneath it. When a user saves a file, the operating system assigns a name to the file and saves it in a location that it remembers for future reference. The way in which files and folders are organized on the hard disk dictates how the operating system interacts with applications, users and its security model.
Most modern operating systems, including Microsoft Windows, Macintosh OS X, Linux and Unix, provide a graphical user interface, which allows the user to interact with programs through graphical objects, known as icons. To start a program, the user simply double-clicks on its icon using the mouse. Most operating systems allow more than one program to be started at the same time, but each program is loaded into RAM, which has a finite physical size. It is not technically possible for a computer to completely run out of RAM, but it can come close; to allow the computer to continue working in this situation, the operating system reserves a portion of the hard disk, known as "virtual memory," as an extension of RAM.