Advanced Operating Systems (CS 202) OS Evolution and Organization Jan, 6, 2016.

Slides:



Advertisements
Similar presentations
Operating Systems: History 1 History Pre 1950 : the very first electronic computers –valves and relays –no OS –single program with dedicated function Pre.
Advertisements

Operating System.
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Introduction CSCI 444/544 Operating Systems Fall 2008.
CS 345 Computer System Overview
Prof. B. I. Khodanpur HOD – Dept. of CSE R. V. College of Engineering
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
Winter 2005 CMPE 151: Network Administration Lecture 2.
Operating Systems CS451 Brian Bershad
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
OS Spring’03 Introduction Operating Systems Spring 2003.
University of Pennsylvania 9/7/00CSE 3801 CSE 380 Introduction to Operating Systems Insup Lee Fall 00.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
A. Frank - P. Weisberg Operating Systems Evolution of Operating Systems.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
OS Winter’03 Introduction (cont.) -History Operating Systems.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Operating Systems ECE344 A brief history of OS Ding Yuan ECE Dept., University of Toronto
Systems Software Operating Systems.
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?
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Operating System Overview Dr. Sunny Jeong & Mr. M.H. Park Operating Systems: Internals and Design Principles, 6/E William Stallings.
1 COMPSCI 110 Operating Systems Who - Introductions How - Policies and Administrative Details Why - Objectives and Expectations What - Our Topic: Operating.
Operating System. Architecture of Computer System Hardware Operating System (OS) Programming Language (e.g. PASCAL) Application Programs (e.g. WORD, EXCEL)
part I, , Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
 What is OS? What is OS?  What OS does? What OS does?  Structure of Operating System: Structure of Operating System:  Evolution of OS Evolution of.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 1 Introduction Read:
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
CS 153 Design of Operating Systems Spring 2015 Lecture 2: Intro and Architectural Support for Operating Systems.
Systems Software Operating Systems. What is software? Software is the term that we use for all the programs and data that we use with a computer system.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
OPERATING SYSTEMS UNIT – I R.SOUJANYA IT Dept. UNIT I Computer System and Operating System Overview Chapter 1: IntroductionIntroduction Overview of Computer.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Just Enough Unix, Chapter 1
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles Introduction Emery Berger and Mark Corner University.
1 Operating Systems: Principles and Practice Cpr E 308.
CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
An operating system is the software that makes everything in the computer work together smoothly and efficiently. What is an Operating System?
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
CIS250 OPERATING SYSTEMS Chapter One Introduction.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Operating Systems.
Agenda UNX122_022_w1_p3 Overview of UNIX
Midterm OPERATING SYSTEM. Objectives At the end of the course, the student should be able to: Define the operating system; Demonstrate the abstract view.
OPS224 Operating Systems - Unix Instructor: MURRAY SAUL.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Overview of today’s lecture Major components of an operating system Structure and internal architecture of an operating system Monolithic Vs Micro-kernels.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 0: Historical Overview.
Introduction to Operating Systems Concepts
Operating System.
Evolution of Operating Systems
Operating System Structure
Introduction to Operating System (OS)
Overview Introduction to Operating Systems
חוברת שקפים להרצאות של ד"ר יאיר ויסמן מבוססת על אתר האינטרנט:
CS 153 Design of Operating Systems Winter 18
What is an Operating System?
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Operating Systems: History
CS 153 Design of Operating Systems Winter 19
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
Advanced Operating Systems (CS 202) Operating System Structure
Lecture Topics: 11/1 Hand back midterms
Introduction and History
Presentation transcript:

Advanced Operating Systems (CS 202) OS Evolution and Organization Jan, 6, 2016

Coming up Reading for next week: – Finish unix paper – For Monday, Spin and Exokernel – Wednesday, L4 – Links on class website Programming assignment released Monday 2

Today Evolution of Operating Systems (and computers!) – Some slides modified from Silberschatz and Gavin, as well as Margo Seltzer Operating Systems models 3

Dawn of computing Pre 1950 : the very first electronic computers –valves and relays –single program with dedicated function Pre 1960 : stored program valve machines –single job at a time; OS is a program loader 4 programCPUprinter

Phase 0 of OS Evolution (40s to 1955) No OS – Computers are exotic, expensive, large, slow experimental equipment – Program in machine language and using plugboards – User sits at console: no overlap between computation, I/O, user thinking, etc.. Program manually via card decks Goal: number crunching for missile computations 5

OS progress in this period People developed libraries of routines that are common – Including those to talk to I/O devices – Punch cards (enabling copying/exchange of these libraries) a big advance! – Pre-cursor to OS 6

Phase 1: Computers expensive; people cheap – Use computers efficiently – move people away from machine – OS becomes a batch monitor Loads a job, runs it, then moves on to next If a program fails, OS records memory contents somewhere More efficient use of hardware but increasingly difficult to debug 7

8 Batch systems on mainframe computers – collections of jobs made up into a batch – example: IBM 1401/7094 card decks spooled onto magnetic tape and from tape to printer – example: English Electric Leo KDF9 32K 48-bit words, 2  sec cycle time punched paper-tape input ‘walk-up’ service or spooling via mag tape

Advances in technology in this stage Data channels and interrupts – Allow overlap of I/O and computing – Buffering and interrupt handling done by OS – Spool (buffer) jobs onto “high speed” drums 9

Phase 1, problems Utilization is low (one job at a time) No protection between jobs – But one job at a time, so? Short jobs wait behind long jobs Coordinating concurrent activities 10

Advances in OS in this period Hardware provided memory support (protection and relocation) Multiprogramming (not to be confused with time sharing) Scheduling: let short jobs run first OS must manage interactions between concurrent things OS/360 from IBM first OS designed to run on a family of machines from small to large 11

Some important projects Atlas computer/OS from Manchester U. (late 50s/early 60s) – First recognizable OS – Separate address space for kernel – Early virtual memory THE Multiprogramming system (early 60s) – Introduced semaphores – Attempt at proving systems correct; interesting software engineering insights 12

Not all is smooth Operating systems didn’t really work OS/360 introduced in 1963 but did not really work until 1968 – Reported on in mythical man month Extremely complicated systems – 5-7 years development time typical – Written in assembly, with no structured programming – Birth of software engineering? 13

Phase 2: 1970s Computers and people are expensive – Help people be more productive – Interactive time sharing: let many people use the same machine at the same time – Emergence of minicomputers Terminals are cheap – Keep data online on fancy file systems – Attempt to provide reasonable response times (Avoid thrashing) 14

Important advances and systems Compatible Time-Sharing System (CTSS) – MIT project (demonstrated in 1961) – One of the first time sharing systems – Corbato won Turing award in 1990 – Pioneered much of the work in scheduling – Motivated MULTICS 15

MULTICS Jointly developed by MIT, Bell Labs and GE Envisioned one main computer to support everyone – People use computing like a utility service just like electricity – sound familiar? Many many fundamental ideas: protection rings, hierarchical file systems, devices as files, … Building it was more difficult than expected Technology caught up 16

Unix appears Ken Thompson, who worked on MULTICS, wanted to use an old PDP-7 laying around in Bell labs He and Dennis Richie built a system designed by programmers for programmers Originally in assembly. Rewritten in C – If you notice for the paper, they are defending this decision – However, this is a new and important advance: portable operating systems! Shared code with everyone (particularly universities) 17

Unix (cont’d) Berkeley added support for virtual memory for the VAX DARPA selected Unix as its networking platform in arpanet Unix became commercial – …which eventually lead Linus Torvald to develop Linux 18

Some important ideas in Unix OS written in a high level language OS portable across hardware platforms – Computing is no longer a pipe stove/vertical system Pipes Mountable file systems Many more (we’ll talk about unix later) 19

Phase 3: 1980s Computers are cheap, people expensive – Put a computer in each terminal – CP/M from DEC first personal computer OS (for 8080/85) processors – IBM needed software for their PCs, but CP/M was behind schedule – Approached Bill Gates to see if he can build one – Gates approached Seattle computer products, bought 86- DOS and created MS-DOS – Goal: finish quickly and run existing CP/M software – OS becomes subroutine library and command executive 20

New technologies in Phase 3 Personal workstations – The PERQ – Xerox Alto – SUN workstation Personal computers – Apple II – IBM PC – Macintosh 21

New technologies (cont’d) Business applications! – Word processors – Spreadsheets – Databases Marketplace is broken up horizontally – Hardware – OS – Applications 22

New advances in OS PC OS was a regression for OS – Stepped back to primitive phase 1 style OS leaving the cool developments that occurred in phase 2 Academia was still active, and some developments still occurred in mainframe and workstation space 23

Phase 4: Networked systems 1990s to now? Its all about connectivity We want to share data not hardware Networked applications drive everything – Web, , messaging, social networks, … Protection and multiprogramming less important for personal machines – But more important for servers 24

Phase 4, continued Market place continued horizontal stratification – ISPs (service between OS and applications) – Information is a commodity – Advertising a new marketplace New network based architectures – Clusters – Grids – Distributed operating systems – Cloud computing (or is that phase 5?) 25

New problems Large scale – Google file system, mapreduce, … Concurrency at large scale – ACID (Atomicity, Consistency, Isolation and Durability) in Internet Scale systems Very large delays Partitioning Security and Privacy 26

Phase 5 New generation? Computing evolving beyond networked systems – But what is it? – …and what problems will it bring? 27

OS STRUCTURE 28

OS Structure What does OS structure refer to? The way the OS software is organized with respect to the applications it serves and the hardware that it manages so that it can meet its goals 29

Lets start with the basic idea All OS’s use “Controlled Direct Execution” – User programs when scheduled run directly on the CPU – They don’t have to ask permission to use memory – its virtualized or partitioned somehow (with hardware help) OS is a sleeping beauty – Gets woken up by events – Enough for time sharing? 30

31 Events An event is an “unnatural” change in control flow – Events immediately stop current execution – Changes mode, context (machine state), or both The kernel defines a handler for each event type – Event handlers typically execute in kernel mode – The specific types of events are defined by the machine Once the system is booted, all entry to the kernel occurs as the result of an event

32 Categorizing Events Two kinds of events: synchronous and asynchronous Sync events are caused by executing instructions – Example? Async events are caused by an external event – Example? CPU ticks Synchronous events Asynchronous events

33

OS Structure We saw that the OS arbitrates and abstracts the hardware and provides services to applications – What are example services? – Process and thread management; memory management; IPC; file systems; access to devices including network How should it be structured? – Why does it matter? What are the goals? 34

OS structure choices OS has to run in privileged mode sometimes – But does everything run in privileged mode? If the application could benefit from custom operation, can we provide that? – Does that come at the cost of performance or safety? Can the OS adapt operation to available resources? 35

Why is the structure of an OS important? Protection – User from user and system from user Performance – Does the structure facilitate good performance? Flexibility/Extensibility – Can we adapt the OS to the application Scalability – Performance goes up with more resources Agility – Adapt to application needs and resources Responsiveness – How quickly it reacts to external events Can it meet these requirements? 36

Can the goals be achieved together? How do modern operating systems meet these goals? – They can’t (perfectly) meet all – Some conflict with each other – For example, performance and protection Lets look at the major models 37

Monolithic Kernel 38 Hardware, managed by OS OS Services and Device drivers Applications

DOS Like Structure 39 Hardware, managed by OS OS Services and Device drivers Applications What is the difference?

DOS vs. Monolithic Loss of protection in DOS-like structure unacceptable for general purpose OS Monolithic structure provides protection – Reduces performance loss by consolidation What causes performance loss? – But prevents opportunity of customizing the OS Is that important? YES! 40

Extensibility/customization Applications are very different; consider video game vs. a number crunching application Lets consider a concrete application – Page fault occurs – OS action? Find a free frame (page replacement policy) Update page table Resume process Providing extensibility was a big area of research 41

Micro-kernel 42 Hardware, managed by OS Micro-kernel Applications File System Memory manager CPU scheduler

Discussion of microkernels Performance loss! – A lot of boarder crossings – Separate address spaces – expensive Explicit and implicit costs (memory hierarchy) – Lets compare a system call for monolithic vs. micro-kernel What are the advantages? 43

Next time: Extensible OS structures DOS-like structure: – good performance and extensibility – Bad protection Monolithic kernels: – Good performance and protection – Bad extensibility Microkernels – Good protection and extensibility – Bad performance! 44