In the previous chapter, we learned how a real computer is put together. You may be forgiven for thinking that it still seems very far from how you actually use a computer. That’s because there’s a whole layer sitting between the hardware and you: the operating system (OS).
The OS provides solutions to some tricky problems. How does the processor know where to begin executing code or where to find the next program? How do you change between running programs? How do I stop an evil program locking me out of the entire system? To handle these issues we need hardware and software to work very closely together. The software side of the solution is the OS. It’s the first program that runs on the computer and it acts as an interface between the user and the hardware. It abstracts away many of the details and peculiarities of different hardware components and provides a consistent platform on which other programs can run. It makes the computer easier to use, more secure and more performant.
Not giving user programs direct access to the hardware is a very good thing. Imagine writing a program where you had to handle the cursor yourself. You’d need to check for and identify any attached mice or trackpads, listen for and correctly interpret the hardware signals generated, recognise different types of clicks, gestures, taps and so on. It would be a nightmare! It’s much better for everyone concerned if the OS can take care of all this and simply feed the user program a stream of notifications about where the cursor is and what it is doing.
Modern OSes include Microsoft Windows, Apple’s macOS and GNU/Linux. They are all immensely complex conglomerations of software components that can handle a huge range of tasks. In this chapter, we’ll try to pare things down to the core commonalities. We’ll see how a computer starts up. Then we’ll briefly review some necessary additions to our hardware model. We’ll examine the implications they have on the OS architecture. Then we’ll look at the core abstractions an OS provides to manage the key system components: the processor, memory and storage. In each case, the OS provides a virtual representation of the underlying resource.
There have been many operating systems over the years. Let’s look at a few of the most popular and how they differ from each other.
Windows is a family of closed source operating systems developed by Microsoft. The very first Windows was not much more than a visual
The full chapter continues in the book.
This site uses analytics to understand how readers find and use the book. Allow anonymous analytics?