Let's talk about the kernel.
To use computer hardware, a kernel is needed.
The kernel has core operating system components and it dynamically loads drivers.
And the kernel ensures security, stability and performance.
It's really the most essential part of the operating system and it has main responsibilities.
It is responsible for processes, it's responsible for memory management, for file system
management, for device management, for networking, for interrupt handling and hardware communication.
And it uses system calls to provide user space interaction.
What does that mean? Well, that means that if you run an application in user
space that needs to communicate with the kernel, it uses a so called system call.
That's a deep level instruction that you will normally never find unless you are
going to search for it or you are going to use the audit subsystem.
So let's talk about user space and system space.
The kernel audience is system space.
That is a privileged execution environment where no restrictions apply.
You can't have restrictions in system space because it is about the kernel. And
the kernel needs full access to the hardware, which is used by using drivers.
Drivers, also known as kernel modules, are also a part
of system space and applications normally run in user space.
And that is a restricted environment.
And for applications to access components that are running in
system space, as just mentioned, system calls are used.
Before continuing, I would like to make a drawing to make it more clear what exactly this user space and system space is doing.