Operating System Structure

Slides:



Advertisements
Similar presentations
Chap 2 System Structures.
Advertisements

Operating-System Structures
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
1/21/2008CSCI 315 Operating Systems Design1 Operating System Structures Notice: The slides for this lecture have been largely based on those accompanying.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
Common System Components
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.
Operating System Organization
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #29-1 Chapter 33: Virtual Machines Virtual Machine Structure Virtual Machine.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Stack Management Each process/thread has two stacks  Kernel stack  User stack Stack pointer changes when exiting/entering the kernel Q: Why is this necessary?
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure.
1 Pertemuan 3 Konsep Sistem Operasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
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.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
Processes Introduction to Operating Systems: Module 3.
CS 346 – Chapter 2 OS services –OS user interface –System calls –System programs How to make an OS –Implementation –Structure –Virtual machines Commitment.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Operating-System Structures
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
1 OPERATING SYSTEMS. 2 CONTENTS 1.What is an Operating System? 2.OS Functions 3.OS Services 4.Structure of OS 5.Evolution of OS.
1.2 Operating System Structure. 1. Monolithic System The earliest and most common OS architecture. Every component of OS contained in the kernel and can.
CSCE451/851 Introduction to Operating Systems
Chapter 3: Operating-System Structures
Introduction to Operating Systems Concepts
Computer System Structures
Computer System Structures
OPERATING SYSTEM CONCEPTS AND PRACTISE
Chapter 2: Operating-System Structures
Module 3: Operating-System Structures
Operating System Structures
Kernel Design & Implementation
Applied Operating System Concepts
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
Operating System Structure
Introduction to Operating System (OS)
Chapter 8: Main Memory.
Chapter 2: System Structures
Operating Systems Lecture 4.
Chapter 3: Operating-System Structures
Chapter 1 Introduction to Operating System Part 5
Chapter 33: Virtual Machines
Basic Concepts Protection: Security:
Threads Chapter 4.
Operating Systems Lecture 3.
Computer Security: Art and Science, 2nd Edition
Outline Chapter 2 (cont) OS Design OS structure
Operating Systems: A Modern Perspective, Chapter 3
Chapter 2: Operating-System Structures
OPERATING SYSTEMS STRUCTURES
System calls….. C-program->POSIX call
Operating System Concepts
Operating System Concepts
Chapter 33: Virtual Machines
Presentation transcript:

Operating System Structure It is now time for us to look inside of an O.S OS designs are Monolithic system Layered system Virtual machine ExoKernels Client server system

Monolithic Systems “The Big Mess” The structure is that, there is no structure. The O.S. is written as collection of procedures. Each of which can call any of the other ones whenever it needs to Each procedure in the system has a well defined interface in terms of parameters and results. To construct actual object program of O.S., one first compiles all individual procedures and then binds them all together into a single object. file using the system Linker. In terms of Information hiding there is nothing because each procedure is visible to every other procedure

Monolithic Systems The services provided by O.S. are requested by putting parameter in well defined places as in registers or on the stack and then executing a special trap instruction known as kernel call. This instruction Switches machine from user mode to kernel mode and transfers control to the O.S. The O.S. then examines the parameters of the call to determine which system call is to be carried out Basic structure of the O.S. can be divided into 3 parts: (a) A main program that invokes, the requested service procedures. (b) A set of service procedures that carry out system Calls. (c) A set of utility procedures that help the service procedure

Monolithic Systems In this model for each system Call there is one service procedures. That takes care of it. The utility procedures do things that are needed by several service procedures as fetching data from user program.

OS Structure - Simple Approach MS-DOS - provides a lot of functionality in little space. Not divided into modules, Interfaces and levels of functionality are not well separated

MS-DOS Structure

OS Structure - Simple Approach UNIX limited structuring has 2 separable parts Systems programs Kernel everything below system call interface and above physical hardware is kernel Is responsible for File system, CPU scheduling, memory management etc

Traditional UNIX System Structure

Layered Systems A first generalization of previous approach is to organize the O.S. as a hierarchy of layers Main Advantage of the layered approach is modularity Each layer uses functions and services of the lower level layers Simplifies debugging and system verification

Layered Systems Ex first layer can be debugged without any concern for the rest of the system, b’coz by definition it uses only the basic H/W to implement its functions Once first layer is debugged, its correct functioning can be assumed while the second layer is worked on, and so on If an error is found during the debugging of a particular layer, we know that the error must be on that layer, b’coz the layers below it are already debugged The design and implementation is simplified when the system is broken down into layers

Layered Systems The systems had 6 layers. A first generalization of previous approach is to organize the O.S. as a hierarchy of layers. The first system constructed was THE system (Technische Hogeschool Eindhoven) The systems had 6 layers.

Layered Systems Problems with the layered approach The appropriate definition of the various layers (because a layer can use only those layers that are at a lower level) Careful planning is necessary Ex device drivers for backing store must be lower than that of the memory management routines

Layered Systems Problems with the layered approach It is less efficient than other types Ex a user program to execute an I/O operation, it executes a system call that is trapped to the I/O layer, which calls the memory-mgmt layer, through to the CPU scheduling and finally to the hardware At each layer, the parameters may be modified, data may need to be passed etc Each layer adds overhead to the system call and system call takes more time compare to non-layered system

Layered Systems The layering concept was present in the MULTICS Systems OS/2 WIN NT Windows 95 Instead of layers, MULTICS was organized as a series of concentric rings with inner being more privileged than outer ones. When a procedure in an outer ring wanted to call a procedure in an Inner ring, it had to make the equivalent of a systems call whose parameters were checked for validity before allowing the call to proceed.

Virtual Machines Timesharing system Multiprogramming Developed by IBM originally called CP/CMS and later renamed as VM1370, which’ based on observations Timesharing system Multiprogramming An extended machine with a more convenient interface than the bare hardware. “Essence of VM/370 is to completely separate these two function”

Virtual Machines The heart of the systems known as virtual machine monitor runs on the bare hardware and does multiprogramming providing several virtual machine to the next layer up a shown in Fig.

Virtual Machines Virtual machines are exact copies of bare hardware including kernel users mode I. interrupts and everything else the real machine has. Since each virtual machine is identical to the true hardware, each one can run any O.S. that will run directly on bare hardware. Different virtual machine runs different OS. Some run on OS/360 while other run on a single user interactive system called CMS (conversational Monitor system).

Virtual Machines VM OS for IBM is Virtual Machine EX By using CPU scheduling and Virtual Memory techniques, an OS can create an illusion of multiple processes Each executing its own (virtual) processor with its own (virtual) memory. Virtual Machine provides an interface that is identical to the Hardware. Each process is provided with a virtual copy of the underlying computer The resources of the physical computer are shared to create the virtual machines CPU, I/O, Memory, disks are shared & virtual copies are created.

Virtual Machines (Cont) Each VM is isolated from all other VM so there are no security problems.

VM Architecture Users are given their own VM They can run any of the OS or S/W packages on these machines

Virtual Machines Examples: Running MS-DOS on a Pentium machine (system compatibility problems are solved) Running Windows, Linux and other OS on the same machine. A program written in Java receives services from the Java Runtime Environment (JRE) software by issuing commands to, and receiving the expected results from, the Java software. By providing these services to the program, the Java software is acting as a "virtual machine", taking the place of the operating system or hardware for which the program would ordinarily be tailored. .NET Runtime uses CLR

Exo-Kernels With VM/370 each user gets an exact copy of the actual computer With virtual 8086 mode on Pentium, each user process gets an exact copy of a different computer MIT have built a system that gives each user a clone of the actual computer, but with a subset of the resources One VM might get disk blocks 0 to 1023, the next might get blocks 1024 to 2047, and so on. At the bottom layer, running in kernel mode, is a program called exokernel. Its job is to allocate resources to virtual Machines and then check attempts to use them to make sure no machine is trying to use somebody else’s resources.

Exokernels Each user level virtual machine can run its own OS as on VM/370 and the Pentium virtual 8086s, except that each one is restricted to using only the resources it has asked for and been allocated. The advantage of exokernel scheme is that it saves a layer of mappings. (remapping not required) In other VM monitor must maintain tables to remap disk addresses (all other resources) The exokernel keeps track of which virtual machine has been assigned which resources. Separating multiprogramming from the user operating system

Client-Server System A usual approach is to implement most of O.S. function in user processes. To request a service, a “user process or client process” sends a request to a server process.

Client-Server System All the kernel does is to handle the communication between clients and servers. All servers run as user mode processes and not in kernel mode, they don’t have direct access to the hardware. As a consequence if a bug in the file server is triggered the file service may crash but this won’t bring the whole machine down.

Client-Server System Another advantage of the client-server model is its adaptability to use in distributed system. If a client communicates with a server by sending it messages. The client needn’t know whether messages is handled locally in its own machine or whether it was sent across network to a server on a remote machine