WEBVTT

00:00:00.000 --> 00:00:11.920
When you hear the word kernel, you might think of popcorn, chicken, or popcorn chicken, or

00:00:11.920 --> 00:00:18.360
the kernel's popcorn chicken. But you might have also come across the same word in a computing context, with folks talking

00:00:18.360 --> 00:00:21.720
about the Linux kernel or Windows kernel.

00:00:21.720 --> 00:00:27.080
What the heck is it? The kernel is basically the heart of whatever operating system you're using.

00:00:27.200 --> 00:00:32.120
Although the kernel is a software component, it sits between your system's hardware and

00:00:32.120 --> 00:00:39.840
the rest of your OS and software. You see, user software such as your web browser or your favorite game doesn't talk directly

00:00:39.840 --> 00:00:44.760
to your hardware. Instead, the kernel serves as an intermediary.

00:00:44.760 --> 00:00:51.440
But why is this necessary? Well, one of the main functions of a kernel is to abstract away the physical differences

00:00:51.440 --> 00:00:58.360
between hardware setups. There are an endless number of possible hardware configurations in a PC or server.

00:00:58.360 --> 00:01:02.400
I mean, think of how many rigs you could build just from PC part-picker lists.

00:01:02.400 --> 00:01:08.480
A kernel gives your other software a standardized surface area to interface with, making the

00:01:08.480 --> 00:01:12.520
differences between individual machines much less of an obstacle.

00:01:12.520 --> 00:01:18.600
As a more easily digestible analogy, kernels provide the low-level plumbing that your software

00:01:18.600 --> 00:01:24.120
hooks into. The pipes underneath your house might not be all that interesting, but they allow you

00:01:24.120 --> 00:01:28.120
to make tons of choices as to what you're gonna hook them up to, without caring whether

00:01:28.120 --> 00:01:33.280
it's a dishwasher, a jacuzzi, or that cool RGB shower head you found on Amazon.

00:01:33.280 --> 00:01:39.800
Well like I'm gonna see that and just ignore it? Another key function of the kernel is to provide security and stability.

00:01:39.800 --> 00:01:44.520
Allowing programs to talk to hardware in any way they wanted could allow them to access

00:01:44.520 --> 00:01:49.320
data they aren't supposed to, which could lead to a system crash or data theft from

00:01:49.320 --> 00:01:55.400
a malicious process. But because programs have to interface with the system through the kernel, the kernel

00:01:55.400 --> 00:02:02.320
can prevent these sorts of shenanigans. If you've ever heard the term protected memory space, this is part of what we're talking

00:02:02.320 --> 00:02:08.920
about. Running programs get their own portion of RAM and can't access memory outside of that

00:02:08.920 --> 00:02:13.040
thanks to the kernel. But of course, plenty of things can still go wrong.

00:02:13.040 --> 00:02:16.440
Traditionally, kernels were designed in one of two main ways.

00:02:16.560 --> 00:02:21.120
Monolithic, meaning the kernel incorporates most of the main functions of the whole operating

00:02:21.120 --> 00:02:26.120
system, and microkernel, in which the kernel handles more basic functionality, leaving

00:02:26.120 --> 00:02:30.480
more software such as device drivers running outside of the kernel.

00:02:30.480 --> 00:02:35.200
Monolithic kernels tend to be higher performance and easier for programmers to work with, while

00:02:35.200 --> 00:02:40.160
microkernels have the advantage of being able to kill problematic processes without bringing

00:02:40.160 --> 00:02:46.280
down the whole system. Now the Windows kernel was designed to be more of a microkernel, while the Linux kernel

00:02:46.280 --> 00:02:53.360
was more monolithic. But these days, both operating systems have moved towards a hybrid kernel model to try

00:02:53.360 --> 00:02:56.960
and incorporate the advantages of both design philosophies.

00:02:56.960 --> 00:03:02.040
For example, Linux is commonly found on servers that need as much uptime as possible.

00:03:02.040 --> 00:03:05.200
In other words, you don't want to reboot the whole system if there's an issue, so

00:03:05.200 --> 00:03:09.520
it makes sense that Linux has moved away from being more purely monolithic and has tried

00:03:09.520 --> 00:03:16.240
to become more modular. Meanwhile, in Windows Land, gamers benefit from the OS adopting a more monolithic philosophy

00:03:16.240 --> 00:03:20.720
that doesn't have as much overhead, enabling higher performance for folks who are trying

00:03:20.720 --> 00:03:23.920
to squeeze as many frames as possible out of their rigs.

00:03:23.920 --> 00:03:30.480
Picture orange juice, but much less tasty. Of course, no matter how you design a kernel, crashes can and do happen.

00:03:30.480 --> 00:03:35.040
If you've ever heard the term kernel panic, this means the system has entered some kind

00:03:35.040 --> 00:03:40.520
of unstable or undefined state, and the kernel decides to just halt the system as the OS

00:03:40.520 --> 00:03:45.320
simply doesn't know what to do next. This is what often causes Windows blue screens.

00:03:45.600 --> 00:03:52.680
It's not because your computer hates you. But why can't the system, you know, just fix itself instead of needing a reboot?

00:03:52.680 --> 00:03:57.520
Well, error handling functionality in an OS like Windows has to be written for specific

00:03:57.520 --> 00:04:02.040
errors, so if the system encounters an error it wasn't written to handle, you'll likely

00:04:02.040 --> 00:04:07.840
get a kernel panic. But one example of an error the Windows kernel is designed to handle is when your display

00:04:07.840 --> 00:04:12.800
driver crashes. You know how your screen goes blank, then it comes back up and you get a little notification

00:04:12.880 --> 00:04:19.920
saying the driver successfully recovered? That's a bit of kernel magic that took the developers a great deal of effort to write.

00:04:19.920 --> 00:04:24.280
So remember that when you get a blue screen, please know your poor kernel is trying its

00:04:24.280 --> 00:04:31.120
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,

00:04:31.120 --> 00:04:35.520
unless it's a German shepherd, in which case, jail.

00:04:35.520 --> 00:04:39.480
And you're definitely not going to jail because you watched this whole video. Wow, thanks so much.

00:04:39.480 --> 00:04:42.560
Hey, like the video if you liked it, dislike it if you disliked it, check out our other

00:04:42.600 --> 00:04:46.600
videos, comment below with video suggestions, and don't forget to subscribe and follow.

00:04:46.600 --> 00:04:49.240
Now, enjoy your freedom, watch another video.
