2Outline Hybrid Approaches Introduction OS / Kernel Models Summary Monolithic Operating SystemsLayered SystemsTraditional Operating SystemsMicro-kernel Operating SystemsObservationsArchitectureClient Server ModelComparisonHybrid ApproachesSummary
3Introduction Why Operating Systems? OSes are a fundamental component of today’s computing systems.They offer a set of services for:Managing the hardware resources of devicesScheduling the execution of the applicationsSimplifying the development of applicationsOSes constitute a common sub-stratus for(almost) all the applications ….…. even distributed system middleware
4Introduction A little bit of history… Pre-OS software development (before 60s)Single task model (one application running)Developers had to:Program the system from booting the hardware up..Manage every aspect of the systemAssembly languageVery challengingModel:Machine + Program + Data = Application
5Introduction A little bit of history… The OS era (60s onwards) Evolution from single task to multi-taskingThere exist a common program that.. is loaded before any other program.. manages the hardware resources of the machine.. schedules the execution of user applications (one or more).. provides a higher level interface to the systemDevelopment of compilersModel:Application + OS +Machine = Execution
6Introduction What does an OS do? Manages the hardware resources MemoryCPUDisksProvides access to connected devices (drivers)PrintersCamerasScanners…Manages and Schedules applicationsSimple user applicationsServices
7Introduction Ehy… are we studying DS…? OSes are a fundamental component in DSThey provide the basic services for what concernsNetwork connectivityMachine resources managementConcurrency and IPCAccess to the file systemDistributed Systems are based on middlewareit is “just another” application for the OSit might be a fundamental part of the OS
8Introduction DS-wanted features of an OS Let us look into the architecture of a kernel suitable for a distributed system.A key principle of DS is openness and with this in mind let us examine the major kernel architectures:Monolithic kernelsLayered architecture-based kernelsMicro-kernelsCourse page has not yet been updated, will be by the end of the weekThis is were all the important information will reside - the latest lecture nodes, assignments, marking guides, sample exams, so check it regularly!
9Introduction DS-wanted features of an OS An open DS should make it possible to:Run only that system software on each computer that is necessary for its particular role in the system architecture:Avoiding redundant modules on capability-limited devices.Optimizing the behavior of specific components in different scenarios (server, client, ….)Allow the software (and the computer) implementing any particular service to be changed independent of other facilities.Allow for alternatives of the same services to be provided, when this is required to suit different users or applications.Introduce new services without harming the integrity of existing ones.Which features are required by an OS to expose these properties?
10Introduction A Guiding principle of OS design For example, an ideal scheduling system would provide mechanisms that enable a multimedia application such as videoconferencing to meet its real-time demands while coexisting with a non-real-time application such as web browsing.That is kernel would provide only the most basic mechanisms upon which the general resource management tasks at a node are carried out.Server modules would be dynamically loaded as required, to implement the required RM policies for the currently running applications.Separation of fixed resource management “mechanisms“ from resource management “policies”, which vary from application to application and service to service.
11OS / Kernel Models Main Design Principles The two key examples of kernel design approaches are:MonolithicMicrokernelKey difference: what does belong to the kernel?Three main models:Monolithic OSLayered OSMicrokernel-based OSThe first two can be considered monolithic.The chambers 20th century dictionary definition of monolithic is: a pillar, column, of a single stone: anything that resembling a monolithic, massiveness.
12OS / Kernel Models Monolithic Kernel vs Micro-Kernel S1 ....... S1 S2 Server:Kernel code and data:Dynamically loaded server program:
13OS / Kernel Models Operating System Models Serve as frameworks that unify capabilities, services and tasks to be performedThree approaches to building OS....Monolithic OSLayered OSMicrokernel based OSClient server OSSuitable for distributed systemsSimplicity, flexibility and high performance are crucial for OS.
14OS / Kernel Models Monolithic Kernels System Services Hardware Better application performanceHard to extendExample: MS-DOSApplicationProgramsApplicationProgramsUser ModeKernel ModeSystem ServicesHardware
16OS / Kernel Models Traditional Operating Systems OS User Mode ApplicationProgramsApplicationProgramsUser ModeKernel ModeOSOS Designer
17Micro-Kernel Operating Systems ObservationsMonolithic Operating Systems are:Massive: they perform all basic OS functions and take up in the order of megabytes of code and data.Undifferentiated: they are coded in a non-modular way (traditionally) although modern ones are much more layered.Intractable: altering any individual software component to adapt it to changing requirements is difficult.
18Micro-Kernel Operating Systems ObservationsNew trend in Operating System DesignUser ModeKernel ModeHardwareMicrokernel(very basic functions)ServersApplicationPrograms
19Micro-Kernel Operating Systems Compared to monolithic, microkernel design provides only the most basic abstractions,principally address space, threads and local IPC.All other system services are provided by servers that are dynamically loaded precisely those computers in the DS that require them.Clients access these system services using the kernel’s message based invocation mechanisms.
20Micro-Kernel Operating Systems Client Server ModelTiny OS kernel providing basic primitive (process, memory, IPC)Traditional services becomes subsystemsOS = Microkernel + User SubsystemsExamples: Mach, PARAS, and ChorusClientApplicationOS EmulatorsFileServerNetworkDisplayMicrokernelHardwareUserKernelSendReply
21Micro-Kernel Operating Systems ArchitectureMicro-Kernels are a layer between H/W and system systems. If performance is goal, rather than portability, then middleware may use facilities of the kernel directly.Micro-Kernels support middleware as subsystems.MiddlewareLanguagesupportsubsystemOS emulation....MicrokernelHardware
22Micro-Kernel Operating Systems Examples of Micro-KernelsMACH, CMUIt supports different OS emulators (Unix and OS/2).(Mach only) base for OS XPARAS, C-DACChorusQNX,(Windows NT)combination of layered and microkernel.... but massive code.
23Micro-Kernel Operating Systems ComparisonMicro-Kernel main advantages:Extensibility and its ability to enforce modularity behind memory protection boundariesA relative small kernel is more likely to free of bugs than one that is larger and complex.Monolithic OS main advantage:Relative efficiency with which operations can be invoked is high because even invocation to a separate user-level address space on the same node is more costly.
24Hybrid Approaches Which is the trend today? Many modern OS follow hybrid approach in OS structure. E.g., Windows NT.Pure microkernel OSs such as Chorus & Mach have changed over a time to allow servers to be loaded dynamically into the kernel address space or into a user-level address space.Some OSs such as SPIN used event-based model as a mechanism for interaction between modules grafted into the kernel address space.
25Summary What did we learn? Operating system provides various types of facilities to support middleware for distributed system:encapsulation,protection,concurrent accessmanagement of node resources.New OS designs provide flexibility in terms of separating mechanisms from policies.Car
26Additional References Tanenbaum, A.S, Modern Operating Systems, 2nd /3rd Editions, Prentice Hall,ISBN /Silbershatz, A., Galvin, P.B., Gagne, Modern Operating Systems, 8th Editions, Wiley,ISBN