Linux kernel
The Linux kernel is a free and open-source Unix-like kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the kernel for the GNU operating system which was created to be a free replacement for Unix. Since the late 1990s, it has been included in many operating system distributions, many of which are called Linux. One such Linux kernel operating system is Android which is used in many mobile and embedded devices.
Most of the kernel code is written in C as supported by the GNU Compiler Collection which has extensions beyond standard C. The code also contains assembly code for architecture-specific logic such as optimizing memory use and task execution. The kernel has a modular design such that modules can be integrated as software components including dynamically loaded. The kernel is monolithic in an architectural sense since the entire OS kernel runs in kernel space.
Linux is provided under the GNU General Public License version 2, although it contains files under other compatible licenses.
History
In 1991, Linus Torvalds was a computer science student enrolled at the University of Helsinki. During his time there, he began to develop an operating system as a side-project inspired by UNIX, for a personal computer. He started with a task switcher in Intel 80386 assembly language and a terminal driver. On 25 August 1991, Torvalds posted the following to comp.os.minix, a newsgroup on Usenet:On 17 September 1991, Torvalds prepared version 0.01 of Linux and put on the "ftp.funet.fi" – FTP server of the Finnish University and Research Network. It was not even executable since its code still needed Minix to compile and test it.
On 5 October 1991, Torvalds announced the first "official" version of Linux, version 0.02.
Linux grew rapidly as many developers, including the MINIX community, contributed to the project. At the time, the GNU Project had completed many components for its free UNIX replacement, GNU, but its kernel, the GNU Hurd, was incomplete. The project adopted the Linux kernel for its OS.
Torvalds labeled the kernel with major version 0 to indicate that it was not yet intended for general use. Version 0.11, released in December 1991, was the first version to be self-hosted; compiled on a computer running the Linux kernel.
When Torvalds released version 0.12 in January 1992, he adopted the GNU General Public License version 2 over his previous self-drafted license, which had not permitted commercial redistribution. GPL took effect as of 1 February 1992. In contrast to Unix, all source files of Linux are freely available, including device drivers.
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.
On 19 January 1992, the first post to the new newsgroup alt.os.linux was submitted. On 31 March 1992, the newsgroup was renamed comp.os.linux.
The fact that Linux is a monolithic kernel rather than a microkernel was the topic of a debate between Andrew S. Tanenbaum, the creator of MINIX, and Torvalds. The Tanenbaum–Torvalds debate started in 1992 on the Usenet group comp.os.minix as a general discussion about kernel architectures.
Version 0.96 released in May 1992 was the first capable of running the X Window System. In March 1994, Linux 1.0.0 was released with 176,250 lines of code. As indicated by the version number, it was the first version considered suitable for a production environment. In June 1996, after release 1.3, Torvalds decided that Linux had evolved enough to warrant a new major number, and so labeled the next release as version 2.0.0. Significant features of 2.0 included symmetric multiprocessing, support for more processors types and support for selecting specific hardware targets and for enabling architecture-specific features and optimizations. The make *config family of commands of kbuild enable and configure options for building ad hoc kernel executables and loadable modules.
Version 2.2, released on 20 January 1999, improved locking granularity and SMP management, added m68k, PowerPC, Sparc64, Alpha, and other 64-bit platforms support. Furthermore, it added new file systems including Microsoft's NTFS read-only capability. In 1999, IBM published its patches to the Linux 2.2.13 code for the support of the S/390 architecture.
Version 2.4.0, released on 4 January 2001, contained support for ISA Plug and Play, USB, and PC Cards. Linux 2.4 added support for the Pentium 4 and Itanium, and for the newer 64-bit MIPS processor. Development for 2.4.x changed a bit in that more features were made available throughout the series, including support for Bluetooth, Logical Volume Manager version 1, RAID support, InterMezzo and ext3 file systems.
Version 2.6.0 was released on 17 December 2003. The development for 2.6.x changed further towards including new features throughout 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 into the mainline kernel sources, support for up to 232 users, support for up to 229 process IDs, 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, User-mode Linux integration into the mainline kernel sources, SELinux integration into the mainline kernel sources, InfiniBand support, and considerably more.
Starting with 2.6.x releases, the kernel supported a large number of file systems. Some were designed for Linux, like ext3, ext4, FUSE, and Btrfs. Others were native to other operating systems like JFS, XFS, Minix, Xenix, Irix, Solaris, System V, Windows, and MS-DOS.
Though development had not used a version control system thus far, in 2002, Linux developers adopted BitKeeper, which was made freely available to them even though 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.
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. 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. Several subsystem maintainers also adopted the suffix -next for trees containing code which they mean to submit for inclusion in the next release cycle., the in-development version of Linux is held in an unstable branch named linux-next.
The 20th anniversary of Linux was celebrated by Torvalds in July 2011 with the release of version 3.0.0. As 2.6 had been the version number for 8 years, a new uname26 personality that reports 3.x as 2.6.40+x had to be added to the kernel so that old programs would work.
Version 3.0 was released on 22 July 2011. On 30 May 2011, Torvalds announced that the big change was "NOTHING. Absolutely nothing." and asked, "...let's make sure we really make the next release not just an all new shiny number, but a good kernel too." After the expected 6–7 weeks of the development process, it would be released near the 20th anniversary of Linux.
On 11 December 2012, Torvalds decided to reduce kernel complexity by removing support for i386 processors—specifically by not having to emulate the atomic CMPXCHG instruction introduced with the i486 to allow reliable mutexes—making the 3.7 kernel series the last one still supporting the original processor. The same series unified support for the ARM processor.
The numbering change from 2.6.39 to 3.0, and from 3.19 to 4.0, involved no meaningful technical differentiation; the major version number was increased simply to avoid large minor numbers. Stable 3.x.y kernels were released until 3.19 in February 2015. Version 3.11, released on 2 September 2013, added many new features such as new flag for to reduce temporary file vulnerabilities, experimental AMD Radeon dynamic power management, low-latency network polling, and zswap.
In April 2015, Torvalds released kernel version 4.0. By February 2015, Linux had received contributions from nearly 12,000 programmers from more than 1,200 companies, including some of the world's largest software and hardware vendors. Version 4.1 of Linux, released in June 2015, contains over 19.5 million lines of code contributed by almost 14,000 programmers.
Linus Torvalds announced that kernel version 4.22 would instead be numbered 5.0 in March 2019, stating that "'5.0' doesn't mean anything more than that the 4.x numbers started getting big enough that I ran out of fingers and toes." It featured many major additions such as support for the AMD Radeon FreeSync and NVIDIA Xavier display, fixes for F2FS, EXT4 and XFS, restored support for swap files on the Btrfs file system and continued work on the Intel Icelake Gen11 graphics and on the NXP i.MX8 SoCs. This release was noticeably larger than the rest, Torvalds mentioning that "The overall changes for all of the 5.0 release are much bigger."
A total of 1,991 developers, of whom 334 were first-time collaborators, added more than 553,000 lines of code to version 5.8, breaking the record previously held by version 4.9.