Modern operating systems would not be possible without the ability of a CPU to execute code at different privilege levels. This feature became available for mainstream PCs in the early eighties, when Intel introduced its 80286 and 80386 CPUs, and was readily employed by operating systems like Windows 3.11 and, of course, Linux, which Linus … Continue reading The protected mode in the x86 architecture
Category: Osdev
Virtual memory
If you wanted a slogan that summarizes key trends in the IT industry over the last 30+ years, then "everything is virtual" would be a good candidate. In todays computing environments, essentially every physical resource is virtualized - and pretty much the first resource where this happened in mainstream computing was memory. In this post, … Continue reading Virtual memory
How does multitasking really work?
The first PC on which I was running a copy of Linux back in the nineties did of course only have one CPU, so it was clear to me that it could physically only execute one instruction at a time - but still, it magically created the impression to run several programs in parallel without … Continue reading How does multitasking really work?
Interrupts – the heartbeat of a Unix kernel
Modern operating systems are mostly event driven - network cards receive packets, users hit keys or a mouse buttons, built-in timer create events or data arrives from a hard drive. To be able to process these events, a CPU needs a mechanism to stop whatever it is currently doing and run some code designed to … Continue reading Interrupts – the heartbeat of a Unix kernel
Get your kernel going – the boot process
Most careers in operating system development probably start with a seemingly simple task - produce a program that, at start time, takes full control of a computer and prepares for the execution of the actual operating system, i.e. boot the computer. It turns out, however, that - thanks to the complexity of modern x86 based … Continue reading Get your kernel going – the boot process
Why building an operating system from scratch?
What happens if you turn on a PC? How is an operating system able to run multiple tasks in parallel? What happens if you hit a key on your keyboard? And what actually is a process? If you have ever thought for more than a second about one of these things, then read on... A … Continue reading Why building an operating system from scratch?
Networking basics – the layered networking model
Recently, I picked up an old project of mine - implementing a Unix like operating kernel from scratch. I will post more on this later, but one of the first things I stumbled across when browsing my old code and my old documentation was the networking stack. I used this as an opportunity to refresh … Continue reading Networking basics – the layered networking model