Firmware/Bios

When starting a computer your bios will run after POSTing (basically a check that happens before the bios to make sure hardware is running). This is what is called firmware. Essentially it’s code that is written directly onto the hardware that lets it start up. From there it then passes on to the bootloader:

Bootloader

This then is what starts the kernel. Most importantly this is the system that when the bios talks to it can actually provide the memory location of where to start the kernel. This is important because it allows you to setup multiboot systems where more than 1 OS, and even OS’s with different kernels can be loaded:

Kernel

The kernel is what allows your operating system to talk to hardware. Generally speaking this is high-level interfaces, while all the complicated portions of the communication are handled by the drivers:

Drivers

This is where the magic happens. Typically drivers are talked about as seperate from the kernel because they are installed seperately, though they are typically kernal “modules”. Some drivers are part of userspace, but people often think of it as blurring the lines between kernel and userspace, not to mention some implementations actually skip the kernel entirely and just access drivers directly.

Generally speaking each device is going to be different, and therefore will need a different driver. Some will just work with generic drivers, but it’s usually best to run a device with it’s specific driver.

The flow of data

To start a system it looks like:

os-starting

Hardware Talks to Firmware/bios talks to bootloader talks to kernel

Starts operating system

once started the flow looks more like:

os-communication

 Hardware Kernel Userspace (what you see and all the processes you see running including windows managers, desktop environments, user management, etc.)

So for example if you have a frame from a video game first the hardware would generate the frame, it would then send it via the graphics driver to the display server, which would then render it through the Desktop environment/window manager

Additional Resources