P1L2: Basics Flashcards
Name the design principle of a microkernel. Also, state the services that are part of the Kernel.
What functionality must be efficient?
Extreme separation of mechanism and policy.
- Only bare minimum of OS services
- <ins>Inter process-Communication</ins>
- <ins>Memory Management</ins>
- <ins>CPU-Scheduling</ins>
- <ins>Enough to represent an executing application, its address space & context (thread)</ins>
- Everything else runs in user space (e.g apps, Filesystem, device driver)
- Communication between services in user space and clients in user space ALL VIA message passing IPC => must work efficiently
Name the design principles of a Modular OS.
- Design:Similar to microkernel. Core only has basic functionality + knowledge how to load additional kernel modules
- <ins>Only Hardware services + Basic Higher-level services are part of the OS</ins>
- Extensibility & Customisable through kernel modules
- Kernel exposes Interface that every module has to implement!!
Name the design principles of a Monolithic OS.
- Design: No separation of policy and Mechanism
- All functionality already part of the OS’s Kernel
- No extensibility
Name advantages and disadvantages of Microkernels
Advantage:
- Flexibility (seperation of mech. and policy) -> adding service is just done in user space without affecting kernel
- Verifiable (smaller code size)
- Security (most services run in user-space, failure or insecurity does not affect kernel) - OS does not easily crash
- Easy to modify kernel (less code)
Disadvantage:
- Message passing IPC for all communication is inefficient (always user-system crossing) - Windows NT -> Windows XP
- Not very portable
Name advantages and disadvantages of Monolithic Kernels
Advantage:
- Compile time benefits because all functionality already part of Kernel
- Testable as a whole (no external code that can crash the system like for Kernel modules)
- Performance: Few user-kernel crossings vs. Microkernel
Disadvantage:
- Failure in OS service can bring down whole system (bluescreen of death)
- Too much code (maintenance bad)
- Not very extensible
Name advantages and disadvantages of Modular OS’s
Advantage:
- Flexibility - can add kerrnel module
- vs. Monolithic: smaller memory footprint -> better performance
- vs. Microkernel: less IPC
Disadvantage:
- Performance: Indirection via standart kernel module interface can add overhead
- Bug in Kernel module can crash system