An OS is a program that controls the execution of application programs and acts as an interface between the user of a computer and the computer hardware.
Operating systm services:
Program creation: The OS provides a variety of facilities and services, such as editors and debuggers, to assist the programmer in creating programs. Typically, these services are in the form of utility programs that are not actually
part of the OS but are accessible through the OS.
• Program execution: A number of tasks need to be performed to execute a program. Instructions and data must be loaded into main memory, I/O devices and files must be initialized, and other resources must be prepared. The OS
handles all of this for the user.
Access to I/O devices: Each I/O device requires its own specific set of instructions or control signals for operation.
The OS takes care of the details so that the programmer can think in terms of simple reads and writes.
• Controlled access to files: In the case of files, control must include an understandingof not only the nature of the I/O device (disk drive,tape drive) but also the file format on the storage medium. Again, the OS worries about the
details. Further, in the case of a system with multiple simultaneous users, the OS can provide protection mechanisms to control access to the files.
• System access: In the case of a shared or public system, the OS controls access to the system as a whole and to specific system resources. The access function must provide protection of resources and data from unauthorized users and must resolve conflicts for resource contention.
• Error detection and response: A variety of errors can occur while a computer system is running. These include internal and external hardware errors, such as a memory error, or a device failure or malfunction; and various software errors, such as arithmetic overflow, attempt to access forbidden memory location, and inability of the OS to grant the...