The Operating Systems Layer

The Office

In the movie The Matrix the world as we know it turns out to be a giant computer simulation, a virtual world. Imagine a virtual building in this virtual world. Now imagine a tiny virtual office in this virtual building. There's a virtual trash can in the corner. Against one wall are several virtual filing cabinets. Each cabinet contains virtual folders. The folders contain virtual documents. In the center of the office is a virtual desk. The top is littered with documents, open folders, and a typewriter. The desk drawers contain puzzles, playing cards, calculators, address books, calendars, pens, brushes, and erasers. Anyone who has ever worked in a real office would be at home in this virtual office.

Windows, UNIX, and MacOS are all examples of families of operating systems. The operating system turns the low-level bits, bytes, and microchips of the hardware layer into a virtual office.

Here's a screenshot of my Windows desktop:

Drilling Down

Imagine you are sitting in your virtual office:

You need to finish the drawing you are doing for your art class. You start by clicking on "start", in the lower left corner of your desktop. You click on the MyComputer icon that appears on the start menu. A system browsing window opens revealing several icons. The ones labeled with letters (C:, D:, E:, etc.) are hard disks and CDs. Think of them as your virtual filing cabinets:

You open the "file cabinet" labeled "Local Disk (C:)".

Inside are folders. You double click on the one with your name. Inside this folder you find three sub-folders:

You double click on the courses folder. Inside you see one folder for each course you are taking this semester:

You double click on the art1a folder. Inside are various documents. These are the art projects you have been working on. You double click the one named "mom":

Notice that this window is not a browsing window. The operating system knew that the picture of your mother was created using a paint program, so the paint program was started and a paint window was opened. Now all of your painting tools and operations are at hand.

Folders as Trees

We can picture a folder as a tree. For example, suppose the clerk receives periodic reports from the company's office, which are located around the world. He might have a folder called countries. This folder contains three sub-folders: UK, USA, and India. The UK folder contains a single document: a report from the London office. The India folder also contains a single document: a report from the Mumbai office. The USA folder contains a document: DC, and two sub-sub-folders: Texas and California. The Texas folder contains documents relating to Huston and Dallas, while the California folder contains documents relating to San Francisco and Los Angeles.

Here's the countries folder as a tree:

Amazing, isn't it? At the hardware level your hard disk is nothing more than tracks containing bits, but at the operating system level it is a tree of folders and documents, and of course the documents might contain photos, music, programs, etc.