Why Hybrid?

“Most hybrid kernels start as monolithic kernels and begin moving components into user land, primarily as security to support 3rd-party components and drivers which may be malicious or buggy.

An example of a hybrid kernel design may keep the VFS and bus controllers inside the kernel, but have the file system drivers and storage drivers as user mode programs. The advantage of this system that is you keep the performance and design principles of a monolithic kernel, but you allow untrusted users to load untrusted code for accessing their own storage devices.” (src)

XNU is a hybrid kernel, containing features of both monolithic kernels and microkernels, attempting to make the best use of both technologies, such as the message passing ability of microkernels enabling greater modularity and larger portions of the OS to benefit from memory protection, and retaining the speed of monolithic kernels for some critical tasks.

As of 2021, XNU runs on ARM64 and x86-64 processors, both one processor and symmetric multiprocessing (SMP) models. PowerPC support was removed as of the version in Mac OS X 10.6. Support for IA-32 was removed as of the version in Mac OS X 10.7; support for 32-bit ARM was removed as of the version in iOS 11.”

XNU seams to be around (?) since Mac OS X Snow Leopard, v10.6, (Darwin version 10) (August 28, 2009)

“Mach

The basis of the XNU kernel is a heavily modified (hybrid) Open Software Foundation Mach kernel (OSFMK) 7.3.[2] As such, it is able to run the core of an operating system as separated processes, which allows a great flexibility (it could run several operating systems in parallel above the Mach core), but this often reduces performance because of time-consuming kernel/user mode context switches and overhead stemming from mapping or copying messages between the address spaces of the kernel and that of the service daemons. With macOS, the designers have attempted to streamline some tasks and thus BSD functions were built into the core with Mach. The result is a heavily modified (hybrid) OSFMK 7.3 kernel, Apple licensed OSFMK 7.3, which is a microkernel,[3] from the OSF. OSFMK 7.3 includes applicable code from the University of Utah Mach 4 kernel and from the many Mach 3.0 variants forked from the original Carnegie Mellon University Mach 3.0 microkernel.”

“BSD

The Berkeley Software Distribution (BSD) part of the kernel provides the Portable Operating System Interface (POSIX) application programming interface (API, BSD system calls), the Unix process model atop Mach tasks, basic security policies, user and group ids, permissions, the network protocol stack (protocols), the virtual file system code (including a file system independent journaling layer), several local file systems such as Hierarchical File System (HFS, HFS Plus (HFS+)) and Apple File System (APFS), the Network File System (NFS) client and server, cryptographic framework, UNIX System V inter-process communication (IPC), audit subsystem, mandatory access control, and some of the locking primitives.[4] The BSD code present in XNU came from the FreeBSD kernel. Although much of it has been significantly modified, code sharing still occurs between Apple and the FreeBSD Project as of 2009.[5]”

src: https://en.wikipedia.org/wiki/XNU

other examples for OS with hybrid (micro/monolithic) kernel:

https://wiki.osdev.org/Hybrid_Kernel

examples for monolithic kernel OS:

examples for OS with micro kernel:

Nanokernel

The term nanokernel or picokernel historically referred to:

  • A kernel where the total amount of kernel code, i.e. code executing in the privileged mode of the hardware, is very small.

https://en.wikipedia.org/wiki/Microkernel#Nanokernel

Links:

https://www.guru99.com/microkernel-in-operating-systems.html

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin