Operating System Kernel Design: Anthony Mendez
Operating System Kernel Design: Anthony Mendez
Anthony Mendez
Fight features, the only way to make software secure, reliable, and fast is to make it small.
What is a kernel? A kernel is one of the lowest abstractions between hardware and software. Provides:
Process Management Memory Management Device Management Various Abstractions
Various Flavors:
Monolithic Micro Hybrid Other
Monolithic Kernels A monolithic kernel runs entirely in supervisor mode. Possibly runs modules to allow runtime expandability. Due to its simplicity, it is very fast on slow hardware which has added to its popularity. Due to simple design it is not as fault tolerant as other designs.
3
Monolithic Kernels
Monolithic Kernels
Pros
Simple to design and implement. Simplicity provides speed on simple hardware. Can be expanded using module systems. Time tested and design well known
Cons Module system may not provide runtime loading and unloading. Become harder to maintain as code base size increases. Lower fault tolerance, if core module or section of the kernel fails, the whole thing does.
Monolithic Kernels
Examples:
Linux (Free GNU GPL) Syllable (Free GNU GPL) BSD (Free BSD License) KolibriOS (Free GNU GPL) Solaris (Partially Free) AIX (Non-Free) DOS (Non-Free) Mac OS Classic (Non-Free) Windows 9x (Non-Free) OpenVMS (Non-Free) SkyOS (Non-Free)
6
Microkernels
Minimalistic, only provides mechanisms to implement services and abstractions. Individual services and abstractions are distinct and separate. Cohesive and complete environment created using message passing between the various servers.
Microkernels
Microkernels
Pros
High Reliability. If one server breaks, nothing else has to go down and it can be restarted. Highly Secure. Messages can be checked across multiple servers to prevent bad calls. Easy Maintenance. Code very compartmentalized, problems easy found and diagnosed. Easy to expand and develop for. Write a new server
Cons
Message passing historically is much slower then monolithic kernel's all-in-one approach. When unoptimized, can take more memory then monolithic kernels. Generally disliked in industry. Lack of widespread use makes companies wary.
Microkernels
Examples: AmigaOS (Non-Free) QNX (Mixed Free/Non-Free) Real Time OS Symbian (Non-Free) Cell Phone OS Minix (Free BSD License) Educational GNU Hurd (Free GNU GPL) GNU Project's Original Kernel Extreme Reliability KeyOS ErOS CapROS Coyotos
10
Hybrid Kernels
More similar to monolithic kernel but has some advantages of the microkernel without the performance overhead. Combines well known and often implemented monolithic kernel ideas with new microkernel ideas. More appealing to businesses. Operating systems that do implement this vary from mostly monolithic to barely not micro.
11
Hybrid Kernels
Anthony Mendez
Fight features, the only way to make software secure, reliable, and fast is to make it small.
Hybrid Kernels
Pros
Easy to implement on already existing code bases. Can be implemented on nontime crucial tasks to increase security without decreasing performance. Demonstrating to industry that alternative designs are usable and can be proven to work.
Cons
Depending on complexity/size of original code base, may be hard to switch. Difficult to decided how hybrid to make the kernel. Difficult to decide what to make a server and what to keep in the larger section of the kernel.
13
Hybrid Kernels
Examples: BeOS (Non-Free) Haiku (Free MIT License) Dragonfly BSD (Free BSD License) Mac OS X (Free / Non-Free) Netware (Non-Free) OS/2 Warp (Non-Free) Plan 9 / Inferno (Free / Non-Free) Windows NT Vista (Non-Free) ReactOS (Free GNU GPL) LynxOS (Non-Free)
Dynamically Extendable Real Time
14
Exokernels
Provides the most minimal interface to hardware. Only provides simple abstractions like multitasking and memory management. The rest of the abstraction is handled through various software libaries.
15
Exokernels
Pros
Remarkably small kernel and compiled size. Due to the lack of general abstraction, very fast because everything is so deeply optimized. Design well suited to real time systems.
Cons
Much more work per application. All applications must preform tasks that are normally handled by the kernel. Depending the qualities of the libraries, systems vary wildly in stability. Still very experimental and theoretical.
16
17