Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

What is the role of a macro kernel?

Muhammad Ahmad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Overview

The kernel is the main component of any operating system. The function or role of a kernel includes memory management, device management, and accessing all computer resources. Based on the functions of the kernel, there are three main categories of OS kernel.

  • Monolithic kernel
  • Micro kernel
  • Hybrid kernel

Macro kernel

The macro kernel is a combination of both microMicro kernel is a kernel which runs services those are minimal for operating system performance like inter process communication (IPC) and basic scheduler etc & monolithic kernelIn monolithic kernel all operating system code is in single executable image. Operations like basic system service , memory management and I/O communication runs in kernel space., which means it falls in the category of the hybrid kernel. The category of the macro kernel is controversial due to the similarity between hybrid and ordinary monolithic kernels. Still, developers call it a hybrid kernel as it has qualities of both. Look at the figures below to better understand the macro kernel's function (we will call it the hybrid kernel).

The monolithic kernel runs all the services in kernel mode, and the entire kernel functionality is organized into a single block that is difficult to debug and maintain.

The micro kernel is slower because of additional messages passing overhead between all the services, and the functionality of the kernel is minimal.

Finally, the hybrid kernel in which the macro kernel falls. It covers almost all the disadvantages of previous kernel structures. Let's discuss its function in detail.

Function

The main purpose of this kernel is to have a similar kernel structure to the microkernel but to implement the monolithic structure at the same time. Following are the major functions of the macro kernel:

  • All operating system services work in kernel space which was not allowed in microkernel because there are no such benefits of keeping services in user space.
  • It gives the speed and simple design of a monolithic kernel to OS.
  • It gives the modularity and stability of a microkernel to OS.

Example

XNU is the kernel that Apple Inc. acquired and developed for use in the macOS, iOS, watchOS, and tvOS operating systems.

XNU is a macrokernel that includes monolithic and microkernel features, trying to get the most out of both technologies—including microkernel messaging capabilities. It makes the modularity of the operating system and most of the protected memory available to maintain the speed of the monolithic kernel for certain critical tasks.

RELATED TAGS

CONTRIBUTOR

Muhammad Ahmad
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring