The Linux kernel is a free and open-source,[11] monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU operating system, which was written to be a free (libre) replacement for Unix.
Linux is deployed on a wide variety of computing systems, such as embedded devices, mobile devices (including its use in the Android operating system), personal computers, servers, mainframes, and supercomputers.[12] It can be tailored for specific architectures and for several usage scenarios using a family of simple commands (that is, without the need of manually editing its source code before compilation);[13][14][15] privileged users can also fine-tune kernel parameters at runtime.[16][17][18] Most of the Linux kernel code is written using the GNU extensions of GCC[19][20] to the standard C programming language and with the use of architecture-specific instructions (ISA) in limited parts of the kernel. This produces a highly optimized executable (vmlinux) with respect to utilization of memory space and task execution times.[21]
Linux Kernel Development Pdf Free Download
Day-to-day development discussions take place on the Linux kernel mailing list (LKML). Changes are tracked using the version control system git, which was originally authored by Torvalds as a free software replacement for BitKeeper.
After that, despite the limited functionality of the early versions, Linux rapidly gained developers and users. Many people contributed code to the project, including some developers from the MINIX community.[citation needed] At the time, the GNU Project had created many of the components required for its free UNIX replacement, the GNU operating system, but its own kernel, GNU Hurd, was incomplete. For this reason, it soon adopted the Linux kernel as well.[26] The Berkeley Software Distribution had not yet freed itself from legal encumbrances and was not competing in the space for a free OS kernel.[citation needed]
When Torvalds released version 0.12 in February 1992, he adopted the GNU General Public License version 2 (GPLv2) over his previous self-drafted license, which had not permitted commercial redistribution.[28] In contrast to Unix, all source files of Linux are freely available, including device drivers.[29] The initial success of Linux was driven by programmers and testers across the world. With the support of the POSIX APIs, through the libC that, whether needed, acts as an entry point to the kernel address space, Linux could run software and applications that had been developed for Unix.[30]
It started a versioning system for the kernel with three or four numbers separated by dots where the first represented the major release, the second was the minor release, and the third was the revision.[38] At that time odd-numbered minor releases were for development and tests, whilst even numbered minor releases were for production. The optional fourth digit indicated a set of patches to a revision.[27] Development releases were indicated with -rc ("release candidate") suffix.
Starting with version 2.0, Linux is configurable for selecting specific hardware targets and for enabling architecture-specific features and optimizations.[30] The make *config family of commands of kbuild are used to enable and configure thousands of options for building ad hoc kernel executables (vmlinux) and loadable modules.[13][14]
Version 2.6.0 was released on 17 December 2003.[47] The development for 2.6.x changed further towards including new features throughout the duration of the series. Among the changes that have been made in the 2.6 series are: integration of µClinux into the mainline kernel sources, PAE support, support for several new lines of CPUs, integration of Advanced Linux Sound Architecture (ALSA) into the mainline kernel sources, support for up to 232 users (up from 216), support for up to 229 process IDs (64-bit only, 32-bit arches still limited to 215),[48] substantially increased the number of device types and the number of devices of each type, improved 64-bit support, support for file systems which support file sizes of up to 16 terabytes, in-kernel preemption, support for the Native POSIX Thread Library (NPTL), User-mode Linux integration into the mainline kernel sources, SELinux integration into the mainline kernel sources, InfiniBand support, and considerably more.
In 2005 the stable team was formed as a response to the lack of a kernel tree where people could work on bug fixes, and it would keep updating stable versions.[51] In February 2008 the linux-next tree was created to serve as a place where patches aimed to be merged during the next development cycle gathered.[52][53] Several subsystem maintainers also adopted the suffix -next for trees containing code which they mean to submit for inclusion in the next release cycle. As of January 2014[update], the in-development version of Linux is held in an unstable branch named linux-next.[54]
Linux used to be maintained without the help of an automated source code management system until, in 2002, development switched to BitKeeper. It was freely available for Linux developers but it was not free software. In 2005, because of efforts to reverse-engineer it, the company which owned the software revoked its support of the Linux community. In response, Torvalds and others wrote Git. The new system was written within weeks, and in two months the first official kernel made using it was released.[55]
Linux is a monolithic kernel with a modular design (e.g., it can insert and remove loadable kernel modules at runtime),[77][78] supporting most features once only available in closed source kernels of non-free operating systems. The rest of the article makes use of the UNIX and Unix-like operating systems convention on the official manual pages. The numbers that follow the name of commands, interfaces, and other features, have the purpose of specifying the section (i.e., the type of the OS' component or feature) they belong to (e.g., execve(2) refers to a system call, while exec(3) refers to a userspace library wrapper). The following list and the subsequent sections describe a non-comprehensive overview of Linux architectural design and of some of its noteworthy features.
Loadable kernel modules (LKMs), by design, cannot rely on a stable ABI.[99] Therefore, they must always be recompiled whenever a new kernel executable is installed in a system, otherwise they will not be loaded. In-tree drivers that are configured to become an integral part of the kernel executable (vmlinux) are statically linked by the building process.
The GNU Compiler Collection (GCC or GNU cc) is the default compiler for the mainline Linux sources and it is invoked by a utility called make. Then, the GNU Assembler (more often called GAS or GNU as) outputs the object files from the GCC generated assembly code. Finally, the GNU Linker (GNU ld) is used to produce a statically linked executable kernel file called vmlinux. Both as and ld are part of GNU Binary Utilities (binutils). The above-mentioned tools are collectively known as the GNU toolchain.
The Linux kernel project integrates new code on a rolling basis. Software checked into the project must work and compile without error. Each kernel subsystem is assigned a maintainer who is responsible for reviewing patches against the kernel code standards and keeps a queue of patches that can be submitted to Linus Torvalds within a merge window of several weeks. Patches are merged by Torvalds into the source code of the prior stable Linux kernel release, creating the -rc release candidate for the next stable kernel. Once the merge window is closed only fixes to the new code in the development release are accepted. The -rc development release of the kernel goes through regression tests and once it is judged to be stable by Torvalds and the kernel subsystem maintainers a new Linux kernel is released and the development process starts all over again.[259]
Developers who feel treated unfairly can report this to the Linux Foundation's Technical Advisory Board.[260] In July 2013, the maintainer of the USB 3.0 driver Sage Sharp asked Torvalds to address the abusive commentary in the kernel development community. In 2014, Sharp backed out of Linux kernel development, saying that "The focus on technical excellence, in combination with overloaded maintainers, and people with different cultural and social norms, means that Linux kernel maintainers are often blunt, rude, or brutal to get their job done".[261] At the linux.conf.au (LCA) conference in 2018, developers expressed the view that the culture of the community has gotten much better in the past few years. Daniel Vetter, the maintainer of the Intel drm/i915 graphics kernel driver, commented that the "rather violent language and discussion" in the kernel community has decreased or disappeared.[262]
Laurent Pinchart asked developers for feedback on their experience with the kernel community at the 2017 Embedded Linux Conference Europe. The issues brought up were discussed a few days later at the Maintainers Summit. Concerns over the lack of consistency in how maintainers responded to patches submitted by developers were echoed by Shuah Khan, the maintainer of the kernel self-test framework. Torvalds contended that there would never be consistency in the handling of patches because different kernel subsystems have, over time, adopted different development processes. Therefore, it was agreed upon that each kernel subsystem maintainer would document the rules for patch acceptance.[263]
Prominent Linux kernel developers have been aware of the importance of avoiding conflicts between developers.[290] For a long time there was no code of conduct for kernel developers due to opposition by Linus Torvalds.[291] However, a Linux Kernel Code of Conflict was introduced on 8 March 2015.[292] It was replaced on 16 September 2018 by a new Code of Conduct based on the Contributor Covenant. This coincided with a public apology by Torvalds and a brief break from kernel development.[293][294] On 30 November 2018, complying with the Code of Conduct, Jarkko Sakkinen of Intel sent out patches replacing instances of "fuck" appearing in source code comments with suitable versions focused on the word 'hug'.[295] 2ff7e9595c
Comments