An operating system functions as an abstraction layer, sitting between users and hardware to translate high-level interactions into the machine-level instructions a computer can execute. This concept explains how modern computing shields users and developers from direct hardware complexity.
OS as Abstraction Layer
Your operating system is what we call an abstraction layer. In fact, it has multiple abstraction layers in it. But what is an abstraction layer?
Your operating system is an abstraction layer. That is, we don't interact directly with that hardware. We don't send hardware level commands to interact with that hardware. Instead we interact with the OS, which then in turn operates the hardware. That's what we call an abstraction layer.
In short, the word abstraction just means a representation. We can see this with an art form called abstract art. With abstract art we don't see the exact image, or somebody trying to mimic real life exactly, but some sort of representation of that. This one here, it looks like there's some sort of bull in here, some sort of wolf or dog. We see some faces that are in here, but it's not like somebody's trying to draw them exactly. It's just a representation of something.
Your computer does the same thing. If you were to save a text document to your computer, then it would be saved in ones and zeros on your hard drive. But when it comes to whatever folder it's stored in, those are just pointers, kind of a made up representation by your computer. There's really not folders that are on your hard drive. It doesn't save files in a folder structure. So what's happening is it's creating an abstract layer. To us, it's creating this environment that we can interact with, that lays between us and the computer.
Without that abstraction layer we would have to feed code directly into the computer that that computer would understand. We'd have to feed the ones and zeros into that computer in order for it to do its processing. In fact, that's what we used to have to do: we would have these punch cards and we would have to punch out the code for the computer.
So here we have a punch, which means a one — if it has a hole in it, it's a one — and then we have zeros here because there's no punches. That's what we'd feed into the computer. And then here, if you look, there's lines, so 1, 2, 3, 4, so we'd feed it in there with these lines right here, and there'd be 0, 1, 2, 3, so we have 0 through nine. So this is a piece of information that we'd feed into there, and that would be what we consider machine code. Machine code is the set of instructions that's delivered directly to the hardware.
But we create this abstraction layer that we interact with, and so there's different ways that we feed code into this abstraction layer. Then essentially what this OS does is it creates those punch cards — it's really not punch cards nowadays, but the ones and zeros that are going to be fed into the computer to be processed.
Same thing if we're working with an app. We can consider that as being another abstraction layer, because that app then is sending codes to the operating system and working with the operating system, which is in turn working with that hardware. The app is probably not sending codes directly to the hardware. It could be — there are times that we do that — but it's probably more that code is being sent to the OS, which then is being translated into that machine language.
This has a great advantage to us, because now apps have very similar looks and feels, and so whatever operating system we have probably has very similar apps in the way that they're laid out and how we interact with them. This also allows application and coding advantages too, because now somebody who's developing an app doesn't need to reinvent the wheel. That is, they don't need to recode everything to interact directly with the machine. Instead it will utilize some of the components that the OS offers, and so that way it can just say, hey, I want to do a save as, and then the OS will handle it from there.
Now, the idea of an abstraction layer is just a general term, and so we actually apply it in multiple ways. As I mentioned, the operating system is an abstraction layer, and there are actually multiple abstraction layers within this OS as well. We're not going to get heavily into that at this point, but just know that we have this way of interacting with the hardware.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →