MicrokernelsCS-502 (EMC) Fall Microkernels CS-502, Operating Systems Fall 2009 (EMC) (Slides include materials from Modern Operating Systems, 3 rd ed., by Andrew Tanenbaum and from Operating System Concepts, 7 th ed., by Silbershatz, Galvin, & Gagne)
MicrokernelsCS-502 (EMC) Fall Problem Operating systems are large They continue to evolve and grow … and are worked on by many people (Like all other programs) they contain bugs How to organize them so that bugs do not … bring down systems … impede normal operation … etc.
MicrokernelsCS-502 (EMC) Fall Operating System Structures Monolithic systems Formerly called “the big mess” Layered systems Microkernel based systems Client-server model Virtual Machines Exokernels Tanenbaum, §1.7 An epithet leveled at any big system by a speaker who does not understand & and made by someone s/he does not trust!
MicrokernelsCS-502 (EMC) Fall Operating System Structures Monolithic systems Formerly called “the big mess” Layered systems Microkernel based systems Client-server model Virtual Machines Exokernels A faulty driver or component can corrupt any data in kernel Arbitrary damage Stop system anywhere … etc.
MicrokernelsCS-502 (EMC) Fall Layered Systems Figure Structure of the THE operating system. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
MicrokernelsCS-502 (EMC) Fall Layered Systems Figure Structure of the THE operating system. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved Simple Elegant Incredibly naïve
MicrokernelsCS-502 (EMC) Fall Microkernel — An Organizing Principle Partition OS kernel into lots of small, independent pieces Put pieces in separate “processes” Isolated from each other except for message passing Keep kernel mode code to a minimum Concept emerged in 1970s MACH at CMU (Rick Rashid) NEXT computer Apple Mac-OS
MicrokernelsCS-502 (EMC) Fall Microkernel Example Figure Structure of the MINIX 3 system. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
MicrokernelsCS-502 (EMC) Fall Microkernel Example Figure Structure of the MINIX 3 system. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved Works great on a PDP-11 Memory addressable device registers Minimal interrupt handling, scheduling, IPC, etc No virtual memory management
MicrokernelsCS-502 (EMC) Fall Microkernel Issues Virtual memory management Needs to interact directly with scheduler Page faults, etc. Kernel support for user-space threads Fast I/O devices Quick, responsive interrupts Top- and bottom-halves for interrupt handlers Interprocess communication … On every context switch! Cannot afford context switches Remember Project #4
MicrokernelsCS-502 (EMC) Fall Microkernel Meets the Real World Windows NT Started life as a microkernel No longer “micro” No longer a kernel!
MicrokernelsCS-502 (EMC) Fall Figure The programming layers in Windows. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved One View of Windows Vista
MicrokernelsCS-502 (EMC) Fall Figure The components used to build NT subsystems. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved Another View of Windows Vista
MicrokernelsCS-502 (EMC) Fall Figure Windows kernel-mode organization. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved A Third View of Windows Vista
MicrokernelsCS-502 (EMC) Fall Lesson — Windows Vista There are a lot of layers of abstraction Many of the pieces are operate in separate address spaces An other isolation Most of Vista operates outside kernel mode
MicrokernelsCS-502 (EMC) Fall Microkernels A good idea in the 1970s and 80s Not up to demands of modern processors Virtual memory Heavy caching Not up to demand of modern operating systems
MicrokernelsCS-502 (EMC) Fall Microkernel Resurrection Mobile phones, PDAs, handheld devices Fixed or limited functionality No general purpose files No dynamic virtual memory Simple context switches All code already in memory Easy IPC
MicrokernelsCS-502 (EMC) Fall Questions or Discussion?