If your computer’s prone to bugs, you might have seen it give a ‘kernel error’ before it decided that it would be taking a very long nap. But what is a kernel?
A kernel is the program in the computer that decides what program gets to use what resource, specifically RAM.
Before the kernel, computer systems like Multics (the predecessor to Unix) effectively built the error resolutions into the programs themselves, but that gets really inefficient as computers gain more power, and with it the ability to host more and more programs. Unix’s kernel system was a blunt but more efficient fix: the kernel picks who goes first. The kernel is therefore also responsible for prioritizing: the boot-up program, for example, gets priority over the word-processing program until the computer has completed boot up.
But that’s not all! The kernel also portions out memory for two applications at the same time by putting up a virtual barrier to keep them from running into each other (trying to use the same portion of memory) and crashing.
But what’s a kernel error? Surely, one of the most essential functions of the computer can’t crash, right? It’s not even really an application!
Something PANIC() This Way Comes
When a kernel error occurs, it’s not always fatal to the computer, but it is a sign that something is seriously wrong. The kernel monitors both software and hardware, and if something essential breaks – it panics. The kernel stops everything happening to take a ‘snapshot’ of the kernel memory and then either reboots automatically or tells the user to. That snapshot can be used by Windows (or a repair shop) for de-coding what broke before the problem completely bricks the computer, or makes it impossible to retrieve data.
Kernel panics are commonly associated with things like the famous Blue Screen of Death. When RAM is what makes everything on the computer run, and there’s something wrong with the RAM, it’s difficult to recover, hence the shutdown. It’s kind of like putting the computer in an induced coma to try and save it.
Blue Screen of Death isn’t the last screen you’ll ever see out of your computer, but it’s definitely not a good sign. It’s a good idea to regularly backup your data anyway, but if the computer starts blue-screening, and by some miracle it reboots with everything still on it – back up the important stuff right there and then! Don’t wait for it to error again!