this post was submitted on 12 Sep 2023
50 points (93.1% liked)

Explain Like I'm Five

16573 readers
1 users here now

Simplifying Complexity, One Answer at a Time!

Rules

  1. Be respectful and inclusive.
  2. No harassment, hate speech, or trolling.
  3. Engage in constructive discussions.
  4. Share relevant content.
  5. Follow guidelines and moderators' instructions.
  6. Use appropriate language and tone.
  7. Report violations.
  8. Foster a continuous learning environment.

founded 2 years ago
MODERATORS
 

I am tech savvy so you don't have to disregard the details much about it. I know programming.

top 23 comments
sorted by: hot top controversial new old
[–] [email protected] 48 points 2 years ago (1 children)

So operating systems are huge, they do a lot of things. They require a lot of memory and storage and some of their tasks like connecting to devices and generating images take up resources. They run a lot of programs at any given time to do all these tasks.

The kernel is a computer program but think of it as the MAIN program. It’s at the core of a computer's operating system. It’s the first program the hardware loads when you turn the computer on and it has complete control over everything in the system. It is the portion of the operating system code that is always running, always in RAM, and closing it crashes the entire computer or shuts it down. The kernel connects the hardware to the software. A full kernel controls all hardware resources (RAM, data from keyboard and mouse, data to graphics card and therefore screen), and manages all the programs running. It gives each program access to memory and the processor and even the internet. The kernel prioritizes programs and those requests.

[–] [email protected] 30 points 2 years ago* (last edited 2 years ago) (1 children)

Yes and no. Technically the BIOS is the first program the hardware loads when the computer is turned on. Then the BIOS calls the bootloader, which would be in charge of loading the OS into memory. Then the bootloader hands over the control of the hardware from the BIOS to the kernel.

The most important job of the kernel is to schedule hardware time (processor cycles, threads, I/O operations and other hardware resources) between the different programs that make up the OS. This is what the GNU/Linux meme copypasta is rambling on about. As the kernel is actually pretty useless without a software stack on top of it to provide most of the services that are later used by the shell to offer a user space.

[–] [email protected] 13 points 2 years ago (2 children)

Yes but then it wouldn’t be an ELI5 if I got that advanced.

[–] [email protected] 2 points 2 years ago (1 children)

OP asked for the advanced details though

[–] [email protected] 11 points 2 years ago (1 children)

ELI5 with a CS degree. Certainly a challenge.

[–] [email protected] 2 points 2 years ago

Well, the dude you've replied to provided a great explanation + the correct details, so it certainly is possible.

[–] [email protected] 1 points 2 years ago (1 children)

Is the computer starting the BIOS first an advsnced topic? I don't think so. You could at least say when the OS gets booted, the kernel starts first.

[–] [email protected] 3 points 2 years ago (1 children)

You do realize you posted in /c/ExplainLikeImFive right? Not ExplainLikeImTwelve. You’re welcome. If you aren’t happy you can have a refund.

[–] [email protected] 0 points 2 years ago

I know. I will delete this post today and reask this question in c/asklemmy.

[–] [email protected] 33 points 2 years ago (1 children)

Basically, when it is microwaved the center becomes fluffy and the corn kernal "pops" which is why we call it pop corn.

[–] [email protected] 9 points 2 years ago

dont bullshit me, bro. OP is asking about Kernel Sanders that runs the Appalachians in Task Manager

[–] [email protected] 15 points 2 years ago

In brief, it manages the computer hardware resources. So there is the stuff to talk to the hardware and manage access to it, and the scheduler to decide which program can use the processor when.

In other words, it's a middleware for applications to talk to the hardware.

[–] [email protected] 12 points 2 years ago* (last edited 2 years ago)

My simplest analogy for people who are knowledgeable about computers is that it's basically a giant driver.

Program wants to write to a CD? Instead of calling an obscure function in an undocumented hardware manual for every single disk ever, you let the kernel handle it by calling a well documented function that works on a lot of stuff it has drivers for.

The kernel will handle what programs want memory and will give it an address space where it can do it's thing, and will handle what CPU cycles each program gets.

An operating system is basically a kernel that is meant to run and manage programs.

[–] [email protected] 6 points 2 years ago (1 children)

I agree that this question isn't really appropriate for this forum. You can't explain how a kernel works to a 5 year old beyond extremely vague descriptions you probably already know.

If you do want to delve more into this, I'd suggest spending time on the OSDev Wiki. You could even write a toy OS for yourself. It's not as hard as it sounds.

[–] [email protected] 2 points 2 years ago

I guess c/asklemmy is a better place for this.

[–] TheMetaleek 5 points 2 years ago (2 children)

I'm sorry but doesn't this go against this community's concept of providing simple explanations for things?

[–] [email protected] 3 points 2 years ago (1 children)

Why? The fact that it's thousands of lines of code does not mean you can't ELI5 it

[–] TheMetaleek 3 points 2 years ago (1 children)

I meant the precision that OP already has knowledge in the domain and asks for more in depth elements

[–] [email protected] 1 points 2 years ago (1 children)

I don't know. In the description I only see

I am tech savvy so you don’t have to disregard the details much about it. I know programming.

That is hardly domain knowledge. One would have to be writing in assembler or programming microcontrollers to be able to say they are nibbling on the domain knowledge for this. And knowing the trends we are probably not even speaking about C/C++, rather python. This makes the answering easier only because you don't have to explain what the executive is

The answers given are good and it was rather other commenters that started requesting more depth

[–] TheMetaleek 2 points 2 years ago

Yes, and as someone who is probably close to a 5yo's knowledge on the topic, I don't know anything (or close to that) on either programming or other parts of being "tech savvy". Thus me saying that coming on the ELI5 community and saying "yeah I actually want a very much not 5yo answer type" is not the spirit, I'd much rather like first basic answers, and eventually other comments going more in-depth, like we see in the majority of posts here

[–] [email protected] 2 points 2 years ago

ELI5 with a cs degree

[–] [email protected] 1 points 2 years ago

It's the main most privileged program running on a computer, through which all other programs access shared resources like hard drives, memory, network etc. It also performs access control on these resources.

[–] [email protected] -2 points 2 years ago* (last edited 2 years ago)

I can’t explain it except when it goes bad it takes a dump and you get Blue Screen Of Death.