1. Linux kernel is a Monolithic.
Linux use modules to manage functions. Modules with kernel code that can be inserted or removed while the system is up-and-running support the dynamic addition of a whole range of functions to the kernel, thus compensating for some of the disadvantages of monolithic kernels. This is assisted by elaborate means of communication between the kernel and userland that allows for implementing hotplugging and dynamic loading of modules.
2. Elements of the kernel:
A. Processes, Task Switching, and Scheduling: virtual memory, multitasking system etc.
B. UNIX Processes: fork and exec [system call], clone for creating thread, pstree command to show hierarchical process releations, and namespace for subsystem(such as, used for container)
C. Address Spaces and Privilege Levels: user-space or kernel-space, ring for intel cpu. ps fax to show all process, process name behind with brackets is kernel thread.
Virtual memory and physical memory: Physical pages are often called page frames. In contrast, the term page is reserved for pages in virtual address space.
D. Page Tables: To reduce the size of page tables and to allow unneeded areas to be ignored, the architectures split each
virtual address into multiple parts, as shown in Figure 1-7 (the bit positions at which the address is split differ according to architecture, but this is of no relevance here). In the example, I use a split of the virtual address into four components, and this leads to a three-level page table. This is what most architectures offer. However, some employ four-level page tables, and Linux also adopts four levels of indirection. To simplify the picture, I stick to a three-level variant here.
E. Allocation of Physical Memory: The Buddy System, The Slab Cache, Swapping and Page Reclaim.
F. Timing
G. System Calls
H. Device Drivers, Block and Character Devices.
I. Networks
J. Filesystems
K. Modules and Hotplugging
L. Caching
M. Object Management and Reference Counting: kobject, kset, kobj_type
N. Data Types: type used by kernel.
3. Why the Kernel Is Special