An operating system is the most important piece of software that runs on a computer and the computer cannot run without it. It is analogous to the central nervous system of a computer that enables a computer to carry out basic tasks such as getting input from a keyboard, displaying words on a screen and getting files from a disk.
Operating systems control all the devices in a computer by means of software. Consequently, devices can be changed, patches can be added and security updates applied. This facility enables changes to be made to computer systems, eliminating the need to purchase a new one every time a change needs to be made to the system.
The hardware and software resources of a computer are managed by the operating system. The central processing unit, memory, disk space, the mouse and keyboard and an attached printer are the typical resources an operating system manages. It also provides a stable and consistent means for applications to interact with the hardware without having to know the details of the hardware device.
During the standard use of a computer, various programs and input devices want to use the resources of the central processing unit and request from it memory, and access to file systems and input and output devices for their own purposes. The role of the operating system is to ensure that each application running has an equal chance to get the resources it needs while trying to manage effectively and efficiently all the available resources.
A consistent application interface is required if more than one computer is using the operating system. These consistent application interfaces, known as APIs, or application program interfaces, allow portability of applications, even if hardware configurations of the computers are different. They also enable operating systems to be sufficiently flexible to handle hardware from different manufacturers in almost any conceivable combination.