CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:

Slides:



Advertisements
Similar presentations
Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
Advertisements

Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Chap 2 System Structures.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
3.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 3: Operating-System Structures System Components Operating System.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Chapter 2: Operating-System.
Chapter 2: Operating-System Structures
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Operating Systems. What is an Operating System? A layer of software between users/applications and the hardware. The first program loaded onto a computer.
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.
Common System Components
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
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.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
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.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Kernel, processes and threads Windows and Linux. Windows Architecture Operating system design Modified microkernel Layered Components HAL Interacts with.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
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.
3.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 3: Operating-System Structures System Components Operating System.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
3.1 Operating System Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual.
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.
Operating Systems Structure what is the organizational principle?
CS 346 – Chapter 2 OS services –OS user interface –System calls –System programs How to make an OS –Implementation –Structure –Virtual machines Commitment.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Agenda OS design and implementation Simple structure
1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lecture 2: OS Structures (Chapter 2.7)
Examples of Operating Systems.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
2.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition System Programs (p73) System programs provide a convenient environment.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Introduction to Operating Systems Concepts
Computer System Structures
Computer System Structures
OPERATING SYSTEM CONCEPTS AND PRACTISE
OS Structures Simple Layered Microkernel Modular
Operating System Structures
Lecture 4: Operating System Structures
Operating System Structure
KERNEL ARCHITECTURE.
Chapter 2: Operating-System Structures
Chapter 2: System Structures
Mid Term review CSC345.
Chapter 1 Introduction to Operating System Part 5
Operating Systems Lecture 3.
Outline Chapter 2 (cont) OS Design OS structure
Operating Systems: A Modern Perspective, Chapter 3
Operating System Introduction.
Outline Operating System Organization Operating System Examples
System calls….. C-program->POSIX call
Operating Systems Structure
Operating Systems Structure
Presentation transcript:

CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL: Operating System Design and Implementation Topics OS structures Some of the following slides are adapted from Matt Welsh, Harvard Univ.

2 OS design and implementation There is no ultimate OS that would satisfy all requirements: Trade-offs have to made at each level and for all aspects. Important principle to separate Policy: What will be done? Mechanism: How to do it? Mechanisms determine how to do something, policies decide what will be done The separation of policy from mechanism is a very important principle, it allows maximum flexibility if policy decisions are to be changed later

3 Operating Systems Structure (What is the organizational Principle?)‏ Simple Only one or two levels of code Layered Lower levels independent of upper levels Microkernel OS built from many user-level processes Modular Core kernel with Dynamically loadable modules

4 Simple Structure MS-DOS – written to provide the most functionality in the least space Not divided into modules Interfaces and levels of functionality not well separated

5 Monolithic Kernels Most common OS kernel design (used in UNIX and Linux)‏ Kernel code is privileged and lives in its own address space User applications are unprivileged and live in their own separate address spaces All kernel functions loaded into memory as one large, messy program Pros and cons??? User application System call User application Kernel Memory management Disk I/O Process management Device drivers Filesystem TCP/IP stack Accounting CPU support Protection boundary

6 Monolithic Kernels Most common OS kernel design Kernel code is privileged and lives in its own address space User applications are unprivileged and live in their own separate address spaces All kernel functions loaded into memory as one large, messy program Pros and cons Pro: Overhead of module interactions within the kernel is low (function call)‏ Pro: Kernel modules can directly share memory Con: Very complicated and difficult to organize Con: A bug in any part of the kernel can crash the whole system! User application System call User application Kernel Memory management Disk I/O Process management Device drivers Filesystem TCP/IP stack Accounting CPU support Protection boundary

7 Layered kernels Operating system is divided many layers (levels) Each built on top of lower layers Bottom layer (layer 0) is hardware Highest layer (layer N) is the user interface Each layer uses functions (operations) and services of only lower-level layers Advantage: modularity  Easier debugging/Maintenance Not always possible: Does process scheduler lie above or below virtual memory layer? Need to reschedule processor while waiting for paging May need to page in information about tasks Important: Machine-dependent vs independent layers Easier migration between platforms Easier evolution of hardware platform

8 Microkernels Use a very small, minimal kernel, and implement all other functionality as user level “servers” Kernel only knows how to perform lowest-level hardware operations Device drivers, filesystems, virtual memory, etc. all implemented on top Use inter-process procedure call (IPC) to communicate between applications and servers Pros and Cons??? User application Protection boundary Microkernel Memory management Disk I/O Process management Filesystem TCP/IP stack Accounting CPU support Device drivers Inter-process procedure call

9 Microkernels - 2 Pros and cons Pro: Kernel is small and simple, servers are protected from each other Con: Overhead of invoking servers may be very high e.g., A user process accessing a file may require inter-process communication through 2 or 3 servers! Microkernels today Lots of research in late 80's and early 90's Windows NT uses “modified microkernel”: Monolithic kernel for most things, OS APIs (DOS, Win3.1, Win32, POSIX) implemented as user-level services Mac OS X has reincarnated the microkernel architecture as well: Gnarly hybrid of Mach (microkernel) and FreeBSD (monolithic)

10 Modules-based Structure Most modern operating systems implement modules Uses object-oriented approach Each core component is separate Each talks to the others over known interfaces Each is loadable as needed within the kernel Overall, similar to layers but more flexible