Operating Systems and Middleware: Supporting Controlled Interaction

Categories:

Recommended

What Is an Operating System?

An operating system is software that uses the hardware resources of a computer system to provide support for the execution of other software. Specifically, an operating system provides the following services:

  • The operating system allows multiple computations to take place concurrently on a single computer system. It divides the hardware’s time between the computations and handles the shifts of focus between the computations, keeping track of where each one leaves off so that it can later correctly resume.
  • The operating system controls the interactions between the concurrent computations. It can enforce rules, such as forbidding computations from modifying data structures while other computations are accessing those structures. It can also provide isolated areas of memory for private use by the different computations.
  • The operating system can provide support for controlled interaction of computations even when they do not run concurrently. In particular, general-purpose operating systems provide file systems, which allow computations to read data from files written by earlier computations. This feature is optional because an embedded system, such as the computer controlling a washing machine, might in some cases run an operating system, but not provide a file system or other long-term storage.
  • The operating system can provide support for controlled interaction of computations spread among different computer systems by using networking. This is another standard feature of general-purpose operating systems.

These services are illustrated in Figure 1.1. If you have programmed only general-purpose computers, such as PCs, workstations, and servers, you have probably never encountered a computer system that was not running an operating system or that did not allow multiple computations to be ongoing. For example, when you boot up your own computer, chances are it runs Linux, Microsoft Windows, or Mac OS X and that you can run multiple application programs in individual windows on the display screen. These three operating systems will serve as my primary examples throughout the book.

To illustrate that a computer can run a single program without an operating system, consider embedded systems. A typical embedded system might have neither keyboard nor display screen. Instead, it might have temperature and pressure sensors and an output that controls the fuel injectors of your car. Alternatively, it might have a primitive keyboard and display, as on a microwave oven, but still be dedicated to running a single program.

Some of the most sophisticated embedded systems run multiple cooperating programs and use operating systems. However, more mundane embedded systems take a simpler form. A single program is directly executed by the embedded processor. That program contains instructions to read from input sensors, carry out appropriate computations, and write to the output devices. This sort of embedded system illustrates what is possible without an operating system. It will also serve as a point of reference as I contrast my definition of an operating system with an alternative definition.

One popular alternative definition of an operating system is that it provides application programmers with an abstract view of the underlying hardware resources, taking care of the low-level details so that the applications can be programmed more simply. For example, the programmer can write a simple statement to output a string without concern for the details of making each character appear on the display screen.

I would counter by remarking that abstraction can be provided without an operating system, by linking application programs with separately written libraries of supporting procedures. For example, a program could output a string using the standard mechanism of a programming language, such as C++ or Java. The application programmer would not need to know

Attribution

Max Hailperin (2019), Operating Systems and Middleware: Supporting Controlled Interaction, URL: https://gustavus.edu/mcs/max/os-book/

This work is licensed under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) :  (https://creativecommons.org/licenses/by-sa/3.0/).

VP Flipbook Maker

Transform your work into attractive flipbooks with the Visual Paradigm Online Flipbook Maker! Easily convert your content into interactive flipbooks and customize them using its design tools. Try it now and enhance your digital work!