The kernel is the part of the operating system
that communicates directly to the computer hardware.
So it's the most important part of your computer.
In order to communicate with the hardware,
the kernel uses drivers.
And these drivers are provided as kernel modules.
Kernel modules can be loaded automatically or manually.
The kernel provides system calls that
can be used by programs to send instructions to the kernel.
That is because programs, by default, are used in user
space, and they don't have direct access to the kernel.
And that is why the kernel is providing system calls.
And the C library, which is implemented
as glibc on Linux, provides interfaces for these applications
to use the system calls.
Let me make a drawing for you to explain system space and user
space a little bit more.
Let's try to understand a little bit about the way
how Linux is organized.
It starts with a line in the middle.
Below that line, we have system space.
System space is where your kernel is working.
And the kernel makes sure that you can address your hardware.
Then there is user space.
And user space is where ordinary user processes are being used.
On the line in the middle, there's
a couple of facilities that is provided
to make it possible for processes and users
from user space to work in system space.
These include the system calls, which
are low-level calls that allow applications to provide
specific kernel functionality.
glibc is how they are provided.
Then we have permissions, which is giving your users
specific permissions to privilege
part in system space.
Now, in that system space, we have the kernel.
And the kernel has kernel modules.
And these modules really are drivers
that allow you to address the hardware.
There's another important part that's
happening in system space.
And that is our good friend, the root user.
Now, by drawing the root user in system space,
you immediately understand why the root user doesn't
need any access to system calls or permissions privilege-wise,
because the root user is not restricted to anything.
System space is the unrestricted area of your operating system.
And user space is where restrictions is.
So this is where you are running your processes.
And this is where your ordinary users are doing their work.
And that's an important conceptual understanding
of the way how Linux is organized.