What Is an Operating System?

A Key Distinction: Kernel versus user mode.

Kernel:

User:


Operating systems are:

Computers are like onions

The Operating System as an Extended Machine

The textbook gives the following example:

The layers of disk software.

It seems to me here that what the authors really mean by "extended machine" is "abstract machine." They say as much here:

The job of the operating system is to create good abstractions and then implement and manage the abstract objects thus created. In this book, we will talk a lot about abstractions. They are one of the keys to understanding operating systems.


Crucial: "The operating systems real customers are the application programs (via the application programmers, of course)."

It is the relationship between the operating system and the application programs that our textbook focuses on, and that we will focus on in this course.

And that relationship is why you should care about this course: most of you will never write an operating system. But in your work as application programmers you will work with an operating system, and use its services. To be a master application programmer, you must understand the services you are using.

Furthermore: oftentimes, applications themselves must do some of the jobs an operating system usually does. Knowing how an operating system with millions of users has solved a problem can be a great guide as to how you, as an application programmer, should solve it.

Personal example: caching theoretical values for stock options: the system we built was much like a paging system for virtual memory.

The Operating System as Resource Manager

The previous section gives a top-down view. The bottom-up view is that the OS manages access to the CPU, disks, displays, printers, mice, memory, and so on by the various applications running on the system.

Imagine three programs printing at once with no OS, one printing "Hello world," one printing "Namaste," and one printing "Ni hao." The printer might print out something like:
"HNNeaillm haorasowosrtled"

Obviously, this is not what we want to have happen! The OS must manage the printer resource, so that applications can acccess it in an orderly manner.

The OS should share resources across both time and space: each app must get its own time with the printer, but may divide up memory at any single point in time.