How do you explain an OS Kernel to a 5 year old?

Anand Thanumalayan
2 min readMay 1, 2020

Imagine your CPU as your home

Homes will have a hall, kitchen, bedroom etc., isn’t it

Now let’s say you’re out of the house and you’re hungry and want to eat something

To enter the house, you’ll need to open the “door” right?

The Kernel is like your door!

Now let’s say you don’t have a door and you’ve just the bricks piled up in the place of a door

Every time you want to enter the house you have to unpile all the bricks and then enter right?

The door makes entering easy for you!

The door is your kernel and kitchen is your processor and the house is your whole CPU!

Now the imagine that you are a *software and you want to execute something on your CPU

Without a kernel every software will have to unpile the bricks i.e, managing/converting your program instructions specifically to the underlying hardware’s instruction set to execute any simple line of code!

With Kernel you just have to know to how to open the door! you don’t have to unpile the bricks

Which means you only need to know how to interact with the Kernel, not the underlying hardware

I know you might think that’s why you have an Operating System like Windows/Linux/macOs right? You always install software on Windows, Linux?

Where does the Kernel come in?

Okay, the Operating System is like a facade your house, the front of a building

The Kernel or the door is the main part of the facade that actually let’s you in.

Now there are so many types of houses, like a hut, an apartment, an igloo, a bungalow etc.,

All huts can have a same kind of door, but it may not be reusable for a bungalow right? Bungalows need bigger doors!

Similarly you have different processor types 32 bit, 64 bit, ARM and so on

Each demand a different type of door i.e, the Kernel

But your operating systems will take care of that. The install the right *door for you

Each operating system like windows, linux, macOs, has it’s own kind of a door which it re-uses for similar types houses, in other words for similar types of processor architectures like 32 bit, 64 bit, ARM

And that’s why softwares like the Chrome browser run the same way on your 64-bit windows laptop and my 32-bit windows laptop

Now, can you tell me the reason?

Yes, it’s because it only need to run on top of the Operating System Kernel and not on top of the processor.

--

--

Anand Thanumalayan

Solutions Architect (AWS & Azure) | AWS CSA | CKAD | MCP | Big time curiosity bugger who likes to learn everything in layman’s language.