22C:116, Lecture Notes, Lecture 2, Spring 2002

Douglas W. Jones
University of Iowa Department of Computer Science

  1. History of Operating Systems

    In the beginning, there were no operating systems. There was no system software. Mathematicians devised algorithms and gave them to coders. Coders converted the algorithms to informal assembly language form and hand assembled that to machine code. The coding process ended with the development of a complete memory image of the program to be run.

  2. The first system software - loaders

    A loader loads a program from some I/O device into memory. A bootstrap loader is a loader small enough to be entered into memory by hand. Typically, the bootstrap was only a few instructions. I've seen 1 instruction bootstrap loaders!

    EDSAC had a loader that did some symbolic linking, and this supported the development of the first subroutine library. The standard library that was quickly developed included I/O routines.

    A loader plus an I/O library could be thought of as a rudimentary operating system!

    EDSAC was built by Maurice Wilkes and company at Cambridge University, following Wilkes' return from the Von Neumann's Princeton summer school in 1946. EDSAC used vacuum-tube logic and mercury-delay-line main memory. Machines with 1K to 4K 40 bit words were typical of that era.

  3. Resident monitors

    The next step in the development of operating systems grew from the realizaiton that many routines, including the bootstrap loader and the basic I/O routines, were needed by almost all programs. Because of this, they could remain in memory! These, taken together, were called the monitor.

    Of course, if the application program failed, it could corrupt the monitor, but normally, when an application finished, it was expected to terminate by jumping to the bootstrap, which would load the loader, which would load the next application. This allowed batch job-shops to develop.

    If your job damaged the bootstrap as it failed, the computer center staff had to key in the bootstrap by hand, a nuisance, but normally, they could just keep feeding jobs into the system.

    As the available main memory grew, the main loader itself could remain in memory, allowing faster job switching because there was no need to reload the loader after normal job termination. At the same time, faster auxiliary storage devices emerged. If the bootstrap loader loaded the main loader from drum memory, the load-time could be so fast that nobody really minded reloading the entire monitor except for the bootstrap between jobs.

  4. 1960 - The Revolution Begins!

    Reloading the system was annoying, and in the new generation of transistorized machines introduced around 1960, the hardware included protection mechanisms that made it impossible for an application to corrupt the system. Impossible if the system itself used the protection mechanisms correctly.

    Burroughs MCP (master control program) on the B5000 computer and the Atlas system from Feranti both introduced virtual memory at around this time. These systems could isolate multiple programs from each other, allowing multiple concurrent processes.

    The B5000 operating system used a segmented model of memory management. Each activation record was a segment, and pointers to segments were distinguished from other data types by the value of their tag field, so it was impossible to corrupt a pointer. The system supported multiple concurrent processes - multiprogramming, and because of the protected nature of pointers, processes could not interfere with each other or with the operating system. Segments that had not been used recently were moved to drum when more main memory was needed, and when an attempt was made to reference a segment that was on drum, the system detected this and moved that segment back to main memory.

    B5000 systems were sold in multiprocessor configurations, and later members of the Burroughs family of mainframes were routinely sold with from 2 to 6 CPU's. The B5000 operating system was notable as the the first system sold without any support for assembly language programming. All of the system software was written in a dialect of Algol 60.

    The Atlas system had a paged model of memory, with a completely developed concept of page fault handling to allow all of the paging drum to be addressed as if it was main memory, and with most of main memory used as a cache to hold pages from drum. The only part of the system that needed to be permanently resident in main memory was the part holding the interrupt handlers, including the page-fault handler. Atlas was also multiprogrammed.

    The first timesharing systems with multiple terminals date back to around 1960 also. The most important was DTSS -- the Dartmouth Timesharing System. At first, this system supported only one programming language, BASIC. DTSS BASIC was compiled, not interpreted (many later versions of BASIC were interpreted). Memory protection on DTSS relied on the compiler to prevent programmers from writing unsafe code, so the operating system itself was rather rudimentary.

  5. 1965 - Consolidation

    In 1965, the minicomputer revolution began in earnest. The DEC PDP-8 was introduced, the first general purpose computer to sell for under $20,000, complete with rudimentary single-user software (an I/O library, a loader, an assembler, and a FORTRAN II compiler. To keep the price low, it had only 4K 12-bit words of core memory, but it could be expanded to 32K (using an optional memory management unit to allow addressing above 4K using 12-bit pointers). Competing minicomputers were made with 12-bit, 16-bit and 18-bit words. All of these new madchines used 7-bit ASCII for their character sets.

    In 1965, IBM announced the IBM System-360 family; this was the first computer to have a byte addressible main memory, using 8-bit bytes and 32-bit words. The 360 is the direct ancestor of IBM's current "Enterprise Server" family. By 1970, IBM's System-360 had become such a success that it became the target of Federal antitrust suits, and IBM was forced to unbundle their product line - purchasers of the 360 were no longer forced to to use IBM's operating systems.

    The 360 owes an immense but obscure debt to the Burroughs 5000. The designers clearly were thinking of a segmented model of memory use, with a 4K byte maximum segment size, but this was largely forgotten in the system developments that followed. This architecture was the first architecture to be pipelined, with the 360 model 95.

    Both the DEC PDP-8 and the IBM System 360 became targets of clonemakers; the RYAD series of clones made by The Soviet Union, Hungary and Poland included clones of both, and there were several US-made clones of both.

    In 1965, MIT, GE and Bell Labs formed a consortium to build Multics, this was an attempt to take the lessons learned from the first virtual memory systems and explore the possibilities opened by the idea of timesharing. Multics was intended to be the heart of a computer utility - users would have terminals in their offices and even in their homes, able to connect to the Multics system and use it to do computing in the same way we connect to telephone and electric power systems. This was a radical notion then, but today, every ISP on the internet is offering something of the same utility service!

    The developers of Multics were the first to fully understand the concept of a hierarchic file system, with a directory tree. The term kernel originated in thinking about Multics, where the system was not monolothic, but was built as a series of layers on top of the kernel and below the user layers. The Multics developers were the first to fully understand the protection problem -- the need for protection mechanisms that could protect the system from users, protect the kernel from errant parts of the system outside the kernel, and protect users from each other. One mechanism coming from this was the idea of attaching an access control list to each file, listing the users allowed to access that file and, for each, the access rights of that user.

  6. Later 1960's

    By the late 1960's, it was obvious that Multics was becoming a huge system, and several groups started looking for faster paths to the ideas Multics was exploring.

    At Berkeley, they developed the Berkeley Timesharing System. Where Multics was built on a 36-bit computer, the Berkeley system was built on a 24-bit machine, the SDS 940. It worked well, and was a commercial product by 1967 (this was the first computer I got to use!) Com-Share Inc and Tymshare Inc were the largest commercial users. Comn-Share is still around (www.comshare.com), and GTE bought Tymshare as the core of their computer networking services division.

    Bell Labs pulled out of the Multics consortium, and a group there, led by Ritchie and Thompson looked at what was happening at Berkeley and built their own scaled-down system. The name Unix is a pun on Multics, and in a very important sense, Unix is not very original. Almost every feature of Unix was adopted from an earlier system, but what the Bell Labs group did is combine the best and discard the rest, producing a result that was brilliant. There was a new idea in UNIX -- new enough to patent. That was the setuid bit, about which we will say more later.

    Another important reaction to Multics occurred at Bolt Bareneck and Newman. That company used many machines built by Digital Equipment Company, and they thought that it would be reasonably straightforward to build a decent memory management unit for the DEC PDP-10, a 36-bit machine that had become popular in artificial intelligence research. So, the people at BB&N built what was known as a paging box for the PDP-10, and on top of this, a decent timesharing system.

    During this period, Simula 67 (the first object oriented programming language), Pascal, PL/I and C were all developed. These languages have strong similarities -- all are descended from Algol 60, and unlike FORTRAN and COBOL (the dominant languages of the era), they all support recursion, pointers, and record structures (under various names).

    Multics, as the design became firm, was coded in PL/I (a language originally proposed by a committee of IBM 360 users). C was developed in order to rewrite UNIX for the port to the 16-bit PDP-11 family.

  7. 1970

    DEC introduced the 16-bit PDP-11, and the marketplace responded over the next few years by abandoning almost all of the 12-bit and 18-bit computer architectures. UNIX on the PDP-11 would not become important until the late 1970's, but many experimental systems in the early 1970's used PDP-11 systems. By 1973, with the PDP-11/45, a model with a MMU was available, and many machines copied various features of the the PDP-11 -- you can see echoes of the PDP-11 in the Intel 8080, and the Motorola 68000 is almost compatable with the PDP-11, except for the changes made to expand the word-size from 16 bits to 32 bits.

    The C.mmp at Carnegie Mellon University used 16 PDP-11 CPUs on a single shared memory. This used a custom MMU for each CPU, and the operating system on this machine, Hydra, was the first to grapple with and solve the problems that remained unsolved in Multics. This was one of the first pure capability-based systems to be built. Later, the Cm* machine at Carnegie Mellon supported 50 LSI-11 CPU's; this achieved supercomputer performance with microprocessors, and the Medusa operating system on this machine continued to explore cabability-based system design.

  8. 1976

    Microprocessors that could begin to displace minicomputers began to appear. By 1976, these were mature enough that microcomputer kits such as the Altair 8800 (based on the Intel 8080) were released. DEC announced the LSI-11, Data General announced the MicroNova -- both were microprocessor versions of existing minicomputer architectures.

    Xerox PARC developed a series of machines based on the interesting question 'what do we want in the way of computer support for the paperless office of the future'. They developed the Ethernet protocol, and a series of very well designed file servers. In addition, they fully developed the Window-Mouse-Icon-Pointer user interface (sometimes known as the WIMP interface). The core ideas of the WIMP interface, including the mouse, came from Stanford Research Institute, and there were systems with graphical user interfaces built back into the 1960's, but the Xerox Alto computer was the first to cleanly integrate these in a personal computing environment.

    Generally, microcomputers ran first-generation operating systems; that is, a loader and an I/O library. This came to be knows as the BIOS, and as inexpensive ROM became more widely available, the idea of putting the entire BIOS in ROM became reasonable. At first, the only thing that was usually put in ROM was the bootstrap loader.

    The late 1970's were an era when operating system research began to diverge from the needs of the marketplace. Slowly, the ideas that were embodied in UNIX came to dominate what the marketplace wanted, while at the same time, operating system researchers were concentrating on programming models that were sufficiently arcane that most grad students never understood them.

    Our goal this semester is to understand these ideas!