Kopec Explains Software
Computing concepts simplified
4 months ago

Classic Episode: What is an Operating System? (Remastered)

Operating systems for laypeople.

Transcript
Speaker A:

On today's episode we talk about one of the most fundamental layers of the software stack, the operating system. Welcome to COPEC Explains Software, the podcast where we make computing intelligible. Rebecca, what's our question this week?

Speaker B:

Our question is what is an operating system?

Speaker A:

What is an operating system? Wow. Well, we started to talk about them a little bit in our episode last week. And in this episode I hope we can go into a lot more detail. What did you find most interesting about operating systems last week?

Speaker B:

Well, what I find into really cool is that they are a bridge or helping to communicate what the programs are doing, the software is doing to the hardware, if I'm understanding correctly. So a lot of the programs and applications and software that's built is actually built on top of the operating system.

Speaker A:

Yeah, that's exactly right. And I think there's two really important roles about operating systems that everybody should know. Number one is, like you said, they're a bridge between apps and the hardware. So they're kind of the software hardware interface. The other thing that everyone should know is that they provide services to apps. So these are things like networking file system access, providing a user interface, things like drawing a window or outputting some text.

Speaker B:

When you say services, do you mean that? That's like a shortcut?

Speaker A:

Yeah, that's one way of thinking about it. When a programmer writes an app, there's some things that they're going to need to do that other programmers writing other apps also need to do. So instead of everybody reinventing the wheel, what makes a lot of sense is let's provide that functionality built into the operating system. So that's what I mean when I say services. I mean common things that all programs are going to need to do that we want to just have a standardized way of providing so that every individual program doesn't need to reinvent the wheel. And there's all kinds of different services. So I mentioned earlier, networking file access, providing a user interface, but it can really be a large range. It can be everything from being able to interpret certain kinds of file formats to being able to communicate from one application to another. In fact, the number of services that the operating system provides has been expanding over time. Operating systems on early personal computers in the 1970s and 1980s would almost be unrecognizable from operating systems today. What are the operating systems that you're familiar with?

Speaker B:

Let's see, I would say Mac operating systems mostly because every time you update them, they change their picture and so you know which one you're running. I feel like they're the most clear to me when I've done something to update it.

Speaker A:

Yeah, so definitely. So on the Mac we call the operating system, macOS stands for Mac Operating System. Brilliant naming there. There's also, of course, Windows for computers, for personal computers. And when I say personal computers, I mean desktops and laptops because we can really think about our phones as personal computers too, or tablets.

Speaker B:

So those would be iOS and Android, right?

Speaker A:

The big mobile operating systems are iOS and Android and then another really big operating system but it's one we don't think about so much is actually Linux because Linux runs on most of the world's servers. The majority of the world's servers, which are the things that run our websites, exchange our email and run all of our other Internet services, are really important parts of our infrastructure. And most of them run an operating system called Linux, which is actually an open source operating system something I hope we'll get to in a future episode. What is open source? But so there's actually quite a diversity of operating systems and we can really categorize them into three different categories. We could talk about mobile operating systems, like you said, Android and iOS, desktop and laptop operating systems like Windows and macOS and then server operating systems like Linux. And Windows is also used as a server operating system as well. And Linux kind of exists all over the world. We'll talk later, but actually Linux finds its way into mobile and desktop as well.

Speaker B:

Can I take a step back though, as we're thinking about these different operating systems? They're doing the same standard services. Do they just approach them in different ways?

Speaker A:

Yeah, that's a great question. Different operating systems provide different what we call application programming interfaces, otherwise known as APIs. And you can think about them as libraries that provide that built in functionality. Now, the APIs are different from one operating system to another. So a programmer who writes an app for Windows is using different APIs than a programmer who writes an application for macOS. Therefore the same program will not be able to run that was written for Windows on macOS because it's using a different library that's built into the operating system.

Speaker B:

But I use Microsoft Word on a Windows computer. And on a Mac computer.

Speaker A:

Yeah, and there's a team at Microsoft who works on building those two different versions of it. Now, there are ways to build what we call cross platform apps. So there are actually libraries that build on more than one operating system that provide, as you can think, about, another layer of abstraction above the operating system so that the application becomes portable. But the vast majority of apps you use are actually built for each individual operating system and then need to be what we call ported from one operating system to another. Meaning basically we have to rewrite it using the APIs that come built into the other operating system.

Speaker B:

So a programmer has to be really familiar with an operating system in order to build an application that will work well with it.

Speaker A:

Yeah, that's absolutely true. And people tend to specialize as programmers in one operating system or another if they build desktop or mobile apps. So you'll hear about somebody being a, quote, iOS developer. And what does that mean? That means they've really become an expert in the APIs, those libraries that come built into iOS. So they really know how to squeeze out every bit of functionality and build really great apps for iPhones. But that same person doesn't necessarily have a ton of expertise in building apps for, let's say, Android. And there are people who call themselves Android developers, and they really are experts in the Android APIs. Of course, there are people who have learned both APIs and as we said earlier, there's people who build cross platform apps. But the key takeaway is that it's really a niche and a specialization, being an expert in each of the individual operating systems.

Speaker B:

APIs can you talk a little bit more about the differences between these operating systems?

Speaker A:

So I think we can think about the operating systems at many different levels, but one way I want to think about them is their business models, because I think that's something that everyone can really appreciate right off the bat. When you go into a store and you're thinking about buying a new desktop computer or laptop computer, you basically have a choice of a variety of manufacturers who ship computers with Windows, and then you have a choice of just Apple, who ships computers with macOS. The interesting thing about that is that the companies go about building their operating systems from totally different points of view in terms of how they plan to make money on them. So Microsoft makes money by selling Windows to what we call original equipment manufacturers. Those are companies like Ewlet Packard, Dell Lenovo, et cetera. Whereas Apple makes money selling its hardware products and then ships its operating system, macOS, for free with its computers. Microsoft you could actually think about as having more of an open ecosystem because it provides its operating system to multiple different manufacturers. Nowadays, it even makes its own hardware with things like the Surface. But Apple makes its own hardware and then ships its operating system just for its hardware. And so they really want to sell you hardware, Apple, because that's where their big margins are. They're not making anything on the operating system. Microsoft they're neutral. They're like an Arm supplier who doesn't care which side wins. They don't care if Dell sells more computers or HP sells more computers, as long as those computers are running Windows. Then in the mobile space, we again have kind of a contrast between a more open ecosystem with Android and a more closed ecosystem with iOS. Android made by Google, which happens to be a mostly open source operating system, which again, we'll talk about in a future episode. What that means is again shipped to multiple different manufacturers. You can buy a Samsung phone, you can buy a Xiaomi phone, you can buy an LG phone, and they're all running Android. Google actually ships its own hardware too. But again, they just want Android to be popular. They don't really care if you buy a Samsung phone or an LG phone. Apple makes iOS only for their phone. So again, it's a closed ecosystem. What we call that in business is vertical integration. So we say Apple is fully vertically integrated because they design both the phones and they design the software, whereas Google and Microsoft are shipping out to multiple different competitors who are competing in an open ecosystem.

Speaker B:

So in a lot of ways, when you're shopping for a computer or for a phone, one of the big decisions that you're making is which operating system am I going to use and do I want a Mac OS operating system or do I want a Windows one? Or is there a Linux option?

Speaker A:

Yeah, there's a Linux option too. Linux is a free and open source option, which you can just it's both free as in beer, as we say, and also free as in speech. It comes from the free software movement, something we'll talk about in a future episode. But Linux is something that will totally transform how your computer works if you install it over Windows or macOS. But yeah, the operating system has so much to do with how your computer works. It has a lot more to do with how your computer works than, let's say, the hardware. In fact, the hardware between most of the, let's say, laptops that you buy today is pretty similar. So a lot of the same off the shelf parts, the memory, the microprocessor will be the same from one manufacturer to another. But the operating system changes how it works. It changes what apps it can run, it changes what it looks like, it changes how performant it is on the same hardware. It changes what its capabilities are. It changes really everything about how you use your computer. And so when you make a decision between using a Mac or a PC much more than the hardware, you're really making a decision between the two different operating systems.

Speaker B:

And so when you're speaking about how it changes how you use the computer or how you interact with it, that goes back to the way that an operating system has the standard services incorporated into it, I guess.

Speaker A:

Yeah, absolutely. And so let me give you some obvious examples. Right? So how do we switch applications when we're using our Mac? We use the dock. Right? How do we switch applications? When we're using Windows, we use the taskbar and the start menu. Those are two different features of the two different operating systems. But it goes much deeper than that. Everything about how every program on your computer works is at some point going through the layer of the operating system. So everything from how a button works, to how well the networking stack works, to how everything is organized on the file system, to how easy it is for app developers to make different kinds of apps is all decided by the operating system. So the operating system is fundamental to everything that we do in interacting day to day with our phones or our tablets or our laptops or desktops.

Speaker B:

It really is the base of the experience of using the computer or the phone or whatever device that you're using.

Speaker A:

Yeah, absolutely. And I think the fun battle in the 1990s and was between Windows and the Mac and the fun battle today is between iOS and Android. And people might not realize actually how one sided that battle is internationally versus in the United States. So we're in the United States and in the US. It's close to 50 50, android is close to 50% to 60% market share and iOS is 40% to 50% market share, depending on the quarter and the data company that you look at. But globally, Android has closer to 80% market share and iOS has less than 20% market share. The vast majority of the world runs on Android and that's kind of interestingly, a real parallel to what it was like between the Mac and Windows and still is where about 90% of desktop and laptop computers in the world run Windows and 10% run the Mac. Now, the Chrome OS, which is Google's operating system for low power laptops Chromebooks like Chromebooks, right, is starting to take some share. So probably Windows share is a little bit lower than 90% now if we looked at the current numbers. But it's really similar in that you have this really popular operating system that's more of an open ecosystem, Windows. And then you have this really closed operating system, macOS, that only runs on Apple's hardware, that has a much, much smaller market share. It's the same thing in the mobile space. You have Android, which is the open ecosystem that is the vast majority of the market share. And you have iOS, which is the closed ecosystem that has a much smaller market share, except for in the US. And a few other countries where it's closer to 50 50.

Speaker B:

So we've talked about Android and iOS and macOS and Windows. Are there any other operating systems? We touched on Linux, but besides that, are there other operating systems that we just don't know about on a day to day basis?

Speaker A:

Yeah, there's a ton of different operating systems and some of them are really niches and kind of hobbyist operating systems and some of them really get used for very serious things in the server space. For example, if you're running a big IBM mainframe, you might be using an operating system called Aix. It's not something that anyone on a day to day basis would need to know about. But if you're working on mainframes, you have to become an expert in using this totally different operating system that works completely differently from Windows or macOS. In the embedded space, there are what we call real time operating systems or operating systems that are in very usually resource constrained environments that need to give instantaneous feedback and response based on something like a medical device. Maybe the operating system that runs in, let's say a brain monitor is going to be radically different than the operating system that runs on your desktop computer. But all the same, it still needs to provide services to the apps on the brain monitor. Maybe something that's looking at brainwaves or waiting for some serious event to happen. Some of the services will be somewhat similar. So things again like file system services or networking, you're still going to need that on most devices. So you still have those services, but then you might not have the same kind of services for building a graphical user interface or for allowing you to have interap communication.

Speaker B:

So the operating system is not only that just for the computers that maybe I would use in my day to day life, but it really is for anything that we're using. And on top of that, what operating system is built and what it's used for really has to do with the type of task or I guess the mission of the device that it's being installed on.

Speaker A:

Yeah, that's absolutely true. So for example, Windows, popular on desktop and laptops, no longer is made even for mobile phones. So Microsoft stopped making their Windows Mobile operating system a couple of years ago. So it really specializes now in desktops laptops. And there's a server variant as well. The operating system that makes its way into the most different niches is Linux. So Linux dominates the server space. It's the most popular operating system for servers.

Speaker B:

And just for my own benefit, and I guess for our listeners, what actually is a server? Maybe a quick debt, a quick definition.

Speaker A:

A server is basically just a computer sitting out there on the Internet waiting for people to request information from it. They could be requesting their emails, they could be requesting a website, they could be requesting a streaming video. But it just basically means that it's a computer out there on the Internet waiting for people to connect to it and pull information from it. Okay, so servers run all of our infrastructure. They're really important. And Linux dominates that space. But Linux finds its way into almost every other space. There's linux for the desktop. Maybe you've heard of the Linux distribution called Ubuntu. Maybe you've heard of Debian, maybe you've heard of Red Hat. These are popular Linux distributions, but it also makes its way into your phones, believe it or not. So Android, we talked about it earlier, it's the number one operating system in the world for mobile devices, has a huge market share. There's billions of devices shipped and every one of them actually has Linux inside of it. So this might confuse you because I said, wait, Android is an operating system. Linux is an operating system. Are they the same thing? Not exactly. So the most central part of the operating system, the lowest layer and arguably the most important part is called the kernel. And it provides the most essential services, again, things like file system access, interfacing with hardware. The kernel is actually called Linux in Linux operating systems. So Linux can be both the name of kind of the overall distribution because we call them Linux distributions, but it's also the name of that central component, the kernel. And it just so happens Android uses the Linux kernel. So it's actually the kernel. The most central part of Android is Linux.

Speaker B:

So a kernel is like the core of the operating system. It's going to be maybe the most basic in some ways and most essential functions for an operating system. And everything gets built off of that.

Speaker A:

That's exactly right. So everything else is built on top of the kernel. And so the kernel needs to be super reliable, it needs to be super battle tested. And that's why they chose Linux. So when Android started, it actually started as a startup company in the mid OS and then it was purchased by Google. They didn't want to reinvent the wheel and create their own kernel from scratch. They wanted to worry about the more interesting parts for a mobile phone, the user interface, the application programming APIs for people to make apps for the phone. They didn't want to have to worry about that lowest layer and reinvent the wheel. So instead they took Linux, which already existed, had already been around for about 15 years by then and was already battle tested and they built around it. And that's what actually a lot of new operating systems do, is they use the Linux kernel and build other components around it. There haven't been very many that have been as successful as Android. Android is a runaway youth success. Maybe the most successful operating system of all time, arguably. But it makes a lot of sense to use an established kernel and build other components on top of it.

Speaker B:

Is Linux the only kernel out there? Are there other types?

Speaker A:

There's a lot of other kernels. So there's in Windows we have what we call the Nt kernel, macOS. We have XNU, which is a combination of mock and FreeBSD kernel. And it's kind of a mishmash, but Linux gets used in so many different places. The operating system that runs on your TV often has a Linux kernel. The operating system that runs in your coffee maker might have a Linux kernel. The operating system that runs in your video game console could have a Linux kernel. So there's a lot of different kernels out there. But Linux has just become really dominant in terms because it works well, it's highly portable, it's been ported all over the place and there's a lot of momentum and development around it.

Speaker B:

Do they all function the same way? Or are there different types of them.

Speaker A:

There's two main different types of kernels. There's what are called monolithic kernels which try to just kind of bundle everything together in the kernel as much as they can and they get some performance advantages and some simplicity by doing that. And there's also what are called microkernels where they try to keep the very center as slim as possible and then put some of the services outside the kernel so that if one of those services fails, the whole kernel doesn't get brought down. So there's these two different theories of kernels and for a long time the theory was that the microkernel was actually the future and that's where things were going to be going. But the reality is that Linux is actually a monolithic kernel and so it's not actually clear that one or the other is actually going to win out. They both exist. There are versions of both out there being used for real applications. There are benefits to both sides. The microkernel philosophy is often seen as the more clean design, but the monolithic kernel has some practical advantages and so I wouldn't want to say that one or the other is necessarily better.

Speaker B:

Do the operating systems have similar characteristics or like, do they work equally?

Speaker A:

Yeah, there's going to be performance differences. So even when you have software that's portable, we talked earlier about portable frameworks that let you take an app and recompile it for different operating systems, there's going to be differences even on the same hardware about how well that app will perform because of the different operating systems. So it's going to depend on how great was the engineering or what trade offs were made at the operating system level. So for example, I mentioned earlier networking stack. You could take the same web server, run it on Linux, run it on FreeBSD, run it on Windows and you might see that it's able to handle a different number of requests per second depending on which operating system it's running on. Because of differences in the networking stack, because of differences in the kernel between the various operating systems. So it definitely does matter and it does make a difference. We do live in kind of a world where there's only a few operating systems that really matter, though the reality is that the vast majority of the world runs on the ones we've already mentioned. And there's a reason for that. And the reason is that we talked also earlier about how people really become experts in one or the other. As programmers, you learn the APIs for one operating system or another operating system. And so once you have a big developer base building apps, building programs for your operating system, you kind of get what's called the network effect, where the more people that are building for your operating system, the more people that want to build for your operating system. So it is a bit of a popularity war and a contest and that's why in the 1990s, actually, windows arguably became a monopoly on the desktop side. And Microsoft was sued for antitrust by the US. Government because Windows was just so dominant. And one interesting thing about that story is that Microsoft ended up investing in Apple, actually in 1997, while Apple was almost going bankrupt and Steve Jobs had just come back to the company before he turned everything around. And probably one of their arguments there is they want to keep Apple alive. So it looks like they're not quite a 100% monopoly. As long as the max still around with five to 10% market share, they're not really quite a complete monopoly. So that was kind of an interesting and ironic point in tech history. But today there is antitrust concerns about not so much Windows anymore because Windows and desktop computing is not where the future lies, really. Right. But in the mobile space, android is such a dominant player around the world. As we said, they have 80% to 90% market share. And Google's business model worries people sometimes because I told you earlier that Android is a free and open source operating system. That means that Google's not really making a lot of money selling Android. What they make money on is the services. So the default search engine on most Android devices, google the default store on most Android devices, the Google Play Store, right? Google Music is going to come built into a lot of them. But every time you do a search on an Android device and it defaults to a Google search engine, you are making a little bit of money for Google through some search ads. And a lot of people are worried about how much tracking that entails, et cetera, et cetera. So the next big target, I think, for operating system antitrust might be Google. But a lot of people also are upset at Apple because on the iOS side, the only way to get an app as a regular consumer on an iOS device is through the App Store. On the Android side, you can get an app two ways. You can get it through the Google Play Store or whatever. There's other stores too, like the Amazon Store that comes with their Fire tablets. But then you can also do on Android what's called side loading, which means installing the app yourself over a USB cable or downloaded from the Internet onto your device directly without going through the App Store. So some people, including some governments, are upset with Apple that there's no alternative to the App Store and that their rules for what's allowed on the App Store. And what the rules are for making money on the App Store can kind of just change on their Win. So it seems like there might be an antitrust case there as well. So as we can see, when these operating systems become really big and really popular, there's concern that they become monopolistic.

Speaker B:

So the operating system really isn't just about using the computer and it being this really important and essential software piece, but it is directly tied to the economics and the business side of this industry.

Speaker A:

Absolutely. The business model is really a huge part of why an operating system becomes successful, does not become successful, and how it kind of affects the ecosystem of computing.

Speaker B:

So how should a consumer go about choosing the operating system that they want to have or to be using?

Speaker A:

Well, I think there's a lot of inertia, and I think a lot of us stay with the thing that we're the most comfortable with. And unfortunately, today more than ever, we get kind of locked in because you buy an iPhone and then you've spent money on iOS apps, and then you can't then recoup that money when you switch to an Android device. Because all those apps, as we talked about earlier, only work on the operating system they were designed for. Same thing. If you buy an Android phone, then you have all these Android apps you've paid for over the years and maybe some Google service is that you're tied into, and they might not all exist on iOS. And so you would have lost all that money. You don't want to lose that investment. You want to recoup it when you get your next phone. So we get kind of tied in, and then the other reason we get tied in is we just get really used to what we're using. So you might know exactly how to get to everything in Android, and then switching over to iOS is going to take you a few weeks of adjustment. So for inertia reasons and for our previous investment reasons, a lot of us get tied in. But the number one decision you're really making when you buy a new computing device, whether that be when you're deciding between Windows or Mac, or when you're deciding between Samsung or Apple, is really the operating system. Which operating system would you rather be tied to? Windows. macOS android. iOS.

Speaker B:

And that's, I think, an important thing to consider when you're in being an informed consumer so that you can make some intentional decisions and know what you're actually purchasing.

Speaker A:

Yeah, absolutely. And I think there was all these technical things we talked about earlier to the average consumer. You really don't care about these things. You just want apps that work, and you just want something that your phone or your computer to work well. And I think all of them work well today. Windows, macOS, iOS, Android, even desktop Linux, they all work perfectly well for most consumers, or Chrome OS for that matter. And so it does come down to a lot more what's your investment been in the past are the apps that you're interested in available to you there, and then it becomes more of a fashion choice in the end, or an investment choice, or a nurture. Choice than it is really a technical.

Speaker B:

Choice for a programmer, though, it isn't that when you dive into iOS or to Android or to macOS or to Windows, that is almost in some ways like a bigger decision because this is going to be your career or maybe something you're really passionate about. And the way that you do the work for those different operating systems is going to be different.

Speaker A:

Great point. You're tying yourself to that company's fortune. So when you become an iOS developer and you've spent months, years of your life training to be an expert in Apple's APIs, you now are tied to the decisions that Apple makes in the future. So because your app is going to need to keep running with new versions of their operating system, so you're tied to their technical decisions, but you're also tied to their business decisions. If you're not comfortable with the way they run the App Store, you find something unethical or immoral about it. Well, that's the only game in town on iOS. So as a programmer, as a developer, you're really making a much bigger decision than a consumer is when you're picking the operating system that you want to develop. For well, thanks so much for listening to us. Don't forget to hit subscribe and don't forget to also like us on your podcast, player of Choice. We'll see you next week.

Speaker B:

Bye, everybody.

We're travelling this week, so we remastered a classic episode from 2020. It's our second episode—operating systems explained for laypeople. Checkout the show notes below for other classic episodes about operating systems. Original description:

This week we discuss the most essential layer of a computer’s software, the operating system. We describe what an operating system is. We denote the differences between popular operating systems. The varying operating system business models are described. And we talk about why operating systems are important.

Show Notes

Follow us on Twitter @KopecExplains.

Theme “Place on Fire” Copyright 2019 Creo, CC BY 4.0

Find out more at http://kopec.live