When you hear the word kernel, you might think of popcorn, chicken, or popcorn chicken, or
the kernel's popcorn chicken. But you might have also come across the same word in a computing context, with folks talking
about the Linux kernel or Windows kernel.
What the heck is it? The kernel is basically the heart of whatever operating system you're using.
Although the kernel is a software component, it sits between your system's hardware and
the rest of your OS and software. You see, user software such as your web browser or your favorite game doesn't talk directly
to your hardware. Instead, the kernel serves as an intermediary.
But why is this necessary? Well, one of the main functions of a kernel is to abstract away the physical differences
between hardware setups. There are an endless number of possible hardware configurations in a PC or server.
I mean, think of how many rigs you could build just from PC part-picker lists.
A kernel gives your other software a standardized surface area to interface with, making the
differences between individual machines much less of an obstacle.
As a more easily digestible analogy, kernels provide the low-level plumbing that your software
hooks into. The pipes underneath your house might not be all that interesting, but they allow you
to make tons of choices as to what you're gonna hook them up to, without caring whether
it's a dishwasher, a jacuzzi, or that cool RGB shower head you found on Amazon.
Well like I'm gonna see that and just ignore it? Another key function of the kernel is to provide security and stability.
Allowing programs to talk to hardware in any way they wanted could allow them to access
data they aren't supposed to, which could lead to a system crash or data theft from
a malicious process. But because programs have to interface with the system through the kernel, the kernel
can prevent these sorts of shenanigans. If you've ever heard the term protected memory space, this is part of what we're talking
about. Running programs get their own portion of RAM and can't access memory outside of that
thanks to the kernel. But of course, plenty of things can still go wrong.
Traditionally, kernels were designed in one of two main ways.
Monolithic, meaning the kernel incorporates most of the main functions of the whole operating
system, and microkernel, in which the kernel handles more basic functionality, leaving
more software such as device drivers running outside of the kernel.
Monolithic kernels tend to be higher performance and easier for programmers to work with, while
microkernels have the advantage of being able to kill problematic processes without bringing
down the whole system. Now the Windows kernel was designed to be more of a microkernel, while the Linux kernel
was more monolithic. But these days, both operating systems have moved towards a hybrid kernel model to try
and incorporate the advantages of both design philosophies.
For example, Linux is commonly found on servers that need as much uptime as possible.
In other words, you don't want to reboot the whole system if there's an issue, so
it makes sense that Linux has moved away from being more purely monolithic and has tried
to become more modular. Meanwhile, in Windows Land, gamers benefit from the OS adopting a more monolithic philosophy
that doesn't have as much overhead, enabling higher performance for folks who are trying
to squeeze as many frames as possible out of their rigs.
Picture orange juice, but much less tasty. Of course, no matter how you design a kernel, crashes can and do happen.
If you've ever heard the term kernel panic, this means the system has entered some kind
of unstable or undefined state, and the kernel decides to just halt the system as the OS
simply doesn't know what to do next. This is what often causes Windows blue screens.
It's not because your computer hates you. But why can't the system, you know, just fix itself instead of needing a reboot?
Well, error handling functionality in an OS like Windows has to be written for specific
errors, so if the system encounters an error it wasn't written to handle, you'll likely
get a kernel panic. But one example of an error the Windows kernel is designed to handle is when your display
driver crashes. You know how your screen goes blank, then it comes back up and you get a little notification
saying the driver successfully recovered? That's a bit of kernel magic that took the developers a great deal of effort to write.
So remember that when you get a blue screen, please know your poor kernel is trying its
hardest. It just has no idea what to do next. I mean, you wouldn't get mad at your dog for not being able to speak German right,
unless it's a German shepherd, in which case, jail.
And you're definitely not going to jail because you watched this whole video. Wow, thanks so much.
Hey, like the video if you liked it, dislike it if you disliked it, check out our other
videos, comment below with video suggestions, and don't forget to subscribe and follow.
Now, enjoy your freedom, watch another video.