User:Dangeredwolf/Hybrid kernel

From Simple English Wikipedia, the free encyclopedia

A hybrid kernel is type of operating system kernel which tries to bring together the ideas of microkernels and monolithic kernels into one kernel to be used on computer operating systems.

Overview[change | change source]

Before hybrid kernels, there were monolithic kernels and microkernels. Because "hybrid" kernels are a bit similar to monolithic kernels, Linus Torvalds has said that the idea of a hybrid kernel is "simple marketing".[1]

The hybrid kernel idea has a structure similar to microkernels, but it is used like a monolithic kernel. In microkernel, all (or almost all) operating system services in a hybrid kernel remain in kernel space. Because of this, the stability benefits of having services in user space, as with a microkernel. But like a monolithic kernel, messaging and context changing between kernel and user mode is not as slow as a microkernel.

Examples[change | change source]

NT kernel[change | change source]

The Windows NT operating system family's architecture consists of two layers (user mode and kernel mode), with many different modules within both of these layers.

An important example of a hybrid kernel is the Microsoft Windows NT kernel which is a part of NT 3.xx, NT 4.0, 2000, XP, 2003, Vista, Windows Server 2008, 7, 2008 R2 8, 2012, 8.1, 2012 R2, 10, and 2016, as well asWindows Phone 8, 8.1, and 10 Mobile, and the pre-Windows 10 and post-Windows 10 operating system for Xbox One. NT-based Windows is usually called a hybrid kernel instead of a monolithic kernel because the emulation sub-systems run in the user mode and not in kernel mode like monolithic kernels, and because of the design goals looked like the design goals of Mach (which kept many parts of the OS away from the kernel). NT is not a microkernel because most system components run in kernel memory like a monolithic kernel.

Description[change | change source]

Windows NT has the same objectives as Mach, the first fully developed microkernel, especially how modules communicate, with a small microkernel limited to core functions like thread scheduling and synchronization. This permits direct procedure calls or interprocess communication (IPC) to communicate between these modules in different address spaces (like kernel space or server processes). Other similar goals are support for distinct architectures, a kernel generalized enough could let multiple operating system personalities to be used with it.[2][3]

NT is not a microkernel because system services run in kernel mode in the same address space as the kernel, not in user-mode processes, like a microkernel. This was also true with early versions of Mach, as well as all Mach-based systems, due to the superior performance from direct procedure calls in one single memory space and not IPC. The user-mode subsystems on NT have emulation subsystems providing an operating system personality to applications, the Session Manager Subsystem (smss.exe), starting the subsystems when the computer is turning on, and the Local Security Authority Subsystem Service (lsass.exe), which ensures system security. The subsystems aren't written for a particular OS personality, but to the native NT API (or Native API).

The main operating system personality on Windows is the Windows API. The subsystem with the Windows personality is called the Client/Server Runtime Subsystem (csrss.exe). Before NT 4.0, this process also had the window manager, graphics controller and graphics drivers. To make the system run faster in NT 4.0, these modules (which often in user mode even on monolithic systems, especially if designed without internal graphics support) run as a kernel-mode subsystem.[2]

In 2007, another operating system personality, UNIX, was available optionally on some versions of Windows Vista and Windows Server 2003 R2. It is called the Subsystem for UNIX-Based Applications (psxss.exe), which was once part of a Windows add-on called Windows Services for UNIX. An OS/2 subsystem (os2ss.exe) was supported in older versions of Windows NT, as was a very limited POSIX subsystem (psxss.exe). The POSIX subsystem was supplanted by the UNIX subsystem, hence the identical executable name.[4]

In August 2016, Microsoft introduced the Linux Subsystem for Windows (lxss.exe)[5], which works on 64-bit Windows 10 version 1607 (Anniversary Update, codenamed Redstone), runs a small version of Ubuntu 14.04 LTS without emulation. It was marketed as "Bash on Windows"[6] because it ran bash, a popular Command Line Interface used on Linux and macOS, and permits most amd64 linux binaries to run without changes. This was made for developers to use their tools on Windows without having to emulate Linux, and developer mode to be enabled in Windows Settings[7]. It's made only for command-line applications, but a reddit user discovered how to run GUI applications using it.[8] Some applications that need the Linux kernel itself will not be able to run because the subsystem does not have the Linux kernel.[9]

XNU kernel[change | change source]

XNU is the kernel that Apple Inc. uses in macOS and iOS and is available as free and open source software as part of Darwin. XNU is an acronym for X is Not Unix.[10]

First made by NeXT for NeXTSTEP, XNU was a hybrid kernel with Mach kernel version 2.5 made at Carnegie Mellon University with parts from 4.3BSD and an Object-oriented API for drivers called Driver Kit.

After Apple purchased the NeXT company, Mach was upgraded to 3.0, BSD parts were upgraded with code from the FreeBSD project, and the Driver Kit was replaced with a C++ API for writing drivers called I/O Kit.

Description[change | change source]

Like some other modern kernels, XNU is a hybrid, with parts of both monolithic and microkernels, and it tries to use both technologies the best, like message passing of microkernels enabling greater modularity[source?] and large parts of the OS that benefit from protected memory,[source?] and keeping the speed of monolithic kernels for certain critical tasks.

XNU runs on ARM processors in iOS,[11] x86-64, and previously PowerPC and IA-32 processors.

Others[change | change source]

See also[change | change source]

References[change | change source]

  1. "Linus Torvalds". As to the whole "hybrid kernel" thing - it's just marketing. It's "Oh, those microkernels had good PR, how can we try to get good PR for our working kernel? Oh, I know, let's use a cool name and try to imply that it has all the PR advantages that that other system has.
  2. 2.0 2.1 "MS Windows NT Kernel-mode User and GDI White Paper". Microsoft Corporation. 2007. Retrieved 2007-03-01.
  3. Silberschatz, Abraham; Galvin, Peter Baer; Gagne, Greg (2005). Operating System Concepts; 7th Edition (PDF). Hoboken, New Jersey: John Wiley & Sons Inc. ISBN 978-0-471-69466-3.
  4. Probert, Dave (2005). "Overview of Windows Architecture". Using Projects Based on Internal NT APIs to Teach OS Principles. Microsoft Research/Asia - Beijing. Retrieved 2007-03-01.
  5. Juarez, Seth (Oct 19, 2016). "Windows Subsystem for Linux: Windows and Ubuntu Interoperability". Channel 9. Microsoft Corporation. Retrieved 2017/03/10. {{cite web}}: Check date values in: |accessdate= (help)
  6. jackchammons. "Bash on Ubuntu on Windows - About". msdn.microsoft.com. Retrieved 2017-03-10.
  7. jackchammons. "Bash on Ubuntu on Windows - Installation Guide". msdn.microsoft.com. Retrieved 2017-03-10.
  8. "FYI you can run GUI Linux apps from bash • r/Windows10". reddit. Retrieved 2017-03-10.
  9. "Why Microsoft needed to make Windows run Linux software". Ars Technica. Retrieved 2017-03-10.
  10. "Porting UNIX/Linux Applications to Mac OS X: Glossary". Apple Computer. 2005. Retrieved 2009-03-27.
  11. iPhone processor found: 620MHz ARM CPU (1 July 2007. Retrieved 2008-01-06.
  12. http://www.usenix.org/publications/library/proceedings/sf94/full_papers/minshall.a

Template:Operating System


Category:Operating system kernels