Operating System Objectives and Functions

  • An OS is a program that controls the execution of application programs and acts as an interface between applications and the computer hardware.
  • It can be thought of as having three objectives:
  • Convenience: An OS makes a computer more convenient to use.
  • Efficiency: An OS allows the computer system resources to be used in an efficient manner.
  • Ability to evolve: An OS should be constructed in such a way as to permit the effective development, testing, and introduction of new system functions without interfering with service.

The Operating System as a User/Computer Interface

  • The hardware and software used in providing applications to a user can be viewed in a layered or hierarchical fashion.
  • The user of those applications, the end user, generally is not concerned with details of computer hardware.
  • Thus, the end user views a computer system in terms of a set of applications.
  • An application can be expressed in a programming language and is developed by an application programmer.
  • If one were to develop an application program as a set of machine instructions that is completely responsible for controlling the computer hardware, one would be faced with an overwhelmingly complex undertaking.
  • To ease this chore, a set of system programs is provided. Some of these programs are referred to as utilities, or library programs.
  • These implement frequently used functions that assist in program creations, the management of files, and the control of I/O devices.
  • A programmer will make use of these facilities in developing an application, and the application, while it is running, will invoke the utilities to perform certain functions.
  • The most important collection of system programs comprises the OS.
  • The OS masks the details of the hardware from the programmer and provides the programmer with a convenient interface for using the system.
  • It acts as mediator, making it easier for the programmer and for application programs to access and use those facilities and services.
  • Briefly, the OS typically provides services in the following areas:
  • Program Development: 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, while not strictly part of the core of the OS, are supplied with the OS and are referred to as application program development tools.

Figure 2. Computer Hardware and Software Structure.

  • Program execution: A number of steps 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 these scheduling duties for the user.
Access to I/O devices: 
  • Each I/O device requires its own peculiar set of instructions or control signals for operation.
  • The OS provides a uniform interface that hides these details so that programmers can access such devices using simple reads and writes.
Controlled access to files: 
  • For file access, the OS must reflect a detailed understanding of not only the nature of the I/O device (disk drive, tape drive) but also the structure of the data contained in the files on the storage medium.
  • In the case of a system with multiple users, the OS may provide protection mechanisms to control access to the files.
System access: 
  • For 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 division by zero, attempt to access forbidden memory location, and inability of the OS to grant the request of an application.
  • In each case, the OS must provide a response that clears the error condition with the least impact on running applications.
  • The response may range from ending the program that caused the error, to retrying the operation, to simply reporting the error to the application.
  • A good OS will collect usage statistics for various resources and monitor performance parameters such as response time.
  • On any system, this information is useful in anticipating the need for future enhancements and in tuning the system to improve performance.
  • On a multiuser system, the information can be used for billing purposes.
  • Figure 2. Also indicate three key interfaces in a typical computer system:
Instruction set architecture (ISA):
  • The ISA defines the repertoire of machine language instruction that a computer can follow.
  • This interface is the boundary between and software.
  • Note that both application programs and utilities may access the ISA directly.
  • For these programs, a subset of the instruction repertoire is available (user ISA).
  • The OS has access to additional machine language instructions that deal with managing system resources (system ISA).
Application binary interface (ABI): 
  • The ABI defines a standard for binary portability\.
  • The ABI defines the system call interface to the operating system and the hardware resources and services available in a system through the user ISA.
Application program interface (API): 
  • The API gives a program access to the hardware resources and services available in a system through the user ISA supplemented with high-level language (HLL) library calls.
  • Any system calls are usually performed through libraries.
  • Using an API enables application software to be ported easily, through recompilation, to other systems that support the same API.
  • The Operating System as Resource Manager
  • A computer is a set of resources for the movement, storage, and processing of data and for the control of these functions.
  • The OS is responsible for managing these resources.
  • Can we say that it is the OS that controls the movement, storage, and processing of data? From one point of view, the answer is yes: By managing the computer’s resources, the OS is in control of the computer’s basic functions.
  • But this control is exercised in a curious way.
  • Normally, we think of a control mechanism as something external to that which controlled, or at least as something that is a distinct and separate part of that which is controlled. (For example, a residential heating system is controlled by a thermostat, which is separate from the heat-generation and heat-distribution apparatus.)
  • This is not the case with the OS, which as a control mechanism is unusual in two respects:
  • The OS functions in the same way as ordinary computer software; that is, it is a program or suite of programs executed by the processor.
  • The OS frequently relinquishes control and must depend on the processor to allow it to regain control.
  •  Like other computer programs, the OS provides instructions for the processor.
  • The key difference is in the intent of the program.
  • The OS directs the processor in the use of the other system resources and in the timing of its execution of other programs.
  • But in order for the processor to do any of these things, it must cease executing the OS program and execute other programs.
  • Thus, the OS relinquishes control for the processor to do some “useful” work and then resumes control long enough to prepare the processor to do the next piece of work.
  • Figure 3. Suggests the main resources that are managed by the OS.
  • A portion of the OS is in main memory.
  • This includes the kernel, or nucleus, which contains the most frequently used functions in the OS and, at a given time, other portions of the OS currently in use.
  • The remainder of the main memory contains user programs and data.
  • The memory management hardware in the processor and the OS jointly control the allocation of main memory, as we shall see.

Figure 3. The Operating System as Resource Manager.

  • The OS decides when an I/O device can be used by a program in execution and controls access to and use of files.
  • The processor itself is a resource, and the OS must determine how much processor time is to be devoted to the execution of a particular user program.
  • In the case of a multiple- processor system, this decision must span all of the processors.

Ease of Evaluation of an Operating System

A major OS evolve over time for a number of reasons:

  • Hardware upgrades plus new types of hardware: For example, early versions of UNIX and the Macintosh OS did not employ a paging mechanism because they were run on processors without paging hardware.
  • Subsequent versions of these operating systems were modified to exploit paging capabilities.
  • Also, the use of graphics terminals and page-mode terminals instead of line-at-a-time scroll mode terminals affects OS design.
  • For example, a graphics terminal typically allows the user to view several applications at the same time through “Windows” on the screen.
  • This requires more sophisticated support in the OS.
New services: 
  • In response to user demand or in response to the needs of system managers, the OS expands to offer new services.
  • For example, if it is found to be difficult to maintain good performance for users with existing tools, new measurement and control tools may be added to the OS.
  • Any OS has faults. These are discovered over the course of time and fixes are made.
  • Of course, the fix may introduce new faults. 
  • The need to change an OS regularly places certain requirements on its design.
  • An obvious statement is that the system should be modular in construction, with clearly defined interfaces between the modules, and that it should be well documented. For large programs, such as the typical contemporary OS, what might be referred to as straightforward modularization is inadequate.
  • That is, much more must be done than simply partitioning a program into modules.


  1. MODERN OPERATING SYSTEMS by Andrew S. Tanenbaum, Second Edition
  2. The Operating System Concepts by Silberschatz, Galvin, Gagne, 8th Edition

Last modified: Sunday, 19 November 2017, 10:59 AM