This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
DubbelSoftware's profile picture

What does a kernel does and need to do?

Started by DubbelSoftware, 14 June 2017 - 12:24 PM
DubbelSoftware #1
Posted 14 June 2017 - 02:24 PM
Hello,

I want to program a kernel, but dont know so much about it.
I know that it is the "heart" of the operating system.
And thats it.

Can someone explain easily how a kernel works, and what i needs to do.

-DubbelGaming
KingofGamesYami #2
Posted 14 June 2017 - 02:58 PM
A kernel decides when programs will run. It also decides which (physical) processors will run which programs at any point in time. It also manages Random Access Memory. It will allocate memory dynamically across multiple programs. The kernel also manages device I/O. It handles things like mice, speakers, screens, etc. so that programs don't have to manually send and receive data to and from those devices.

Now that I've explained what a kernel does, you will notice it is entirely useless in computercraft. Physical processors do not exist, or at least they are abstracted too much to affect. RAM is simply not something you can manage within ComputerCraft. Device I/O doesn't exist, except in the form of peripheral calls, which are as abstracted as they are going to get.