The Native POSIX Thread Library ( NPTL ) is an implementation of the POSIX Threads specification for the Linux operating system.
53-629: Before the 2.6 version of the Linux kernel , processes were the schedulable entities, and there were no special facilities for threads . However, it did have a system call — clone — which creates a copy of the calling process where the copy shares the address space of the caller. The LinuxThreads project used this system call to provide kernel-level threads (most of the previous thread implementations in Linux worked entirely in userland ). Unfortunately, it only partially complied with POSIX, particularly in
106-579: 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 (GCC) 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
159-497: 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 runs in kernel space . Linux is provided under the GNU General Public License version 2 , although it contains files under other compatible licenses . In April 1991, Linus Torvalds, a 21-year-old computer science student at
212-403: 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
265-581: A Linux Kernel Code of Conflict was introduced on 8 March 2015. 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. 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
318-441: A bit in that more features were made available throughout the series, including support for Bluetooth , Logical Volume Manager (LVM) 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
371-551: A multi-threaded fs. It is NOT protable [ sic ] (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that's all I have :-(. 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 ( FUNET ). It was not even executable since its code still needed Minix to compile and test it. On 5 October 1991, Torvalds announced
424-483: A roadmap, there are technical guidelines. Instead of a central resource allocation, there are persons and companies who all have a stake in the further development of the Linux kernel, quite independently from one another: People like Linus Torvalds and I don’t plan the kernel evolution. We don’t sit there and think up the roadmap for the next two years, then assign resources to the various new features. That's because we don’t have any resources. The resources are all owned by
477-523: A single address space for all user-mode code. (The kernel-mode code may be in the same address space, or it may be in a second address space). Other operating systems have a per-process address space, with a separate address space for each user-mode process. Another approach taken in experimental operating systems is to have a single address space for all software, and rely on a programming language's semantics to make sure that arbitrary memory cannot be accessed – applications cannot acquire any references to
530-514: A study issued by the Linux Foundation, covering the commits for the releases 4.8 to 4.13, about 1500 developers were contributing from about 200–250 companies on average. The top 30 developers contributed a little more than 16% of the code. For companies, the top contributors are Intel (13.1%) and Red Hat (7.2%), Linaro (5.6%), IBM (4.1%), the second and fifth places are held by the 'none' (8.2%) and 'unknown' (4.1%) categories. Instead of
583-495: 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.95 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
SECTION 10
#1732783567778636-552: Is significantly responsible for rising use of Linux overall. The cost to redevelop version 2.6.0 of the Linux kernel in a traditional proprietary development setting has been estimated to be US$ 612 million (€467M, £394M) in 2004 prices using the COCOMO person-month estimation model. In 2006, a study funded by the European Union put the redevelopment cost of kernel version 2.6.8 higher, at €882M ($ 1.14bn, £744M). This topic
689-407: Is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) among other things). I've currently ported bash (1.08) and gcc (1.40), and things seem to work. This implies that I'll get something practical within a few months [...] Yes - it's free of any minix code, and it has
742-437: Is strictly reserved for running a privileged operating system kernel , kernel extensions, and most device drivers . In contrast, user space is the memory area where application software and some drivers execute, typically one address space per process. The term user space (or userland ) refers to all code that runs outside the operating system's kernel. User space usually refers to the various programs and libraries that
795-621: The MINIX community, contributed to the project. At the time, the GNU Project had completed many components for its free UNIX replacement, the GNU OS , but its kernel, 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,
848-605: 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. Starting with 2.6.x releases, the kernel supported a large number of file systems; some designed for Linux, like ext3 , ext4 , FUSE , Btrfs , and others native to other operating systems like JFS , XFS , Minix, Xenix , Irix , Solaris , System V , Windows and MS-DOS . Though development had not used
901-571: The University of Helsinki started working on an operating system, 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 : I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since April, and
954-1066: 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 O_TMPFILE flag for open(2) to reduce temporary file vulnerabilities, experimental AMD Radeon dynamic power management, low-latency network polling, and zswap (compressed swap cache). 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
1007-464: The "core," including architecture-specific code, kernel code, and mm code, while 60% is drivers. Contributions are submitted as patches, in the form of text messages on the Linux kernel mailing list (LKML) (and often also on other mailing lists dedicated to particular subsystems). The patches must conform to a set of rules and to a formal language that, among other things, describes which lines of code are to be deleted and what others are to be added to
1060-762: 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
1113-420: The European Union. As of 7 March 2011 , using then-current LOC (lines of code) of a 2.6.x Linux kernel and wage numbers with David A. Wheeler's calculations it would cost approximately $ 3bn (about €2.2bn) to redevelop the Linux kernel as it keeps getting bigger. An updated calculation as of 26 September 2018 , using then-current 20,088,609 LOC (lines of code) for the 4.14.14 Linux kernel and
SECTION 20
#17327835677781166-549: 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 (the latter introduced the ia64 ISA that was jointly developed by Intel and Hewlett-Packard to supersede the older PA-RISC ), and for the newer 64-bit MIPS processor. Development for 2.4. x changed
1219-458: The NPTL library. NPTL relies on kernel support for futexes to more efficiently implement user-space locks. 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 (OS) which was created to be
1272-506: The NPTL team and combined the best features of both implementations into NPTL. The NGPT project was subsequently abandoned in mid-2003 after merging its best features into NPTL. NPTL was first released in Red Hat Linux 9. Old-style Linux POSIX threading is known for having trouble with threads that refuse to yield to the system occasionally, because it does not take the opportunity to preempt them when it arises, something that Windows
1325-442: The areas of signal handling, scheduling, and inter-process synchronization primitives. To improve upon LinuxThreads, it was clear that some kernel support and a new threading library would be required. Two competing projects were started to address the requirement: NGPT (Next Generation POSIX Threads) worked on by a team which included developers from IBM , and NPTL by developers at Red Hat . The NGPT team collaborated closely with
1378-459: The change will either be submitted as a single patch or in multiple patches of source code . In case of a single subsystem that is maintained by a single maintainer, these patches are sent as e-mails to the maintainer of the subsystem with the appropriate mailing list in Cc. The maintainer and the readers of the mailing list will review the patches and provide feedback. Once the review process has finished
1431-413: The current US national average programmer salary of $ 75,506 show that it would cost approximately $ 14,725,449,000 (£11,191,341,000) to rewrite the existing code. Most who use Linux do so via a Linux distribution . Some distributions ship the vanilla or stable kernel. However, several vendors (such as Red Hat and Debian ) maintain a customized source tree. These are usually updated at a slower pace than
1484-484: The first "official" version of Linux, version 0.02. [As] I mentioned a month ago, I'm working on a free version of a Minix-lookalike for AT-386 computers. It has finally reached the stage where it's even usable (though may not be depending on what you want), and I am willing to put out the sources for wider distribution. It is just version 0.02...but I've successfully run bash, gcc, gnu-make, gnu-sed, compress, etc. under it. Linux grew rapidly as many developers, including
1537-416: 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
1590-589: 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
1643-570: 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
Native POSIX Thread Library - Misplaced Pages Continue
1696-663: The kernel to map part of another process's memory space to its own, as is the case for debuggers . Programs can also request shared memory regions with other processes, although other techniques are also available to allow inter-process communication . The most common way of implementing a user mode separate from kernel mode involves operating system protection rings . Protection rings, in turn, are implemented using CPU modes . Typically, kernel space programs run in kernel mode , also called supervisor mode ; normal applications in user space run in user mode. Some operating systems are single address space operating systems —they have
1749-406: The kernel with system software (e.g., the GNU C Library , systemd , and other Unix utilities and daemons ) and a wide selection of application software , but their usage share in desktops is low in comparison to other operating systems. Since Android , which is Linux, accounts for the majority of mobile device operating systems, and due to its rising use in embedded devices , Android
1802-471: 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. Laurent Pinchart asked developers for feedback on their experiences with
1855-537: 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 2 users (up from 2 ), support for up to 2 process IDs (64-bit only, 32-bit architectures still limited to 2 ), 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
1908-619: The operating system uses to interact with the kernel: software that performs input/output , manipulates file system objects, application software , etc. Each user space process normally runs in its own virtual memory space, and, unless explicitly allowed, cannot access the memory of other processes. This is the basis for memory protection in today's mainstream operating systems, and a building block for privilege separation . A separate user mode can also be used to build efficient virtual machines – see Popek and Goldberg virtualization requirements . With enough privileges, processes can request
1961-547: The previous kernel version. The Git kernel source tree names all developers who have contributed to the Linux kernel in the Credits directory and all subsystem maintainers are listed in Maintainers . As with many large open-source software projects, developers are required to adhere to the Contributor Covenant , a code of conduct intended to address harassment of minority contributors. Additionally, to prevent offense
2014-532: The record previously held by version 4.9. According to the Stack Overflow's annual Developer Survey of 2019, more than the 53% of all respondents have developed software for Linux and about 27% for Android , although only about 25% develop with Linux-based operating systems. Most websites run on Linux-based operating systems , and all of the world's 500 most powerful supercomputers use some form of OS based on Linux. Linux distributions bundle
2067-437: The specified files. These patches can be automatically processed so that system administrators can apply them in order to make just some changes to the code or to incrementally upgrade to the next version. Linux is distributed also in GNU zip (gzip) and bzip2 formats. A developer who wants to change the Linux kernel writes and tests a code change. Depending on how significant the change is and how many subsystems it modifies,
2120-407: The subsystem maintainer accepts the patches in the relevant Git kernel tree. If the changes to the Linux kernel are bug fixes that are considered important enough, a pull request for the patches will be sent to Torvalds within a few days. Otherwise, a pull request will be sent to Torvalds during the next merge window. The merge window usually lasts two weeks and starts immediately after the release of
2173-507: The suffix -next for trees containing code which they mean to submit for inclusion in the next release cycle. As of January 2014 , 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
Native POSIX Thread Library - Misplaced Pages Continue
2226-434: The use of inclusive terminology within the source code is mandated. Kernel space A modern computer operating system usually uses virtual memory to provide separate address spaces or separate regions of a single address space, called user space and kernel space . Primarily, this separation serves to provide memory protection and hardware protection from malicious or errant software behaviour. Kernel space
2279-407: The vanilla branch, and they usually include all fixes from the relevant stable branch, but at the same time they can also add support for drivers or features which had not been released in the vanilla version the distribution vendor started basing its branch from. The community of Linux kernel developers comprises about 5000–6000 members. According to the "2017 State of Linux Kernel Development",
2332-444: The various corporations who use and contribute to Linux, as well as by the various independent contributors out there. It's those people who own the resources who decide... Notable conflicts among Linux kernel developers: Prominent Linux kernel developers have been aware of the importance of avoiding conflicts between developers. For a long time there was no code of conduct for kernel developers due to opposition by Torvalds. However,
2385-949: 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 (SMP), 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 ( vmlinux ) 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
2438-719: The word 'hug'. Developers who feel treated unfairly can report this to the Linux Foundation Technical Advisory Board. 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". At
2491-571: 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
2544-448: Was agreed upon that each kernel subsystem maintainer would document the rules for patch acceptance. Linux is evolution, not intelligent design ! The kernel source code, a.k.a. source tree, is managed in the Git version control system – also created by Torvalds. As of 2021 , the 5.11 release of the Linux kernel had around 30.34 million lines of code. Roughly 14% of the code is part of
2597-493: 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
2650-488: Was known to do better at the time. Red Hat claimed that NPTL fixed this problem in an article on the Java website about Java on Red Hat Linux 9. NPTL has been part of Red Hat Enterprise Linux since version 3, and in the Linux kernel since version 2.6. It is now a fully integrated part of the GNU C Library . There exists a tracing tool for NPTL, called POSIX Thread Trace Tool ( PTT ). And an Open POSIX Test Suite ( OPTS )
2703-564: Was revisited in October 2008 by Amanda McPherson, Brian Proffitt, and Ron Hale-Evans. Using David A. Wheeler's methodology, they estimated redevelopment of the 2.6.25 kernel now costs $ 1.3bn (part of a total $ 10.8bn to redevelop Fedora 9). Again, Garcia-Garcia and Alonso de Magdaleno from University of Oviedo (Spain) estimate that the value annually added to kernel was about €100M between 2005 and 2007 and €225M in 2008, it would cost also more than €1bn (about $ 1.4bn as of February 2010) to develop in
SECTION 50
#17327835677782756-435: Was the first version to be self-hosted ; compiled on a computer running the Linux kernel. 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. In contrast to Unix , all source files of Linux are freely available, including device drivers . The initial success of Linux
2809-466: Was written for testing the NPTL library against the POSIX standard. Like LinuxThreads, NPTL is a 1:1 threads library. Threads created by the library (via pthread_create ) correspond one-to-one with schedulable entities in the kernel ( processes , in the Linux case). This is the simplest of the three threading models (1:1, N:1, and M:N). New threads are created with the clone() system call called through
#777222