The goal is simple - to share my modest knowledge about the insides of the linux kernel and help people who are interested in linux kernel insides, and other low-level subject matter. Feel free to go through the book Start here
The kernel is written mostly in C, with some architecture-dependentparts written in assembly. A good understanding of C is required forkernel development. Assembly (any architecture) is not required unlessyou plan to do low-level development for that architecture. Though theyare not a good substitute for a solid C education and/or years ofexperience, the following books are good for, if anything, reference:
Linux Kernel Architecture Epub Format
Download File: https://urluss.com/2vIoLx
The kernel is written using GNU C and the GNU toolchain. While itadheres to the ISO C89 standard, it uses a number of extensions that arenot featured in the standard. The kernel is a freestanding Cenvironment, with no reliance on the standard C library, so someportions of the C standard are not supported. Arbitrary long longdivisions and floating point are not allowed. It can sometimes bedifficult to understand the assumptions the kernel has on the toolchainand the extensions that it uses, and unfortunately there is nodefinitive reference for them. Please check the gcc info pages (infogcc) for some information on them.
The Linux kernel source tree has a large range of documents that areinvaluable for learning how to interact with the kernel community. Whennew features are added to the kernel, it is recommended that newdocumentation files are also added which explain how to use the feature.When a kernel change causes the interface that the kernel exposes touserspace to change, it is recommended that you send the information ora patch to the manual pages explaining the change to the manual pagesmaintainer at mtk.manpages@gmail.com, and CC the listlinux-api@vger.kernel.org.
The website has basic information about code organization, subsystems,and current projects (both in-tree and out-of-tree). It also describessome basic logistical information, like how to compile a kernel andapply a patch.
Before making any actual modifications to the Linux kernel code, it isimperative to understand how the code in question works. For thispurpose, nothing is better than reading through it directly (most trickybits are commented well), perhaps even with the help of specializedtools. One such tool that is particularly recommended is the LinuxCross-Reference project, which is able to present source code in aself-referential, indexed webpage format. An excellent up-to-daterepository of the kernel code may be found at:
The file admin-guide/reporting-bugs.rst in the main kernel source directory has a goodtemplate for how to report a possible kernel bug, and details what kindof information is needed by the kernel developers to help track down theproblem.
The kernel uses cgroups to group processes for the purpose of system resource management. Cgroups allocate CPU time, system memory, network bandwidth, or combinations of these among user-defined groups of tasks. In Red Hat Enterprise Linux 7, cgroups are managed with systemd slice, scope, and service units. For more information on cgroups, see the Red Hat Enterprise Linux 7 Resource Management Guide.
Security-Enhanced Linux (SELinux) is an implementation of a mandatory access control (MAC) mechanism, multi-level security (MLS), and multi-category security (MCS) in the Linux kernel. The sVirt project builds upon SELinux and integrates with Libvirt to provide a MAC framework for virtual machines and containers. This architecture provides a secure separation for containers as it prevents root processes within the container from interfering with other processes running outside this container. The containers created with Docker are automatically assigned with an SELinux context specified in the SELinux policy.
By design, the ELF format is flexible, extensible, and cross-platform. For instance, it supports different endiannesses and address sizes so it does not exclude any particular central processing unit (CPU) or instruction set architecture. This has allowed it to be adopted by many different operating systems on many different hardware platforms.
Some phones can run ELF files through the use of a patch that adds assembly code to the main firmware, which is a feature known as ELFPack in the underground modding culture. The ELF file format is also used with the Atmel AVR (8-bit), AVR32[21]and with Texas Instruments MSP430 microcontroller architectures. Some implementations of Open Firmware can also load ELF files, most notably Apple's implementation used in almost all PowerPC machines the company produced.
86open was a project to form consensus on a common binary file format for Unix and Unix-like operating systems on the common PC compatible x86 architecture, to encourage software developers to port to the architecture.[25] The initial idea was to standardize on a small subset of Spec 1170, a predecessor of the Single UNIX Specification, and the GNU C Library (glibc) to enable unmodified binaries to run on the x86 Unix-like operating systems. The project was originally designated "Spec 150".
FatELF is an ELF binary-format extension that adds fat binary capabilities.[28] It is aimed for Linux and other Unix-like operating systems. Additionally to the CPU architecture abstraction (byte order, word size, CPU instruction set etc.), there is the potential advantage of software-platform abstraction e.g., binaries which support multiple kernel ABI versions. As of 2021[update], FatELF has not been integrated into the mainline Linux kernel.[29][30][31]
aurora-xeneva is a multitasking GUI based operating system targeting x86_64 & aarch64 architecture, focusing most modern hardwares as possible. "Aurora" being the name of kernel and "Xeneva" is the name of entire operating system. Aurora kernel features SMP, Networking, HD-Audio,USB3,Graphical Drivers,..many more.
Beelzebub (The Lord of Flies) features a hybrid kernel, accompanied by libraries and apps written mainly in C++, serving as a platform for development and experimentation of kernel/OS/runtime features. It currently targets AMD64, with plans to support IA-32 and ARM architectures later. It aims to become a clean, modern, and efficient operating system for servers and workstations.
JSLK is a 32-bit hobby kernel designed to run on the x86 architecture (although portability has been taken into consideration). It was started in August 2017 with the objective of learning how a computer operating system works and to improve the coding skills of the main developer. The kernel is mostly written in C with some bits of assembly and has partial compatibility with C++ (a runtime is provided). Some of its features are: extensive HAL API, System V ABI compatibility, memory management, interrupt handling, VGA driver, timers and delays, some synchronization primitives, a growing home-made C library, virtual memory, a VFS, a keyboard and RTC driver and more. Website:
Lambda OS is a hobby operating system developed by Peter Farley. Lambda OS is designed to work on any i386-compatible processor, but its' design allows for easier addition of new architectures without any major modification of the main kernel code
The kernel is developed in C++. It is designed to run on Intel x86 architecture. Supported functionalities: Multitasking, Multithreading, FAT32 and BFS file systems (proper for mkfree), Virtual memory manager, Controllers, Hierarchical protection domains (Kernel runs in ring 0 and user applications in ring 3). Multitasking: Each task is executed every 1ms intervals. For now all tasks have the same priority. There is a main thread of execution and it can have these states: 1- suspended, 2- waiting and 3- executing. Multiple threads: Each task can have several threads of execution and can have several states: 1- suspended, 2- waiting and 3- executing. GUI: Simple graphical interface. 2ff7e9595c
Comments