Introduction to Operating System


  • An operating system acts as an intermediary between the user of a computer and the computer hardware.
  • The purpose of an operating system is to provide an environment in which a user can execute programs in a convenient and efficient manner.
  • An operating system is software that manages the computer hardware.
  • The hardware must provide appropriate mechanisms to ensure the correct operation of the computer system and to prevent user programs from interfering with the proper operation of the system.
  • Internally, operating systems vary greatly in their makeup, since they are organized along many different lines.
  • The design of a new operating system is a major task.
  • It is important that the goals of the system be well defined before the design begins.
  • These goals form the basis for choices among various algorithms and strategies.
  • Because an operating system is large and complex, it must be created piece by piece.
  • Each of these pieces should be a well delineated portion of the system, with carefully defined inputs, outputs, and functions.


  • An Operating System is a program that manages the computer hardware.
  • It also provides a basis for application programs and acts as an intermediary between the computer user and the computer hardware.
  • An amazing aspect of operating systems is how varied they are in accomplishing these tasks.
  • Mainframe operating systems are designed primarily to optimize utilization of hardware. Personal computer (PC) operating systems support complex games, business applications, and everything in between.
  • Operating systems for handheld computers are designed to provide an environment in which a user can easily interface with the computer to execute programs.
  • Thus, some operating systems are designed to be convenient, others to be efficient, and others some combination of the two.
  • Before we can explore the details of computer system operation, we need to know something about system structure.
  • We begin by discussing the basic functions of system startup, I/0, and storage.
  • We also describe the basic computer architecture that makes it possible to write a functional operating system.
  • A modern computer system consists of one or more processors, some main memory, disks, printers, a keyboard, a display, network interfaces, and other input/output devices.
  • All in all, a complex system. Writing programs that keep track of all these components and use them correctly, let alone optimally, is an extremely difficult job.
  • For this reason, computers are equipped with a layer of software called the operating system, whose job is to manage all these devices and provide user programs with a simpler interface to the hardware.
  • The placement of the operating system is shown in Fig. 1.
  • At the bottom is the hardware, which, in many cases, is itself composed of two or more levels (or layers).
  • The lowest level contains physical devices, consisting of integrated circuit chips, wires, power supplies, cathode ray tubes, and similar physical devices.
  • Next comes the microarchitecture level, in which the physical devices are grouped together to form functional units.
  • Typically this level contains some registers internal to the CPU (Central Processing Unit) and a data path containing an arithmetic logic unit.
  • In each clock cycle, one or two operands are fetched from the registers and combined in the arithmetic logic unit (for example, by addition or Boolean AND).
  • The result is stored in one or more registers.
  • On some machines, the operation of the data path is controlled by software, called the microprogram.
  • On other machines, it is controlled directly by hardware circuits.

Figure 1.1 A computer system consists of hardware, system programs, and application programs.

  • The purpose of the data path is to execute some set of instructions. Some of these can be carried out in one data path cycle; others may require multiple data path cycles.
  • These instructions may use registers or other hardware facilities.
  • Together, the hardware and instructions visible to an assembly language programmer form the ISA (Instruction Set Architecture) level.
  • This level is often called machine language.
  • The machine language typically has between 50 and 300 instructions, mostly for moving data around the machine, doing arithmetic, and comparing values.
  • In this level, the input/output devices are controlled by loading values into special device registers.
  • For example, a disk can be commanded to read by loading the values of the disk address, main memory address, byte count, and direction (read or write) into its registers.
  • In practice, many more parameters are needed, and the status returned by the drive after an operation is highly complex.
  • Furthermore, for many I/O (Input/output) devices, timing plays an important role in the programming.
  • To hide this complexity, an operating system is provided.
  • It consists of a layer of software that (partially) hides the hardware and gives the programmer a more convenient set of instructions to work with.
  • For example, read block from file is conceptually simpler than having to worry about the details of moving disk heads, waiting for them to settle down, and so on.
  • On top of the operating system is the rest of the system software.
  • Here we find the command interpreter (shell), window systems, compilers, editors, and similar application-independent programs.
  • It is important to realize that these programs are definitely not part of the operating system, even though they are typically supplied by the computer manufacturer.
  • This is a crucial, but subtle, point. The operating system is (usually) that portion of the software that runs in kernel mode or supervisor mode.
  • It is protected from user tampering by the hardware (ignoring for the moment some older or low-end microprocessors that do not have hardware protection at all).
  • Compilers and editors run in user mode.
  • If a user does not like a particular compiler, he is free to write his own if he so chooses: he is not free to write his own clock interrupt handler, which is part of the operating system and is normally protected by hardware against attempts by users to modify it.
  • This distinction, however, is sometimes blurred in embedded systems (which may not have kernel mode) or interpreted systems (such as Java-based operating systems that use interpretation, not hardware, to separate the components).
  • Still, for traditional computers, the operating system is what runs in kernel mode.
  • That said, in many systems there are programs that run in user mode but which help the operating system or perform privileged functions.
  • For example, there is often a program that allows users to change their passwords.
  • This program is not part of the operating system and does not run in kernel mode, but it clearly carries out a sensitive function and has to be protected in a special way.
  • In some systems, this idea is carried to an extreme form, and pieces of what is traditionally considered to be the operating system (such as the file system) run in user space.
  • In such systems, it is difficult to draw a clear boundary.
  • Everything running in kernel mode is clearly part of the operating system, but some programs running outside it are arguably also part of it, or at least closely associated with it.
  • Finally, above the system programs come the application programs.
  • These programs are purchased or written by the users to solve their particular problems, such as word processing, spreadsheets, engineering calculations, or storing information in a database.


  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:55 AM