Familiarity – even if it implies no real understanding at all – can dull the sense of mystery. Educators who wish to cultivate the sense of wonder therefore face the challenge, as the education philosopher Kieran Egan noted, of defamiliarising the familiar.*
You may be thinking "operating system? I already know what that is!" And yes, you know about Mac and Windows. You may even recall those goofy commercials where two actors are playing the role of an operating system. You've probably debated the virtues of iOS vs. Android with family members and questioned their smartphone of choice? So you already have an idea of what an operating system is. But why do we need this Thing? What is inside this mysterious box? What does it do?
Why Operating System?
We have computer hardware and we have applications that run on that hardware. If we got a computer without any software on it — just the processor and memory — we wouldn't be able to do much with it. Even if it had keyboard and mouse for user input, when we press those keys nothing would happened. We would see nothing on the screen. We need some software installed that knows how to talk to the hardware, as well as how to interpret use inputs and provide users with output.
Even if we're talking about a server, that does not interact with users directly, we still need some software to manage its various tasks and manage the memory allocated to different type of work.
In Search of an Analogy
What's a good analogy for an Operating System(OS)? I was thinking of air traffic control maybe. The job of an air traffic controller is to direct airplanes in certain airspace – those taking off, those in flight, and those landing — so that no one crashes into anything. This is a difficult job but also very specific and well defined. So nah, too easy.
What about an analogy with the human brain - our brain processes various inputs and generates various outputs. Some of the inputs for consideration might be:
"I need to use the restroom",
"I hear a loud noise in the other room",
"I have a meeting in 30 minutes, better type faster and finish this writing".
Similarly on a computer, something needs to process all these actions:
"User just opened another browser tab, need to allocate some more memory",
"Someone inserted headphones, need to redirect audio output to headphone jack from the speakers",
"Someone is rapidly smacking keyboard keys, better send the correct electric currents to the liquid crystal display (LCD) of the monitor screen. So those letters display on screen and the user can see what they're typing."
"Just launched a zoom meeting need to stream video, audio, process network I/O, schedule this program on the processor with appropriate priority".
And many more. This is what an OS is 'thinking' about constantly. Let's take a look at some of the components of an OS.
Operating System Functionality
Multitasking: we often want to run multiple applications at the same time — we want to check our email, while watching a video, and editing a spreadsheet. In reality, we can executes one code instruction at a time on a single processor. The reason it appears that all applications are running simultaneously is because code from different applications is interleaved. So something like — run appA code for 100ms, followed by appB for 100ms, followed by appC, and then back to appA.
Well, don't we need to keep track of how many applications are waiting for their turn? Decide how much time to give to each application? Do they all get equal time or some more important than others? Yes, and the operating system decides all this. One of main components of an operating system is called the scheduler.
Memory Management: another component of an operating system deals with keeping all of the applications and data associated with them in the computer's memory. Both working memory (aka RAM) as well as permanent storage on the disk. To extend our analogy, like our brain's short term memory and long term memory respectively. Operating system needs to keep each application's data separate from other applications, it needs to make sure enough memory is available and if not alert the user ('hey it's time to get several gigs of baby photos off your phone').
User Interface - OS is what handles our mouse clicks and keyboard strokes. And mobile operating systems are designed with touch screen interface in mind. This is the part of the operating system functionality most familiar to us. This is how we distinguish one OS from another too, based on how it looks.
This is the functionality of a few major components, painted with broad strokes. Operating systems serve a number of other functions and there are other components dedicated to those functions. But now that we have some appreciation for what's inside the box, let's zoom out and take a look at some of the major operating systems.
Major Operating Systems
The dominant desktop operating system is Windows with a market share of around ~80%. macOS is in second place at ~15% and the varieties of Linux are collectively in third place. On smartphones and tablets, Android's is up to ~70%. Apple's iOS is around ~12 percent globally. Linux varieties (aka distributions) are dominant in the cloud server space.
The purple boxes represent open source. The orange boxes represent closed source or proprietary operating systems. The year listed is the time of their initial release so we get a sense of how long each operating system has been around. The arrows indicate that the bottom OS was derived from the top OS to some extent. For example, Linux was derived from Unix, though didn't use existing code. While Android uses the Linux kernel code.
On the Windows side, Windows Subsystem for Linux (WSL) allows running Linux natively on a Windows computer. This announcement was a big deal, as Windows and Linux have been rivals for many years.
Side note: What's up with Ubuntu and why is it so popular? Linux has many distributions, including Red Hat, Debian, Fedora, and many more. Most are not easy to use, to install, and don't have many user applications. Ubuntu was derived from Debian and is a popular commercial Linux distribution. This is because of the company behind Ubuntu. "Ubuntu is popular because Canonical made an effort to make it popular. Canonical saw the potential in Linux and did what no other company/distribution had the nerve to do . . . make it user friendly" from a Reddit user.
Now you know more about operating systems, at least a little bit more. All software programs that you write will run on some operating system on top of some computer hardware/processor.
Writing your own operating system is an exercise in applied computer science — you'd need to implement practical algorithms, use data structures, process network input/output, manage user interaction and more. In fact, this is a semester long project in some undergraduate computer science programs. But, you don't need to know the internals of operating systems in order to write software programs of course. That is the beauty of abstraction.
It's inspiring that groups of human beings working together have tamed the necessary complexity and created a reliable useful software program — the modern operating systems. Next time your computer 'crashes' just think about all of the times that it didn't crash, and how that's evidence of considerable human ingenuity and power of collaboration.
*From this article on education philosophy