Chapter 2.1 - Overview of the Architecture
Learning Objectives
By the end of this chapter, you will be able to:
- Understand the separation between User Space and Kernel Space
- Identify the responsibilities of each system component
- Visualize communication flows
- Understand the concepts of process and memory
Layered Architecture
Linux follows a well-defined layered architecture:
User Space vs Kernel Space
User Space
Role: Run user applications and programs
Characteristics:
- Contains all the applications you use
- Limited access to hardware (via system calls)
- Isolation between processes
- User permissions management
Components:
- User applications (browser, editor, etc.)
- Shell and command line
- System libraries (libc, etc.)
- Services and daemons
Kernel Space
Role: Manage system resources and hardware
Characteristics:
- Direct access to hardware
- Process and memory management
- File system
- Network and devices
- Protection and security
Components:
- Linux Kernel
- Hardware drivers
- Memory management
- Virtual File System (VFS)
Communication Flows
1. User → Shell → Application
2. Process → Kernel → Hardware
3. systemd → Services → Kernel
Kernel Architecture
The Linux Kernel is organized into several subsystems:
Main subsystems:
-
Process Management
- Scheduling
- Creation and termination
- Inter-process communication
-
Memory Management
- Dynamic allocation
- Virtual memory
- Swap
-
File System
- VFS (Virtual File System)
- Multiple FS support
- Cache and buffers
-
Network Management
- TCP/IP stack
- Network interfaces
- Firewall
-
Device Management
- Drivers
- Plug and play
- Power management
Init Process and systemd
The init process (PID 1) is the first process launched at startup:
Roles of systemd:
- First process (PID 1)
- Parent of all processes
- Service management
- Process monitoring
- Runlevel management
Summary
In this chapter, you learned:
Layered Architecture: Application → System → Hardware
User Space: User applications and programs
Kernel Space: System and hardware management
Communication: Flows via system calls (syscalls)
Kernel: Organized into specialized subsystems
systemd: First process, service management
Next Steps
Now that you understand the overall architecture:
Chapter 2.2: Linux Kernel - The Heart of the System
Chapter 2.3: Memory Management and Swap
Chapter created on: December 2024