Computer Science › Section D · Operating systems › Topic D.1

The history of operating systems

Every phone, laptop and server runs an operating system, but the first computers had none. Following how operating systems grew, from a helper that loaded one job after another to software juggling many users and devices, explains why today's systems are built the way they are.

Why the story matters

An operating system (OS) is the software in charge of the whole machine. It stores and retrieves files, lets users ask for programs to be run, and provides the environment those programs need while they execute. None of this existed at the start. Each feature was added to fix a specific problem: wasted machine time, users who could not interact with their programs, or one expensive computer that had to serve many people. Once you know which problem each idea solved, the parts of a modern OS stop looking arbitrary.

One job at a time

In the 1940s and early 1950s a computer filled a room and ran one program, called a job, at a time. Before each job a person had to mount magnetic tapes, load decks of punched cards and set switches by hand; afterwards everything was cleared away for the next user. People reserved the machine in blocks of time on a sign-up sheet and had sole control during their slot. The costly processor sat idle through all that preparation. Early operating systems were small programs written to make setup quicker and to move from one job to the next with as little lost time as possible.

Batch processing and the job queue

The first big step was to separate users from the machine. A trained computer operator took over the room. Users handed in a job, meaning the program, its data and directions for running it, and came back later for the output. The operator loaded many jobs into mass storage, and the OS ran them one after another with no user interaction: batch processing. GM-NAA I/O, written for the IBM 704 in about 1956, is often cited as one of the first such systems. Waiting jobs sat in a job queue, ideally first-in, first-out (FIFO), although urgent jobs could be given priority. Directions were written in a job control language (JCL).

Worked example: ordering a job queue

Four jobs wait when the machine becomes free. In arrival order they are Payroll, Inventory and Grades, all of normal priority, then Rush, marked high priority. In what order do they run? 1. Under strict FIFO, jobs leave the queue in arrival order: Payroll, Inventory, Grades, Rush. 2. With priorities, the OS first takes the highest-priority job waiting, so Rush goes first even though it arrived last. 3. Among equal priorities FIFO still applies, giving Rush, Payroll, Inventory, Grades. 4. Check: every job runs exactly once, and only the high-priority job jumped ahead. This is why real job queues are described as only roughly FIFO.

Interactive and real-time processing

Batch processing suited payroll, where all the data and decisions are fixed in advance. It failed for work that needs a conversation: a reservation system must record bookings as they happen, and a writer revises a document line by line. Operating systems therefore began to support interactive processing, in which a running program exchanges messages with a user at a remote terminal, at first little more than an electric typewriter. Interaction only works if the machine keeps pace with the person. A task done in real time is one completed within deadlines set by the outside world. Real time means meeting deadlines, not simply being fast.

Multiprogramming and time-sharing

Computers in the 1960s were too expensive to give one user each. Multiprogramming keeps several jobs in memory at once, so when one stops to wait for a tape or disk, the processor switches to another instead of sitting idle. Time-sharing goes further: time is cut into short slices and the processor rotates among many users' programs so quickly that each person at a terminal seems to have the machine alone. MIT's Compatible Time-Sharing System (CTSS), first demonstrated in about 1961, was an early example. When one user runs many tasks at once in the same way, the usual name is multitasking. Many textbooks use multiprogramming loosely for time slicing as well.

Worked example: filling the idle processor

Assume each job repeatedly computes for 20 ms, then waits 80 ms for a disk transfer, and assume switching jobs costs no time. How busy is the processor? 1. With one job, it works 20 ms in every 100 ms, so it is busy 20% of the time. 2. With two jobs in memory, while one waits the other can compute, giving at most 40%. 3. Each extra job adds at most 20 percentage points, so five jobs could in the best case keep it busy 100% of the time. 4. Check: a sixth job cannot push past 100%. Real figures are lower, because waits do not line up perfectly and every switch has a cost.

From operators to personal computers

As time-sharing spread, users worked from terminals outside the machine room and the operator's role faded. A system administrator now installs software, creates accounts and fixes problems instead. Ken Thompson and Dennis Ritchie began UNIX at Bell Labs in 1969 and rewrote most of it in the C language in about 1973, which made it far easier to move to new machines. Personal computers brought single-user systems such as MS-DOS (1981), then graphical interfaces, which Xerox research pioneered in the 1970s and the Apple Macintosh (1984) and Microsoft Windows popularised. Linus Torvalds released the first Linux kernel in 1991 as a student in Helsinki.

Multiprocessors, networks and embedded systems

Machines with several processors, and now chips with several cores, let the OS run tasks truly in parallel. That raises two new problems: load balancing, keeping every processor usefully busy, and scaling, breaking work into pieces that fit the number of processors. Networks extend resource sharing from one machine to many. Embedded systems, computers built into cars, medical devices, appliances and phones, run operating systems that must save battery power, meet strict deadlines or run for years unattended. Real-time systems such as VxWorks have flown on NASA Mars missions, and smartphones run full operating systems such as iOS and Android, which is built on the Linux kernel.

Common mistakes to avoid

Batch processing has not disappeared: banks and payroll offices still run large batch jobs overnight. Real time is not a synonym for fast; it means finishing within an outside deadline, which may be minutes for one task and microseconds for another. A single processor with time-sharing does not run programs at the same instant: it alternates between them, and only several processors or cores give true parallelism. Do not confuse time-sharing, many users sharing one computer, with multitasking, one user running many tasks. Finally, job queues are rarely pure FIFO, because priorities let some jobs jump ahead.

Key takeaways

Early computers ran one job at a time with manual setup, wasting processor time. Batch processing let an operator queue jobs that the OS ran without interaction, using a roughly FIFO job queue with priorities. Interactive processing let users converse with running programs, which demands real-time response: meeting outside deadlines. Multiprogramming keeps several jobs in memory so the processor works while one waits; time-sharing slices time among many users, and multitasking does the same for one user's tasks. Administrators replaced operators, UNIX, MS-DOS, graphical systems and Linux followed, and today's operating systems also manage multiple cores, networks and embedded devices.

Flashcards

Flashcard

Operating system

Software in charge of running the whole computer

Files, running programs, and the environment they need.

Test your understanding

Question 1 of 5

Why was pure batch processing a poor fit for an airline reservation system?

Question 2 of 5

Five jobs wait when the machine becomes free. In arrival order: A, B and C (normal priority), D (high priority), E (normal). The OS takes the highest priority first and uses FIFO among equals. In what order do they run?

Question 3 of 5

A job computes for 10 ms, then waits 40 ms for the disk, over and over. Alone on the machine, what fraction of the time is the processor busy?

Question 4 of 5

Which statement correctly separates time-sharing from multitasking?

Question 5 of 5

A car's braking controller must react to a skid within a few milliseconds. What makes this a real-time task?

← Previous topicNext topic →