Hybrid kernel

Hybrid kernel

Hybrid kernel is a kernel architecture based on combining aspects of microkernel and monolithic kernel architectures used in computer operating systems. The category is controversial due to the similarity to monolithic kernel; the term has been dismissed by some as just marketing. The usually accepted categories are monolithic kernels and microkernels (with nanokernels and exokernels seen as more extreme versions of microkernels).

The idea behind this quasi-category is to have a kernel structure similar to a microkernel, but implemented as a monolithic kernel. In contrast to a microkernel, all (or nearly all) services are in kernel space. As in a monolithic kernel, there is no performance overhead associated with microkernel message passing and context switching between kernel and user mode. Also, as with monolithic kernels, there are none of the benefits of having services in user space.

Controversy

As mentioned above, a hybrid kernel is like a monolithic kernel in that there is no performance overhead associated with microkernel and there are none of the benefits of having services in user space.

That leads to the controversy - does having a microkernel-like structure in a monolithic kernel make such a distinct difference that another category of kernels is needed?

Proponents

Microsoft normally uses the term "microkernel" and sometimes "modified microkernel", "modified microkernel or macrokernel"cite web | title = MS Windows NT Kernel-mode User and GDI White Paper | publisher = Microsoft Corporation | date = 2007 | url = http://www.microsoft.com/technet/archive/ntwrkstn/evaluate/featfunc/kernelwp.mspx?mfr=true | accessdate = 2007-03-01] when describing the kernel part of the architecture of the Windows NT operating system line. The whole architecture is said to be composed of a "modified microkernel", drivers, Executive, and HAL, and GDI/GDI+ all in kernel space. There are user space APIs supporting different OS environments.

Opponents

Many operating systems and kernel experts have dismissed the label as meaningless, and just marketing:

Linus Torvalds said of this issue:"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'." [ [http://www.realworldtech.com/forums/index.cfm?action=detail&id=66630&threadid=66595&roomid=11 Linus Torvalds, Real World Technologies Discussion Forum] (2006-05-09)]

Sonny Rao of the IBM LTC Kernel Performance File/IO team said:"It's wrong...I think this talk ... was born from some kind of half-assed marketing game to try and make XXX kernel seem 'more advanced.' 'Micro' and 'hybrid' are always better/more advanced than 'Monolithic' right??" [ [http://www.realworldtech.com/forums/index.cfm?action=detail&id=66596&threadid=66595&roomid=11 Sonny Rao, Real World Technologies Discussion Forum] (2006-05-08)]

Hybrid kernel examples

* BeOS kernel
** Haiku kernel
* Syllable
* BSD-based
** DragonFly BSD (first non-Mach BSD OS to use a hybrid kernel, concepts inspired by AmigaOS)
** XNU kernel (core of Darwin, used in Mac OS X)
* NetWare kernel [ [http://www.usenix.org/publications/library/proceedings/sf94/full_papers/minshall.a An Overview of the NetWare Operating System] (2007-02-07)]
* Plan 9 kernel
** Inferno kernel
* NT kernel (used in Windows NT, 2000, 2003; XP, Vista, 2008)
** ReactOS kernel

NT kernel

The best known example of a hybrid kernel is the NT kernel inside Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista and Windows Server 2008. NT-based Windows is classified as a hybrid kernel (or a macrokernelcite web | title = MS Windows NT Kernel-mode User and GDI White Paper | publisher = Microsoft Corporation | date = 2007 | url = http://www.microsoft.com/technet/archive/ntwrkstn/evaluate/featfunc/kernelwp.mspx?mfr=true | accessdate = 2007-03-01] ) rather than a monolithic kernel because the emulation subsystems run in user-mode server processes, rather than in kernel mode as on a monolithic kernel, and further because of the large number of design goals which resemble design goals of Mach (in particular the separation of OS personalities from a general kernel design). Conversely, the reason NT is not a microkernel system is because most of the system components run in the same address space as the kernel, as would be the case with a monolithic design (in a traditional monolithic design, there would not be a microkernel per se, but the kernel would implement broadly similar functionality to NT's microkernel and kernel-mode subsystems).

Description

The Windows NT design included many of the same objectives as Mach, the archetypal microkernel system, one of the most important being its structure as a collection of modules which communicate via well-known interfaces, with a small microkernel limited to core functions such as first-level interrupt handling, thread scheduling and synchronization primitives. This allows for the possibility of using either direct procedure calls or interprocess communication (IPC) to communicate between modules, and hence for the potential location of modules in different address spaces (for example in either kernel space or server processes). Other design goals shared with Mach included support for diverse architectures, a kernel with abstractions general enough to allow multiple operating system personalities to be implemented on top of it and an object-oriented organisation.cite book | last = Silberschatz | first = Abraham | coauthors = Peter Baer Galvin and Greg Gagne | title = Operating System Concepts; 7th Edition | publisher = John Wiley & Sons Inc | date = 2005 | location = Hoboken, New Jersey | url = http://higheredbcs.wiley.com/legacy/college/silberschatz/0471694665/appendices/appb.pdf | id = ISBN 978-0-471-69466-3] cite web | title = MS Windows NT Kernel-mode User and GDI White Paper | publisher = Microsoft Corporation | date = 2007 | url = http://www.microsoft.com/technet/archive/ntwrkstn/evaluate/featfunc/kernelwp.mspx?mfr=true | accessdate = 2007-03-01]

The reason NT is not a microkernel system is that nearly all of the subsystems providing system services, including the entire Executive, run in kernel mode (in the same address space as the microkernel itself), rather than in user-mode server processes, as would be the case with a microkernel design. This is an attribute NT shares with early versions of Mach, as well as all commercial systems based on Mach, and stems from the superior performance offered by using direct procedure calls in a single memory space, rather than IPC, for communication amongst subsystems.

In describing NT, the list of which subsystems do not run in kernel mode is far shorter than the list of those that do. The user-mode subsystems on NT include one or more emulation subsystems, each of which provides an operating system personality to applications, the Session Manager Subsystem (smss.exe), which starts the emulation subsystems during system startup and the Local Security Authority Subsystem Service (lsass.exe), which enforces security on the system. The subsystems are not written to a particular OS personality, but rather to the native NT API (or Native API).

The primary operating system personality on Windows is the Windows API, which is always present. The emulation subsystem which implements the Windows personality is called the Client/Server Runtime Subsystem (csrss.exe). On versions of NT prior to 4.0, this subsystem process also contained the window manager, graphics device interface and graphics device drivers. For performance reasons, however, in version 4.0 and later, these modules (which are often implemented in user mode even on monolithic systems, especially those designed without internal graphics support) run as a kernel-mode subsystem.cite web | title = MS Windows NT Kernel-mode User and GDI White Paper | publisher = Microsoft Corporation | date = 2007 | url = http://www.microsoft.com/technet/archive/ntwrkstn/evaluate/featfunc/kernelwp.mspx?mfr=true | accessdate = 2007-03-01]

As of 2007, one other operating system personality, UNIX, is offered as an optionally installed system component on certain versions of Windows Vista and Windows Server 2003 R2. The associated subsystem process is the Subsystem for UNIX-Based Applications (psxss.exe), which was formerly 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.cite web | last = Probert | first = Dave | title = Overview of Windows Architecture | work = Using Projects Based on Internal NT APIs to Teach OS Principles | publisher = Microsoft Research/Asia - Beijing | date = 2005 | url = http://research.microsoft.com/ur/asia/curriculum/download/BeijingPresentation.ppt | accessdate = 2007-03-01]

Applications that run on NT are written to one of the OS personalities, and not to the native NT API, which is largely undocumented (with the exception of routines used in device driver development). An OS personality is implemented via a set of user-mode DLLs (see Dynamic-link library), which are mapped into application processes' address spaces as required, together with an emulation subsystem server process (as described previously). Applications access system services by calling into the OS personality DLLs mapped into their address spaces, which in turn call into the NT run-time library (ntdll.dll), also mapped into the process address space. The NT run-time library services these requests by trapping into kernel mode to either call kernel-mode Executive routines or make Local Procedure Calls (LPCs) to the appropriate user-mode subsystem server processes, which in turn use the NT API to communicate with application processes, the kernel-mode subsystems and each other.cite web | last = Probert | first = Dave | title = Overview of Windows Architecture | work = Using Projects Based on Internal NT APIs to Teach OS Principles | publisher = Microsoft Research/Asia - Beijing | date = 2005 | url = http://research.microsoft.com/ur/asia/curriculum/download/BeijingPresentation.ppt | accessdate = 2007-03-01]

Plan 9 kernel

Description

One of the main design goals is to represent all resources as files and use a single communication protocol for both local and remote resources. The Plan 9 kernel uses both in-kernel (kernel mode) but more commonly user mode servers. Communication with user mode servers - fileservers - uses 9P. Kernel mode examples are device drivers and network interfaces (ethernet). Examples of user mode are networking (IP stack), environment, mailboxes, serial-console multiplexor, spam filter, CD interpreter, foreign filesystems and tapes, backup system, window system, and /proc. Because the interface to 'in-kernel' and 'user space' file servers is the same this also means that components can be moved (or reimplemented) inside and/or outside the kernel without making any changes to the system; for example there have been implementations of the ip stack and graphics systems of both kinds, and they can even coexists in the same running system thanks to the use of namespaces. [ [http://www.collyer.net/who/geoff/9book.pdf Why Plan 9 matters, Geoff Collyer ] (2006-09-12)] .

Classification

Due to the extensive use of user mode fileservers together with some in-kernel systems, this is a simpler candidate for inclusion as a hybrid kernel.

See also

*Exokernel
*Nanokernel
*Single address space operating system

Notes

References

* [http://www.realworldtech.com/forums/index.cfm?action=detail&id=66630&threadid=66595&roomid=11 Linus Torvalds on Real World Tech ]
* [http://www.realworldtech.com/forums/index.cfm?action=detail&id=66595&threadid=66595&roomid=11 Hybrid Kernel category criticised ]
* [http://www.sysinternals.com/Information/NativeApi.html Sysinternals article about the NT Native API]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Kernel (computing) — A kernel connects the application software to the hardware of a computer In computing, the kernel is the main component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware… …   Wikipedia

  • Kernel (computer science) — In computer science, the kernel is the central component of most computer operating systems (OS). Its responsibilities include managing the system s resources (the communication between hardware and software components). As a basic component of… …   Wikipedia

  • Monolithic kernel — Structure of monolithic kernel, microkernel and hybrid kernel based operating systems A monolithic kernel is an operating system architecture where the entire operating system is working in the kernel space and alone as supervisor mode. The… …   Wikipedia

  • Linux kernel — Linux Linux kernel 3.0.0 booting Company / developer Linus Torvalds and thousands …   Wikipedia

  • Loadable kernel module — In computing, a loadable kernel module (or LKM) is an object file that contains code to extend the running kernel, or so called base kernel, of an operating system. Most current Unix like systems, and Microsoft Windows, support loadable kernel… …   Wikipedia

  • Comparison of Microsoft Windows versions — Desktop market share for October 2011[1] Total Windows 90.13% Windows 7 40.5% Windows XP 38.45% Windows Vista 11.18% Non Windows 9.87% Microsoft Windows is the name of several families of computer software ope …   Wikipedia

  • XNU — Infobox Software name = XNU kernel caption = developer = Apple Inc. latest release version = latest release date = operating system = Darwin Mac OS X genre = Kernel kernel type = Hybrid license = Apple Public Source License 2.0 working state = In …   Wikipedia

  • Darwin (operating system) — Darwin Company / developer Apple Inc. Programmed in C, C++ OS family Unix …   Wikipedia

  • Microkernel — Structure of monolithic and microkernel based operating systems, respectively In computer science, a microkernel is the near minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms …   Wikipedia

  • Operating system — Operating systems …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”