Monolithic kernel vs. Microkernel

17
Monolithic kernel vs. Microkernel Benjamin Roch TU Wien [email protected]

description

The presentation has been made on the research paper written by Benjamin Roch and TU Wien.

Transcript of Monolithic kernel vs. Microkernel

Page 1: Monolithic kernel vs. Microkernel

Monolithic kernel vs. Microkernel

Benjamin RochTU Wien

[email protected]

Page 2: Monolithic kernel vs. Microkernel

ABSTRACT

• The author Benjamin Roch explains the two kernel architectures of operating systems: the monolithic kernel and the microkernel.

• A comparison of benefits and disadvantages of both architectures.

• Their examples where they are implemented.

Page 3: Monolithic kernel vs. Microkernel

INTRODUCTION

• The author refers to the fact that kernel is an important part of the operating system.

• Operating system itself consists of two parts: the kernel space (privileged mode) and the user space (unprivileged mode).

• There are two concepts of Kernels: Monolithic Kernel and Microkernel.

Page 4: Monolithic kernel vs. Microkernel

• In monolithic kernel the author tells us that it runs every basic system service in kernel space.

Page 5: Monolithic kernel vs. Microkernel

• It has three drawbacks, the kernel size, lack of extensibility, and bad maintainability.

• Whereas the concept for microkernel was to reduce the kernel to basic process communication and I/O control, and let the other system services reside in user space in form of normal processes (as so called servers).

• The author also examines the two generations of microkernels.

Page 6: Monolithic kernel vs. Microkernel
Page 7: Monolithic kernel vs. Microkernel

Comparison Between Basic Concepts Of The Two Approaches:

• The author Benjamin Roch introduces the basic concepts of operating systems, with their realizations in the two different architectures.

Page 8: Monolithic kernel vs. Microkernel

Inter Process Communication:

• The author examines three concepts of inter process communication (IPC). First concept is signals. It is widely used in UNIX systems.

• Signals are predefined numerical constants, e.g. KILL, STOP, etc., which are sent to the user, the operating system or another process.

• Second concept for communication is sockets. A process binds itself to one socket (or more), and “listens” to it i.e. from then on, it can receive messages from other processes.

Page 9: Monolithic kernel vs. Microkernel

• A system more powerful than sockets are message queues. Built as a FIFO queue, a message queue stores all incoming messages, sent by other processes and sorts them, based on their priority.

• Monolithic Kernels uses “signals” and “sockets”.

• The microkernel approach uses message queues.

Page 10: Monolithic kernel vs. Microkernel

Memory management• The author discusses about the memory management in

monolithic kernel and first and second generation microkernels.

• According to the author Monolithic Kernel implements everything needed for memory management in kernel space. This includes allocation strategies, virtual memory management, and page replacement algorithms, as shown in Figure 3.

• According to the author, first generation microkernels delegate the memory management to user space, controlling just the basic access rights as shown in Figure 4.

• Second generation microkernels have more refined strategies, e.g. L4. With L4 every process has got three memory management primitives: map, grant and flush.

Page 11: Monolithic kernel vs. Microkernel
Page 12: Monolithic kernel vs. Microkernel

Security And Stability

• Excluding system processes from kernel space is a way to make the system stable. Another argument for a true microkernel is its code size.

• So it is better to built a small kernel, than a big one. That way, stability issues are simpler to solve with that approach.

Page 13: Monolithic kernel vs. Microkernel

I/O Communication

• I/O communication works through interrupts, issued by or sent to the hardware. Monolithic kernels (and most of the first generation microkernels) run device drivers inside the kernel space. Hardware interrupts are directly handled by kernel processes.

• The microkernel approach doesn't handle I/O communication directly. It only ensures the communication. Requests from or to the hardware are redirected as messages by the microkernel to the servers in user space.

Page 14: Monolithic kernel vs. Microkernel

Extensibility And Portability

• Adding new features to a monolithic system means recompilation of the whole kernel, often including the whole driver infrastructure.

• In case of microkernel the services are isolated from each other through the message system.

Page 15: Monolithic kernel vs. Microkernel

Implementations

• The author just gives a short overview presenting implementations of monolithic kernels, microkernels and hybrids.

• Monolithic Kernel:- GNU/Linux• Hybrid Kernel:- Mach- Windows NT

Page 16: Monolithic kernel vs. Microkernel

• Microkernel:- QNX (QUICK UNIX)- L4

• CONCLUSION:• According to the author L4 and QNX have

proven that speed is not an argument against microkernels anymore.

• They are more easily maintainable than their monolithic counterparts. Microkernel systems can be easily extended and modified.

Page 17: Monolithic kernel vs. Microkernel

REFERENCES• [1] Frank Kolnick. The qnx 4 real-time operating system.Jul 2000.

• [2] Jochen Liedtke. On micro-kernel construction. 15th ACM Symposium on Operating System Principles (SOSP), December 1995.

• [3] Jochen Liedtke. micro-kernels must and can be small. 5th Workshop on Object-Orientation in Operating Systems (IWOOOS), October 1996.

• [4] Jochen Liedtke. Achieved ipc performance (still foundation for extensibility). 6th

Workshop on Hot Topics in Operating Systems (HotOS), May 1997.

• [5] William Stallings. Operating systems. internals and design principles. 3rd (international) edition.1998.

• [6] Lok Sun Nelson Tam. A comparison of l4 and k42 on powerpc. The university of New

South Wales, Dec 2003.