
An overview of topics that will be covered in this course.
In this lecture, you will learn about the Linux ecosystem and gain a high-level understanding of the Linux operating system stack. You will also learn about the relation of Linux and other UNIX-based operating systems.
In this lecture, we will explore the history of Linux - starting from the early history of UNIX operating system and how Linux originated to how it evolved to the most widely deployed project today. You will also learn about the role of Linux distributions
You can safely skip this lecture - if you are not interested in the history.
In this lecture, I will briefly summarize the key features of the Linux kernel in terms of the design and its development process.
In this lecture, I will teach you about the overall development process of the Linux kernel. You will learn about the official Linux kernel development source trees and their development life-cycle.
In this video, I will demonstrate the process for create a VirtualBox VM for Arch Linux suitable for kernel development in this training course.
In this lecture, you will learn about the core concepts of operating systems design that include the following:
A high-level layers of an operating system
Single-user vs Multi-user systems
CPU operating modes - the kernel mode and the user mode
The concept of CPU traps and trap-handlers
System calls overview
In this lecture, you will learn about the high-level architecture of a multi-user operating system kernel that cover the following topics:
The kernel entry-point: trap handler subsystem
Syscall layer
Audit and Security subsystem
Process Management
Memory Management
Filesystem Management
Device Drivers
Hardware Control Interface
In this lecture, you will learn about the following concepts:
IRQ subsystem
Interrupt context vs Process context of kernel execution
Clocks and Timer subsystems
Direct Memory Access (DMA)
NUMA architecture
Core kernel libary subsystem
In this lecture, you will learn about the "Monolithic" vs "Micro-kernel" architecture of operating system kernels. You will learn about the benefits and draw-backs of both of these architectures and their practical implications.
In this lecture, you will the difference in the design and implementation of Cooperative multitasking and Preemptive multitasking approaches of operating system kernel design. You also learn the concept of "Fully preemptible kernel", voluntary context switch and involuntary context switch. You will also understand in a very high-level about the Linux kernel design in handling multi-tasking.
In this lecture, you will learn about the concept of Virtual Memory and Demand Paging by the kernel. You will learn about how virtual addressing works with the aid of hardware MMU. You will also learn about the benefits of demand paging system.
In this video, I will demonstrate the process of building a Linux kernel from sources. You will learn about the kernel configuration steps, build process and creation of the kernel image tarball. You will also learn how to setup grub boot loader and test by booting the newly built Linux kernel image.
In this video, I will demonstrate how to build busybox. You will learn about the busybox project in general and how it works. You will also learn how to install Linux kernel, grub boot loader and busybox project for user-land on a new hard drive (setup in VirtualBox).
In this lecture, you will learn the role of initramfs in Linux boot process. I will also demonstrate how to create initramfs image with busybox user-land and boot Linux kernel with initramfs loaded as the root filesystem.
In this video, you will learn about the "Everything is a file" paradigm on Linux. I will demonstrate how Linux treats devices as files and also various kernel statistics being exposed as files in the user-space.
In this lecture, you will learn about the high level architecture of a Linux kernel. You will learn the roles of the various subsystems within the Linux kernel and how they are layered within the Linux kernel design.
In this video, I will walk you through the Linux kernel source tree covering the high-level layout of the kernel source code. You will learn how various kernel subsystem code is organized in different folders within the sources. As of recording this video, the latest stable Linux kernel source was 6.10.6. But as the kernel evolves - you would expect the layout to change over time.
In this video, I will demonstrate how to navigate the Linux kernel source tree using tools like cscope and LXR. You will learn how to read the kernel sources in order to understand various function implementations within the kernel by easily navigating the source code following the code-path using cscope.
In this lecture, I will walk you through the kernel source code in a high-level to understand the Linux kernel boot and initialization process. You will learn about core subsystem initialization (memory management, trap handlers and IRQ subsystems, hardware platform-specific initializations, scheduler subsystems, and so on).
In this lecture, I will continue walking you through the kernel source code explaining how Linux kernel boots into user-mode. You will learn about creation of the first two tasks by the kernel, SMP initialization, initialization of various subsystems and drivers linked as builtin modules, mounting of root filesystem and the launch of user-space init program.
In this lecture, you will learn about Loadable Kernel Modules and how they are built and integrated into the Linux kernel.
In this video, I will teach you how to create your first loadable kernel module - demonstrating by code and explaining the artifacts of a loadable kernel module. You will also learn how to build and load this module and have a ground-level understanding of kernel logging via printk() API.
In this video, I will cover various features and diagnostics related to loadable kernel modules exposed via /proc and /sys/module interface. I will also provide insight on life-cycle of a loadable kernel module and analyzing backtrace printed on kernel logs via dump_stack()
In this lecture, I will demonstrate how to create and use kthreads in a loadable kernel module. You will learn about kthread API in general and some best practices in designing functions run via kthreads. You will also learn about implementing module parameters that the kthread function will use within the kernel module.
In this lecture, I will demonstrate how you can register custom callbacks to validate module parameters in a kernel module.
In this lecture, you will learn how to create a loadable kernel module built using multiple C source files. You will also learn how to create and manage module to module dependencies.
In this lecture, you will learn about different ways to pass module parameters to a loadable kernel module and also about the use of module aliases.
In this lecture, I will teach you how to create a loadable kernel module to interface the /proc (procfs) filesystem. You will learn how to expose a kernel variable (jiffies) via /proc interface. You will also learn the technique used to learn new APIs within the Linux kernel and adapt yourself to the rapidly evolving kernel ecosystem.
In this lecture, I will teach you how to expose variables within your kernel module to user-space via debugfs interface (available via /sys/kernel/debug/). This would allow for diagnostics and debugging of the kernel from the user-space.
In this lecture, I will demonstrate the process to create a patch that can be shared with others and how to apply this patch on Linux kernel sources. You will also learn how to submit patches to the official Linux kernel maintainers with pointers to patch submission and community guidelines
This course provides a comprehensive introduction to Linux kernel design and architecture, aimed at equipping you with both theoretical knowledge and practical skills. I will begin by covering essential operating system concepts and terminologies, ensuring that you have a strong foundation. From there, you'll dive into the intricate workings of the Linux kernel, learning how to build it from source code and create a fully functional, custom bootable Linux system. This includes setting up a BusyBox user-space environment to complete the operating system, giving you a hands-on understanding of the system's internals.
In addition to kernel building, this course will teach you how to develop your own Linux kernel modules, with a deep dive into loadable kernel modules (LKMs). You'll explore how to extend the kernel's functionality dynamically, enabling you to create, load, and debug modules efficiently. The course also delves into key features like kthreads, interfacing with the procfs (/proc) filesystem, allowing you to expose any module / kernel related statisitics to user-space, and also interfacing with debugfs (/sys/kernel/debug), allowing you to expose variables from within kernel-space to user-space for diagnostics and debugging.
Furthermore, you'll gain experience in contributing to the Linux kernel by learning how to create patches and apply them following the official Linux kernel development workflow. Upon completing this course, you will be proficient in exploring, managing, and modifying the Linux kernel source code, ready to embark on a path toward becoming a skilled Linux kernel developer.