Booting: One Power Press, and Everything You Learned Walks On Stage
The computer you just turned off is dark. The screen is blank, and memory is empty. But we kept learning that the kernel manages everything. It starts processes, builds walls in memory, answers system calls. So where is that kernel right now? With the power off, there is nothing in memory at all. Then in that single instant of pressing the power button, how does an empty computer turn into a living, working one?
Press the Power: An Empty Computer Wakes Up
Picture a computer with the power off. Memory is wiped clean. The kernel we learned so much about, and the processes that branched from it, are not in memory at all right now, not a single line. With no electricity flowing, of course not. But press the power button and something strange begins. Someone has to take the first step. The one taking that first step is not the grand kernel, but a very small program always etched inside a chip. We call it the startup program, or firmware. The firmware is fixed in place from the start, so that it is the first to wake the moment power arrives.
Tap the power. Memory starts empty, then the tiny startup program inside the chip (firmware, blue) wakes up first. The kernel is nowhere yet.
Only one small firmware has woken. Memory is still nearly empty. The firmware is not clever. It does not know how to dress up the screen nicely or launch apps. The firmware knows just one thing: how to bring in the real worker. And that real worker is the kernel. But the kernel is not in memory right now. While the power was off, the kernel lay asleep on the disk as a file. So the firmware's task is clear. Go to the disk and bring that kernel over. Let us see that scene next.
The Firmware Lifts the Kernel from Disk into Memory
Here, recall one promise from a past lesson. We said the kernel is always resident in memory, managing everything. But think it through: even a kernel said to be always resident has to be loaded into memory for the first time at some moment. That moment is right now. The firmware finds the kernel file on the disk and carries it into memory, chunk by chunk. At last the kernel takes its place in the once-empty memory. That kernel we kept calling the lead of every act throughout this area finally steps onto the stage for the first time, in this single scene of booting.
Tap the firmware. The kernel (gold), asleep as a file on disk, rises into memory chunk by chunk. The kernel we called always resident takes its place for the first time, right now.
Once the kernel is fully in memory, the firmware quietly hands over its duty. The little startup program's role ends right here. Having woken the real worker and seated it, the stage now belongs to the kernel. What does the awakened kernel do first? The kernel alone cannot do a single thing we can see. The icons on the screen, the keyboard input, the apps we open, all of it only happens once something is set running. So the very first thing the kernel does is give birth to a first process. Let us see it next.
The Kernel Bears a First Process, and Branches Spread
Recall the lesson on processes. A program is a file asleep on disk, and the state of it running and alive is a process. In booting, the kernel does exactly that, for the very first time. It picks one program asleep on the disk and runs it, turning it into the first process alive on this computer. But the kernel does not launch every app one by one itself. Instead this first process bears another process, and that child bears its own children, spreading out like a single tree growing branches. The many programs we use are all branches that forked off from this first process.
Tap the kernel to bear the first process. Tap again and its child processes branch out. From the kernel (gold) to the first process, from the first process to many (green).
One tap brought the first process into being, and another sent children spreading out beneath it. This is the starting point of the very screen we see every day. The program that paints the desktop, the clock, the notifications, all of them are processes somewhere among these branches. And these processes each hold their own memory space, and whenever they need something, they ask the kernel with a system call. The pieces we learned separately throughout the area are clicking into their places, one by one, within this single scene of booting. Now let us stack those pieces, layer by layer, into one picture.
It Comes Together, Stacked in Layers (Hardware to Apps)
Now let us see the whole as one picture. At the very bottom is the hardware. The real parts like the disk, memory, screen, and keyboard. Above it the small firmware wakes and takes the first step, and that firmware loads the kernel. The kernel sits right above the hardware, speaking directly with every part, building walls in memory and managing the schedule. Above the kernel is the first process, and above that the apps we use are stacked in turn. The lower layer must hold firm for the upper one to stand. Without hardware no firmware, without firmware no kernel, without the kernel no processes, without processes no apps can stand.
Tap from the bottom to light up one layer at a time. Hardware, firmware, kernel, first process, apps, in that order. A lower layer must stand before the next can go up.
Once the light reaches the apps at the very top, the screen we see is finally complete. The once-dark computer is now alive. The fun part is that after this tower is built, what the firmware did is almost forgotten. As we use an app, we hardly notice that below it sits the kernel, and below that the firmware and hardware hold it all up. Yet every one of those layers was raised from the bottom up, neatly, in the single moment of booting. Now, for the last step, let us trace from start to finish how one power press joins all of this on a single line.
One Power Press, All of It: the Area on One Panel
Joined on one line, it goes like this. Press the power, the small firmware inside the chip wakes, the firmware lifts the kernel from disk into memory, the kernel bears the first process and from it the apps branch out. Within this single line that unfolds in just a few seconds lies almost everything we learned in the area. The files asleep on disk and memory, the always-resident kernel, the living processes, each process's own memory space, the drivers that talk with the parts, the permissions that decide who may do what, and the system calls by which a process asks the kernel. Booting is the scene where all these pieces appear together for the first time, and in a set order at that.
Tap the steps in order to follow one full boot. Power, firmware waking, kernel load, first process, the app stack. The pieces you learned in the area thread onto one line.
Now the brief moment of pressing the power button will look different than before. Inside it a small startup program wakes the kernel, the kernel bears a first process, and our apps climb up layer by layer, a vast assembly underway. We began this area by asking what kind of housekeeper an operating system is. Booting is the very scene of that housekeeper waking in the morning and setting up the household, step by step, from the start. The single moment, quietly repeated each day, in which a dark machine finishes getting ready to greet us.