This presentation is devoted to the internal structure of the Linux operating system with a primary focus on the kernel, processes, and threads. Its goal is to provide students with a deeper understanding of how Linux manages execution, resources, and interactions between user programs and hardware at the lowest system level.
The lecture begins with an overview of the Linux kernel structure, describing its role as the core component of the operating system. Key concepts such as block devices, virtual terminals (TTY, VT100), input/output handling, static and dynamic configuration, file systems (ext4, ZFS, and others), and the I/O scheduler are introduced. Special attention is given to how the kernel optimizes disk access and manages different types of devices.
A major part of the presentation is dedicated to processes in Linux. A process is described as a combination of executable code, system information, and a control terminal. The lecture explains how processes are created using the fork() system call, which creates a child process as a logical copy of the parent while maintaining separate private memory spaces. Process identifiers (PIDs) are introduced as the primary mechanism for distinguishing processes, along with system calls such as getpid().
Interprocess communication (IPC) mechanisms are discussed, including pipes and POSIX signals. Signals are presented as software interrupts that temporarily suspend normal execution and transfer control to a signal handler. The concept of process groups is explained, clarifying which processes are allowed to send signals to each other. Special process states, such as zombie processes, are examined to illustrate what happens when a child process terminates before its parent collects its exit status using waitpid().
The lecture then explores how processes and threads are implemented internally in Linux. It explains the transition from user mode to kernel mode during a system call, which is handled as an emulated interrupt. Linux represents processes internally as tasks, stored in task_struct data structures and organized in a bidirectional list. The contents of the process descriptor are analyzed in detail, including scheduling parameters, memory layout, signal handling information, CPU register state, system call context, file descriptor tables, credentials, kernel stack, and process identifiers.
Finally, the presentation addresses threads in Linux and their historical development. It explains the challenges of introducing multithreading into Unix systems and the role of the clone() system call, which unifies the implementation of processes and threads. The relationship between PID and TID is clarified, showing how Linux maintains compatibility with POSIX while allowing efficient multithreaded execution.
Overall, this presentation provides a solid theoretical foundation for understanding Linux process management and kernel internals, preparing students for advanced studies in operating systems.