Chapter 4 Structure of Operating Systems Copyright © 2008.

Slides:



Advertisements
Similar presentations
Chapter 1 Introduction Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Introduction Abstract Views of an Operating System.
Advertisements

Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
Threads, SMP, and Microkernels
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Computer Systems/Operating Systems - Class 8
Chapter 5 Processes and Threads Copyright © 2008.
1: Operating Systems Overview
Operating System Structure. Announcements Make sure you are registered for CS 415 First CS 415 project is up –Initial design documents due next Friday,
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
Figure 1.1 Interaction between applications and the operating system.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
CS533 Concepts of OS Class 16 ExoKernel by Constantia Tryman.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Virtualization for Cloud Computing
Distributed Systems CS Virtualization- Overview Lecture 22, Dec 4, 2013 Mohammad Hammoud 1.
Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.
Tanenbaum 8.3 See references
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Virtualization Concepts Presented by: Mariano Diaz.
ICOM Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Chapter 2 Operating System Overview
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
Processes Introduction to Operating Systems: Module 3.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lecture 2: OS Structures (Chapter 2.7)
Full and Para Virtualization
Operating-System Structures
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
2.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition System Programs (p73) System programs provide a convenient environment.
Cloud Computing – UNIT - II. VIRTUALIZATION Virtualization Hiding the reality The mantra of smart computing is to intelligently hide the reality Binary->
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Introduction to Operating Systems Concepts
Computer System Structures
Computer System Structures
OPERATING SYSTEM CONCEPTS AND PRACTISE
Introduction to Virtualization
Virtualization.
Operating System Structures
Operating System Structure
Unit OS2: Operating System Principles
Chapter 2: Operating-System Structures
OS Virtualization.
Threads, SMP, and Microkernels
Basic Concepts Protection: Security:
Lecture 4- Threads, SMP, and Microkernels
B.Ramamurthy Chapter 2 : Appendix
Outline Chapter 2 (cont) OS Design OS structure
Operating Systems: A Modern Perspective, Chapter 3
Outline Operating System Organization Operating System Examples
System calls….. C-program->POSIX call
Operating Systems Structure
Presentation transcript:

Chapter 4 Structure of Operating Systems Copyright © 2008

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere2 Introduction Operation of an OS Structure of an Operating System Operating Systems with Monolithic Structure Layered Design of Operating Systems

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere3 Introduction (continued) Virtual Machine Operating Systems Kernel-Based Operating Systems Microkernel-Based Operating Systems Case Studies

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere4 Operation of an OS When a computer is switched on, boot procedure –analyzes its configuration—CPU type, memory size, I/O devices, and details of other hardware –Loads part of OS in memory, initializes data structures, and hands it control of computer system During operation of the computer, interrupts caused by: –An event: I/O completion; end of a time slice –System call made by a process (software interrupt) Interrupt servicing routine: –Performs context save –Activates event handler Scheduler selects a process for servicing

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere5 Operation of an OS (continued)

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere6 Operation of an OS (continued)

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere7 Structure of an Operating System Policies and Mechanisms Portability and Extensibility of Operating Systems

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere8 Policies and Mechanisms In determining how OS will perform a function, designer needs to think at two distinct levels: –Policy: Principle under which OS performs function Decides what should be done –Mechanism: Action needed to implement a policy Determines how to do it and actually does it Example: –Round-robin scheduling is a policy –Mechanisms: maintain queue of ready processes and dispatch a process

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere9 Portability and Extensibility of Operating Systems Porting: adapting software for use in a new computer system Portability: ease with which a software program can be ported –Inversely proportional to the porting effort Porting an OS: changing parts of its code that are architecture-dependent to work with new HW –Examples of architecture-dependent data and instructions in an OS: Interrupt vector, memory protection information, I/O instructions, etc.

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere10 Portability and Extensibility of Operating Systems (continued) Extensibility: ease with which new functionalities can be added to a software system –Extensibility of an OS is needed for two purposes: Incorporating new HW in a computer system –Typically new I/O devices or network adapters Providing new features for new user expectations –Early OSs did not provide either kind of extensibility –Modern OSs facilitate addition of a device driver They also provide a plug-and-play capability

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere11 Operating Systems with Monolithic Structure Early OSs had a monolithic structure –OS formed a single software layer between the user and the bare machine (hardware)

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere12 Operating Systems with Monolithic Structure (continued) Problems with the monolithic structure: –Sole OS layer had an interface with bare machine Architecture-dependent code spread throughout OS –Poor portability Made testing and debugging difficult –High costs of maintenance and enhancement Alternative ways to structure an OS: –Layered structure –Kernel-based structure –Microkernel-based OS structure

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere13 Layered Design of Operating Systems Semantic gap is reduced by: –Using a more capable machine –Simulating an extended machine in a lower layer

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere14 Layered Design of Operating Systems (continued) Routines of one layer must use only the facilities of the layer directly below it –Through its interfaces only

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere15 Example: Structure of the THE Multiprogramming System

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere16 Layered Design of Operating Systems (continued) Problems: –System operation slowed down by layered structure –Difficulties in developing a layered design Problem: ordering of layers that require each other’s services –Often solved by splitting a layer into two and putting other layers between the two halves –Stratification of OS functionalities Complex design Loss of execution efficiency Poor extensibility

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere17 Virtual Machine Operating Systems Different classes of users need different kinds of user service Virtual machine operating system (VM OS) creates several virtual machines –A virtual machine (VM) is a virtual resource –Each VM is allocated to one user, who can use any OS Guest OSs run on each VM VM OS runs in the real machine –schedules between guest OSs Distinction between privileged and user modes of CPU causes some difficulties in use of a VM OS

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere18 Example: Structure of VM/370

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere19 Virtual Machine Operating Systems (continued) Virtualization: mapping interfaces and resources of a VM into interfaces and resources of host machine –Full virtualization may weaken security –Paravirtualization replaces a nonvirtualizable instruction by easily virtualized instructions Code of a guest OS is modified to avoid use of nonvirtualizable instructions, done by: –Porting guest OS to operate under VM OS –Or, using dynamic binary translation for kernel of a guest OS

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere20 Virtual Machine Operating Systems (continued) VMs are employed for diverse purposes: –Workload consolidation –To provide security and reliability for applications that use the same host and the same OS –To test a modified OS on a server concurrently with production runs of that OS –To provide disaster management capabilities A VM is transferred from a server that has to shutdown to another server available on the network

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere21 Virtual Machine Operating Systems (continued) VMs are also used without a VM OS: –Virtual Machine Monitor (VMM) Also called a hypervisor E.g., VMware and XEN –Programming Language Virtual Machines Pascal in the 70s –Substantial performance penalty Java –Java virtual machine (JVM) for security and reliability –Performance penalty can be offset by implementing JVM in hardware

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere22 Kernel-Based Operating Systems Historical motivations for kernel-based OS structure were OS portability and convenience in design and coding of nonkernel routines –Mechanisms implemented in kernel, policies outside Kernel-based OSs have poor extensibility

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere23 Kernel-Based Operating Systems (continued)

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere24 Evolution of Kernel-Based Structure of Operating Systems Dynamically loadable kernel modules –Kernel designed as set of modules Modules interact through interfaces –Base kernel loaded when system is booted Other modules loaded when needed –Conserves memory –Used to implement device drivers and new system calls User-level device drivers –Ease of development, debugging, deployment and robustness –Performance is ensured through HW and SW means

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere25 Microkernel-Based Operating Systems The microkernel was developed in the early 1990s to overcome the problems concerning portability, extensibility, and reliability of kernels A microkernel is an essential core of OS code –Contains only a subset of the mechanisms typically included in a kernel –Supports only a small number of system calls, which are heavily tested and used –Less essential code exists outside the kernel

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere26 Microkernel-Based Operating Systems (continued) Microkernel does not include scheduler and memory handler They execute as servers

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere27 Microkernel-Based Operating Systems (continued) Considerable variation exists in the services included in a microkernel OSs using first-generation microkernels suffered up to 50% degradation in throughput –L4 microkernel is second-generation Made IPC more efficient by eliminating validity/rights checking by default, and by tuning microkernel to HW Only 5% degradation –Exokernel merely provides efficient multiplexing of hardware resources Distributed resource management Extremely fast

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere28 Case Studies Architecture of Unix The Kernel of Linux The Kernel of Solaris Architecture of Windows

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere29 Architecture of Unix Original Unix kernel was monolithic Kernel modules were added later

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere30 The Kernel of Linux Provides functionalities of Unix System V and BSD Compliant with the POSIX standard Monolithic kernel Individually loadable modules –A few kernel modules are loaded on boot Improvements in Linux 2.6 kernel: –Kernel is preemptible More responsive to users and application programs –Supports architectures that do not possess a MMU –Better scalability through improved model of threads

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere31 The Kernel of Solaris SunOS was based on BSD Unix Solaris is based on Unix SVR4 Since 1980s, Sun has focused on networking and distributed computing –Features have become standards RPC NFS Later, Sun focused on multiprocessor systems too –Multithreading the kernel, making it preemptible –Fast synchronization techniques in the kernel

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere32 The Kernel of Solaris (continued) Solaris 7 employs the kernel-design methodology of dynamically loadable kernel modules –Supports seven types of loadable modules: Scheduler classes File systems Loadable system calls Loaders for different formats of executable files Streams modules Bus controllers and device drivers Miscellaneous modules –Provides easy extensibility

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere33 Architecture of Windows HAL interfaces with the bare machine Environment subsystems support execution of programs written for MS DOS, Win 32 and OS/2

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere34 Summary Portability: ease with which the OS can be implemented on a computer having a different architecture Extensibility: ease with which its functionalities can be modified or enhanced to adapt it to a new computing environment An OS functionality typically contains a policy, and a few mechanisms Early OSs had a monolithic structure

Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere35 Summary (continued) Layered design used the principle of abstraction to control complexity of designing the OS The virtual machine operating system (VM OS) supported operation of several OSs on a computer simultaneously –Create a virtual machine for each user In a kernel-based design, kernel is the core of the OS, which invokes the nonkernel routines to implement operations on processes and resources A microkernel is the essential core of OS code –Policy modules implemented as server processes