Fundamentals 19 min read

Why the Linux Kernel Thrives: Architecture, Modularity, and Core Subsystems Explained

This article explains how the Linux kernel’s layered architecture, modular design, and well‑defined subsystems such as the process scheduler, memory manager, virtual file system, and network interface enable massive volunteer collaboration, extensibility, and continuous evolution of the operating system.

ITPUB
ITPUB
ITPUB
Why the Linux Kernel Thrives: Architecture, Modularity, and Core Subsystems Explained

1. Position of the Linux Kernel in a Computer System

The kernel resides at the core of the operating‑system stack, providing essential services to higher‑level components while depending on lower‑level hardware. Upper layers depend on lower layers, but not vice‑versa.

Computer system layered structure
Computer system layered structure

2. Core Functions of the Kernel

Virtualization (Abstraction) : abstracts hardware as a virtual machine and exposes virtual interfaces so user processes need not know hardware details.

Multitasking : arbitrates access to hardware resources, giving each process the illusion of exclusive CPU use.

Process context switches involve saving the register set, page‑table base register, the task_struct, program counter, open‑file table, and memory space.

3. Overall Kernel Architecture

Linux kernel overall architecture
Linux kernel overall architecture

The central component is the Process Scheduler (SCHED) . All other subsystems depend on it because they need to block and resume processes.

Scheduler depends on the Memory Manager for allocating memory during process restoration.

IPC subsystem depends on the Memory Manager for shared‑memory communication.

VFS depends on the Network Interface for NFS support.

VFS depends on the Memory Manager for ramdisk devices.

Memory Manager depends on VFS for swapping pages to disk.

4. Highly Modular Design Facilitates Collaboration

Only a few developers need to work across multiple modules; most work within a single subsystem.

Hardware device drivers, logical filesystem modules, network device drivers, and network protocol modules have the highest extensibility.

5. Key Data Structures in the Kernel

Task List : The scheduler maintains a linked list of task_struct objects, plus a current pointer to the running process.

Memory Map : mm_struct stores each process’s virtual‑to‑physical address mapping; a pgd pointer in mm_struct points to the page‑directory base.

Inodes : VFS uses inode structures to represent files; each process has a files_struct with a pointer to its open files.

Data Connection : All kernel data structures are reachable from the task list; each task_struct links to its memory map, open files, and network sockets.

6. Subsystem Architectures

6.1 Process Scheduler

Goal : Control CPU access for user processes and other kernel subsystems.

Scheduling policy module – decides which process receives the CPU.

Architecture‑specific module – abstracts hardware details for blocking and resuming processes.

Architecture‑independent module – works with the policy module and invokes the Memory Manager to preserve mappings.

System‑call interface – exposes a stable POSIX‑like API to user space.

Data Representation : Maintains the task list of active task_struct entries, which include state, counters, and pointers used by all subsystems.

Dependencies : Relies on the Memory Manager for address mappings; other subsystems call the scheduler to block or wake processes, creating bidirectional data and control flows.

6.2 Memory Manager

Goal : Manage each process’s virtual‑to‑physical memory mapping via the MMU, provide protection, and support swapping.

Architecture‑specific module – offers virtual interfaces to physical memory.

Architecture‑independent module – handles address translation and page‑replacement decisions.

System‑call interface – implements malloc, free, mmap, etc.

Data Representation : Stores mappings in mm_struct, referenced from each process’s task_struct.

Dependencies : Interacts with the file system for swapping, calls the scheduler to sleep processes during I/O, and shares mapping information with the scheduler.

6.3 Virtual File System (VFS)

Goal : Provide a uniform file‑access API that works across diverse physical devices and filesystem types.

Device driver module.

Device‑independent interface.

Logical filesystem modules (ext2, ext4, …).

System‑independent interface for generic resources.

System‑call interface for user‑space file operations.

Data Representation : Files are represented by inode structures containing metadata and function pointers to the appropriate driver.

Dependencies : Depends on the Memory Manager for swap and mmap, on the scheduler to block/wake processes during I/O, and on the Network Interface for network filesystems (NFS).

6.4 Network Interface

Goal : Abstract network hardware and protocols, offering a simple API to user processes and other kernel subsystems.

Network device driver module.

Device‑independent interface module.

Network protocol modules (TCP, UDP, IP, …).

Protocol‑independent interface.

System‑call interface for socket APIs.

Data Representation : Network objects are represented as sockets, which can be shared among processes via pointers in task_struct.

Dependencies : Uses the scheduler to block processes awaiting hardware completion and collaborates with VFS for network file systems.

7. Conclusion

The Linux kernel consists of five major subsystems—process scheduler, memory manager, virtual file system, network interface, and inter‑process communication—interacting through shared data structures and function calls. Its modular architecture, clear separation of concerns, and extensible interfaces enable large numbers of contributors to work efficiently, driving continuous evolution.

References

http://oss.org.cn/ossdocs/linux/kernel/a1/index.html

http://www.cs.cmu.edu/afs/cs/project/able/www/paper_abstracts/intro_softarch.html

http://www.fceia.unr.edu.ar/ingsoft/monroe00.pdf

http://lxr.oss.org.cn/

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linux kernelOS Architecturemodular designProcess schedulerVirtual File Systemnetwork interfaceMemory manager
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.