AN operating system (OS) is the first software you see when you turn on your computer and the last one when you turn the PC off. It is the software that actually manages the raw hardware, hence acting as an interface between the user and hardware. It directly operates on the hardware and fabricates an environment for the execution of the other programs.
The goals of OS are to:
To make this point clear, let us take an example of a floppy disk driver. The operating system provides a simple and a nice interface of files and folders of the floppy disk, each with a name. Using the name of a file we can open, read, write and finally close it. How a controller chip of a floppy drive performs this read/write is really complex. The controller chip accepts read/write commands and the commands to move disk arm to the place where read/write is to be done. A laser-beam checks whether the write-protect tab is on or off. When an operation is complete, the controller chip returns status and error information. Hence, a programmer must be aware of these much of details whenever he writes a simple program for I/O. Besides, he should constantly keep track whether the motor is on or off. If it is off, it must be turned on, before read/write function is performed. Also, it canít be left on for long time as it may cause wearing out. This makes programming a nightmare. What an average programmer wants is a simple high-level abstraction to work upon. An abstraction is a concept of hiding too much of the unnecessary details from a user and present a view that is easy to understand and operate. A typical abstraction is just a disk with an interface of files and folders. Details of motor status, laser beam working and disk space management etc should not appear before the user.
OS not only hides these
unpleasant hardware details from a programmer, but also saves his time
and energy from dealing with interrupts, timers, conflicts, scheduling
and errors. OS manages this using a subroutine library called device
driver. This view is the equivalent of an extended machine or virtual
machine that is easier to program than the underlying hardware.