Linux:Kernel
lastmod 2025-09-18created 2015-01-2845 edits
Interactive map of Linux kernel
The Linux kernel is an open-source, monolithic, Unix-like computer operating system kernel. Linux-family operating systems are based on this kernel and are deployed, usually in the form of Linux distributions, on traditional computer systems such as personal computers and servers as well as on various embedded devices such as routers, wireless access points, PBXs, set-top boxes, FTA receivers, smart TVs, PVRs, and NAS appliances. The Android operating system for tablet computers, smartphones, and smartwatches uses services provided by the Linux kernel to implement its features. Although their adoption on desktop computers is relatively low, Linux-based operating systems dominate almost every other computing sector, from mobile devices to mainframes. As of November 2017, all of the world's 500 most powerful supercomputers run Linux.
The Linux kernel was conceived and developed in 1991 by Linus Torvalds for his own personal computer, with no cross-platform intentions, but it has since expanded to support a wider range of computer architectures than any other operating system or kernel. Linux rapidly attracted developers and users who adopted it as the kernel for other free software projects, notably the GNU operating system. The Linux kernel has received contributions from nearly 12,000 programmers from more than 1,200 companies, including some of the largest software and hardware vendors.
The Linux kernel API, the API through which user programs communicate with the kernel, is meant to be very stable and not to break userspace programs (some programs with GUIs that rely on other APIs). As part of the kernel's functionality, device drivers control the hardware; that is, mainstream device drivers are meant to be very stable. However, unlike many other kernels and operating systems, this does not mean that the interface between the kernel and loadable kernel modules (LKMs) is designed to be very stable.
Developed by contributors worldwide, the Linux kernel is a prominent example of free and open-source software, and depending on the version it is supported for up to 6 years. Day-to-day development discussion takes place on the Linux kernel mailing list (LKML). The Linux kernel is released under the GNU General Public License version 2 (GPLv2), and includes some firmware images released under various non-free licenses.
Linux Features
- libc and the standard header files are not available. Instead, common libc functions are implemented inside the kernel.
- Uses GNU C.
- No memory protection.
- Floating-point arithmetic cannot be used easily.
- Uses a small, fixed-size stack.
- Supports asynchronous interrupts, is preemptive, and supports symmetric multiprocessing. (Synchronization and concurrency issues must be considered.)
- Portability (Endian, 64bit, WORD, Paging, etc) must be considered.
master branch
The Linux kernel master branch can be found here.
For reference, the clone addresses are as follows.
- git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
- https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git
Category
- Linux
- Linux:Network
- Linux:Kernel:DeviceDriver: Explanation of device drivers.
- Linux:Kernel:Basic: Notes on how to compile and debug.
- Linux:Kernel:Module: Explanation of Linux module programming.
- Linux:Kernel:Process: Notes on kernel processes/threads.
- Linux:Kernel:Scheduling: Process scheduling.
- Linux:Kernel:Printk
- Linux:Kernel:Functions
- Linux:Kernel:4.18
- Linux:Kernel:6.14 - Greatly improved performance and Windows compatibility
- Linux:Kernel:Key
- Linux:Kernel:Security
- Linux:Kernel:ReverseMapping
- Linux Security Module
- Loadable kernel module
Linux v0.01
The Linux kernel is a huge open-source project of 36 million lines, but the first version was 10239 lines (8670 excluding comments/blank lines)
Thanks to its simplicity, Linux v0.01 is a good starting point for learning the internals of a Unix-style OS kernel
- v0.01 has only 66 system calls
- File/directory creation, deletion, writing
- chmod, chown, pipe, fork, execve
- No network support, since the socket concept had not been introduced
- mount not yet implemented
- strcpy is coded in assembly using i386 instructions
- CMOS, PIT (Programmable Interval Timer), ATA (PIO), VGA (text mode), Intel 8042 PS2 keyboard (assembly)
- No drivers folder yet; hard-coded into the subsystems
- Of course, it has since been modified as various improvements and algorithms were introduced, so this prophecy was wrong
- It looks that way, but the trick is actually the move_to_user_mode() before it
- GCC is backward compatible, but not enough
- Linus had his own GCC with an option called -mstring-insns (probably an option supporting x86 string instructions)
Documentation
- The Linux Kernel (David A Rusling) Korean translation
- Netmemo :: The Linux Kernel (Korean translation of The Linux Kernel)
-
The_Linux_Kernel-David_A_Rusling-ko.pdf
See also
Favorite site
- Kernel.org
- [Recommended] Linux Cross Reference
- [Recommended] Linux kernel analysis for system engineers
- [Recommended] Course: Becoming a friendly embedded system developer
- IAMROOT offline kernel study group
- [Recommended] Interactive map of Linux kernel
- KLDP: List of Linux kernel documents
Tunning
-
LPC_2019_kernel_fastboot_on_the_way3: They cut Linux kernel boot time from 3 seconds to 300ms? Not "just for fun", but because the rear camera has to work within 2 seconds of power-on... :( - Building an operating system kernel from scratch | GeekNews
Articles
- Object-oriented design patterns in C and kernel development | GeekNews
- [Original] Object-oriented design patterns on OSHub
- Object-oriented design patterns enable polymorphism and modularity even in kernels written in C, allowing flexible system design
- Uses vtables (virtual function tables) to standardize device and service interfaces, supporting various behaviors through dynamic changes at runtime
- Kernel services and the scheduler provide consistent interfaces such as start, stop, and restart through vtables, encapsulating implementation details
- Combined with kernel modules, supports dynamic driver loading, allowing the system to be extended without recompilation
- This approach offers flexibility and freedom to experiment, but the clutter from complex syntax and explicit object passing is a drawback