Functions of Linux Kernel | Kernel and User Space| System Calls

preview_player
Показать описание
Hey guys welcome back to the channel and this video we are going to talk about Linux userspace and kernel space.
The best to understand how an operating system works is through abstraction, which basically means you need not care about the nitty-gritty details of what's happening behind the scene.Linux system can be thought of being divided in multiple layers of abstraction and things like a web application or web browser sit at the top layer of abstraction while things like memory and other hardware component sit at the lower level.
A Linux system has 3 main levels
1) hardware - including memory, disk, network cards etc
2) Kernel - The core of Linux system, resides in the memory and tells CPU what to do. This is also called kernel space
3) Processes or programs which kernel manages - something like a webserver - this is also called the userspace.

The code running in kernel has unrestricted access to main memory and CPU.
The user space is comparatively restrictive with access only to a subset of memory and processor
That is why if kernel crashes, more often then not, it's bound to take down your whole system
But if a user application crashes, the impact is mostly limited to that application only.

Functions of Kernel:
- Determine which process has access to CPU
- Keep track of all the memory - what is being used, what is being shared and what is free
- Act as an interface between hardware and processes (Device drivers)
- Manage system calls

Linux kernel can be found on the system under /boot/vmlinuz or /vmlinuz

Coming to Kernel and userspace, well memory is probably the most important part of the hardware and it's divided into 2 distinct regions or parts called userspace and kernel space. Memory cells where the kernel resides and executes its functions is called kernel space and space where user process run is called userspace

The kernel provides the API to user applications via system calls, so every time you run a simple command on the terminal, bunch of system calls are made behind the scene to provide you the output, we will discuss system calls in detail later in the course.

Рекомендации по теме
Комментарии
Автор

Thank you very much for your insightful videos . I love the way you explain the concepts using pictures and notes.

merinkjacob