The Software Domain: Operating Systems

MF: lightly clean up to make the text more concise

On this page, you'll learn about the software that directly manages the computer's hardware, the operating system.

Your computer came with an operating system (OS) installed. Operating systems are the underlying programs that your apps interact with to communicate with the computer. For computers with keyboards, it's probably Linux, macOS, or Windows. For phones and tablets, it's probably Android or iOS.

Roughly speaking, the operating system handles the basic tasks that your applications depend on, including:

In a computer, there are many applications and operating system tasks all wanting to run at once. Every operating system has a kernel that manages when all these processes run.

The Kernel

The kernel deals directly with hardware (keyboard, mouse, microphone, camera, hard drives, memory, printer, speakers, screen, etc.). So the kernel is generally written in a low level language so it can control that hardware. It handles several important tasks:

These days, OS kernels are remarkably similar. Of the five systems listed earlier (Linux, macOS, Windows, Android, and iOS), four of them (all but Windows) are based on variants of a single kernel, called Unix.

Read more about Unix.

This still needs editing. If we find a way to cut this back, more students will actually read it. --MF, 11/8/17

("Unix" is a trademark, currently owned by The Open Group, and not all of the variants discussed here are authorized to use that name, but they all provide essentially the same program interface.) Unix was created around 1970 by Ken Thompson and Dennis Ritchie at AT&T Bell Laboratories.

Prior to Unix, almost everyone thought that an operating system had to be developed for a particular computer architecture, and had to be written in the machine language of that computer, the very low-level instructions that the hardware understands directly. The first version of Unix was also written in the machine language of a particular computer, the Digital Equipment Corporation PDP-7. But the Unix developers knew that the PDP-7 wasn't the only computer in the world, and better ones would come along, so they wanted to make Unix portable, meaning that it could be brought to a new computer architecture without a complete rewrite. So in 1972 Dennis Ritchie invented the C programming language for that purpose. C is similar to other languages available at the time, but with one added feature: a C programmer can read or write any individual byte of the program's memory by knowing its address, a number that distinguishes it from other bytes. (You can see that this feature is quite the opposite from high level abstraction. It is useful only to a programmer who's thinking in detail about what's where in the computer's memory.) Unix was then rewritten in C.

Because of its portability, Unix spread quickly to many computer architectures. Researchers at Berkeley developed a version, based on the AT&T version, with virtual memory, the ability to run a program that's only partly in the computer's main memory, with the rest kept on a disk. This Berkeley version is an ancestor of Apple's operating systems, macOS (since macOS 10.0) and iOS. (An Apple computer doesn't behave anything like a Unix computer, but the differences are almost all in application-level programs, not in the kernel.) Android, Google's operating system for cell phones and tablets, is based on Linux, a complete rewrite of Unix originally written by Linus Torvalds, who was, at the time, a computer science student in Finland.

The application-level programs that were part of the original Unix package have, in most systems, been replaced with rewritten programs from the Free Software Foundation's GNU (an acronym for Gnu's Not Unix) package.

  1. Explore the programs running on your computer right now.
    1. Find out how to list all the programs that are running right now on your computer, and collect such a program list in a text file.
    2. Count how many of them are programs you asked the computer to run.
    3. Of the rest, can you figure out from the names what they do?
    4. Which ones are part of the operating system (not the OS kernel)?
    5. See if you can figure out the purpose of some oddly-named ones by doing a web search.