Last month I promised a tutorial on Operating Systems (OSs). I will initiate it with an overview of the constituents of an operating system, describing its benefits to geophysicists, discussing the usefulness of a resident monitor and addressing the concept of a 'real' operating system.

General purpose computers have four main components: hardware, operating system, application programs and users. Hardware typically includes the central processing unit (CPU) along with its supporting modules, memory, disk storage, tape drives, graphics cards, keyboard, mouse, monitor and network interface. It performs arithmetic and logic operations, runs applications and operating systems, stores and transfers data to and from local media and the network, reads keyboard and mouse inputs and puts colours on monitors. The operating system, as its name implies, is a system of software which operates the computer. It has exclusive control of the hardware, fairly arbitrating competing access requests. Application programs execute algorithms of interest to the users on the hardware. Typical geophysical applications, directed by the geophysicist, perform seismic data processing, interpretation, well log analysis, earth modelling and survey design. Non-geophysical applications of interest might include electronic mail (email) reader/composers, World Wide Web (WWW) browsers, File Transfer Protocol and networked flight simulators (used by system administrators strictly for network testing). In the current context, of course, users are geophysicists (system administrators and programmers never consider themselves users). Geophysicists use application programs to leverage their own geophysical capabilities.

In the early days of computing, applications controlled hardware directly, putting a large load on application programmers. Operating systems were developed to shift this burden to the computer. They have improved until modem operating systems initiate and terminate applications, control their sequencing and scheduling and allow transparent, concurrent, consistent and optimal access to hardware. They provide secure and protected file systems and command interpreters. As if that were not enough, an operating system does something even more important. It provides, and enforces, protection, protecting itself from applications and applications from each other. This is supported by a supervisory mode, enforced in hardware, through which the operating system can execute restricted CPU commands. Similarly, it provides an extended and secure administration mode.

While computing scientists may be fascinated with operating systems in and of themselves, geophysicists may ask "What's in it for me? Why should I pay good money for an operating system and, heaven forbid, someone to maintain it?" The theoretical answer is that an operating system maximizes efficiency and convenience. Efficiency results from optimal use of hardware. Convenience results from the creation of an environment which allows applications to focus on their primary tasks. The practical answer is that it allows many users to transparently share the same group of computers simultaneously. Each can concentrate on geophysics, running multiple applications which compute on, and access data from, remote computers while displaying results in multiple windows. Concurrently, unnoticed by users, e-mail can be transferred, system administrators can install new applications, print and plot jobs can be processed, and data can be transferred to and from tape or disk. These are kept separate, with each application thinking it has exclusive hardware access. One geophysicist's velocity picks don't end up in another's seismic data. If a migration runs wild, attempting to grab all the CPU, it is restrained, allowing a statics application to continue. If a modelling run goes berserk and tries to scribble over a WWW browser's memory, it is immediately and unceremoniously terminated. (Yes, application programmers sometimes make mistakes. These things do happen.) The fact that we take all this for granted is a tribute to the sophistication and stability of today's operating systems.

Having extolled the virtues of an operating system, it should be noted that it is possible to do useful work on a computer without an operating system. In fact, personal computers have been highly successful using a sophisticated resident monitor. These were developed early in computing history, before full operating systems, in order to keep computers busy while minimizing operator intervention. Their sophistication has increased to the point where they, in conjunction with a windowing application, can present the illusion of a full multitasking operating system. These may work well on single user computers but, as I will claim, are not Real™ operating systems.

In my last column, I foolishly promised to address the concept of a 'real' operating system. In this column I will do something even more foolish-I will keep that promise. Geophysicists may be familiar with the term 'real' in the context of that famous seismic source, George Thorogood, when he said "Get a haircut and get a real job." In a similar vein, the term 'real' is often used in computing culture, often with the trademark symbol, as in Real™. This refers to a person, program or unit of hardware which is especially clever, such that observers are struck with awe. An example is "Joe Bloggs wrote a program which fork(2)s, then exec(2)s itself with different arguments, demonstrating the setrlimit(2) bug in RigelOS, through infinite recursion.

That's a Real™ program." (I actually did this and, for a moment, felt like a Real™ programmer.) Note that the (2) is not pronounced; it is a documentation reference. The opposite of Real is not 'unreal', but rather 'not Real™' as in "That PC user got a virus from the Internet. He's obviously not running a Real™ OS." (There are Real™ operating systems available for PCs, but that's a topic for another day.)

Given the gradation from bare hardware through resident monitor to highly sophisticated operating systems, how does one determine where the Real™ operating system line is drawn? For me, the main requirement is that Real™ operating systems enforce protection. Real™ operating systems have a supervisory mode and system administration mode. Real™ operating systems rule their domain with an iron fist. Real™ operating systems don't get viruses.



Share This Column