63 posts
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
3057 posts
Location
United States of America
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.