D u k e S y s t e m s CPS 210 Introduction to Operating Systems Fall 2012 Jeff Chase Duke University.

Slides:



Advertisements
Similar presentations
Threads, SMP, and Microkernels
Advertisements

Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Operating Systems CS451 Brian Bershad
Operating Systems Concepts Professor Rick Han Department of Computer Science University of Colorado at Boulder.
1 Chapter 4 Threads Threads: Resource ownership and execution.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
Siemens’ 4 View Model (props to My-An Nguyen for giving me her 344 notes on which this lecture is based)
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
CS 470/570:Introduction to Parallel and Distributed Computing.
Computer Science 102 Data Structures and Algorithms V Fall 2009 Lecture 1: administrative details Professor: Evan Korth New York University 1.
Programming mobile devices Part II Programming Symbian devices with Symbian C++
Cloud Computing Why is it called the cloud?.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Computer System Architectures Computer System Software
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Protection and the Kernel: Mode, Space, and Context.
Winter 2015 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University Introduction and Overview.
CS 162 Discussion Section Week 1 (9/9 – 9/13) 1. Who am I? Kevin Klues Office Hours:
D u k e S y s t e m s CPS 210 Software Architecture and OS Platforms Jeff Chase Duke University
D u k e S y s t e m s CPS Introduction to Operating Systems Fall 2013 Jeff Chase Duke University.
Programs and Processes Jeff Chase Duke University.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Threads and Processes.
Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.
D u k e S y s t e m s CPS 210 Introduction to Operating Systems Spring 2013 Jeff Chase Duke University.
Introduction and Overview Summer 2014 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University.
CS 444 Introduction to Operating Systems
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Computer Science 102 Data Structures and Algorithms CSCI-UA.0102 Fall 2012 Lecture 1: administrative details Professor: Evan Korth New York University.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
Operating Systems and Systems Programming CS162 Teaching Staff.
Processes Introduction to Operating Systems: Module 3.
CS333 Intro to Operating Systems Jonathan Walpole.
11/21/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Sam King and Andrew.
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
Cloud Computing Computation as Utility. Computer utilities Leonard Kleinrock, ARPANET, 1969: ”We will probably see the spread of computer utilities, which.
Programs and Processes Jeff Chase Duke University.
Threads. Readings r Silberschatz et al : Chapter 4.
D u k e S y s t e m s CPS Introduction to Operating Systems Spring 2016 Jeff Chase Duke University.
Data Structures and Algorithms in Java AlaaEddin 2012.
CS223: Software Engineering Lecture 13: Software Architecture.
Virtual Machines Mr. Monil Adhikari. Agenda Introduction Classes of Virtual Machines System Virtual Machines Process Virtual Machines.
RealTimeSystems Lab Jong-Koo, Lim
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.
Introduction and Overview Winter 2013 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University.
CS 162 Discussion Section Week 2. Who am I? Prashanth Mohan Office Hours: 11-12pm Tu W at.
Welcome to Intro to Operating Systems Course Website:
Introduction to Operating Systems Concepts
Modularity Most useful abstractions an OS wants to offer can’t be directly realized by hardware Modularity is one technique the OS uses to provide better.
Processes and threads.
Names and Attributes Names are a key programming language feature
Chapter 1: A Tour of Computer Systems
CS399 New Beginnings Jonathan Walpole.
Java programming lecture one
Introduction Enosis Learning.
Operating Systems and Systems Programming
Introduction Enosis Learning.
Lecture Topics: 11/1 General Operating System Concepts Processes
CSCE 313 – Introduction to UNIx process
Prof. Leonardo Mostarda University of Camerino
Introduction to Computer Systems
Introduction to Virtual Machines
Outline Operating System Organization Operating System Examples
Introduction to Virtual Machines
CSE 153 Design of Operating Systems Winter 2019
Lecture Topics: 11/1 Hand back midterms
Presentation transcript:

D u k e S y s t e m s CPS 210 Introduction to Operating Systems Fall 2012 Jeff Chase Duke University

Meetings “Lectures”: MW 3:05 – 4:20 – No class 10/15 – No class 11/21 – 25 lectures total Recitations – Friday in class slot, but Soc Sci 139 – TA: Vamsi Thummala Two midterms: 10/1 and 11/12 in class “Light” final exam (?): 12/ PM

What is this course about? Platforms Sharing Concurrency Storage Protection and trust Resource management Virtualization Scale and performance Abstractions User Applications Operating System Substrate / Architecture

User Applications Operating System Substrate / Architecture Aggregation Composition Orchestration Exponential growth Increasing diversity Backward compatibility Drivers of Change Broad view: smartphones to servers, web, and cloud.

Moore’s Law and CPU Performance From Hennessy and Patterson, Computer Architecture: A Quantitative Approach, 4th edition, 2006  Sea change in chip design: multiple “cores” or processors per chip 3X Uniprocessor Performance (SPECint)

Managing Complexity Environment System Component System Systems are built from components. Operating systems define styles of software components and how they interact. OS maps components onto the underlying machine. …and makes it all work together.

Systems as Architecture Large, long-lived software systems are like buildings. They are built by workers using standard design patterns. They depend on some underlying infrastructure. But they can evolve and are not limited by the laws of physics.

Abstraction Separate: – Interface from internals – Specification from implementation Abstraction is a double-edged sword. – “Don’t hide power.” More than an interface… This course is (partly) about the use of abstraction(s) in complex software systems. We want abstractions that are simple, rich, efficient to implement, and long-lasting.

Interface and abstraction

Standards, wrappers, adapters “Plug-ins” “Plug-compatible” Another layer of software can overcome superficial or syntactic differences if the fundamental are right.

Virtualization?

Canonical OS Example: “Classical OS” Unix/Linux, Windows, OS-X Research systems – Multics – Mach – Minix – …

End-to-end application delivery Cloud and Software-as-a-Service (SaaS) Rapid evolution, no user upgrade, no user data management. Agile/elastic deployment on virtual infrastructure. Where is your application? Where is your data? Where is your OS?

[ “Classical OS” Reloaded. Virtual Machine (JVM)

EC2 The canonical public cloud Virtual Appliance Image

OpenStack, the Cloud Operating System Management Layer That Adds Automation & Control [Anthony Rackspace]

SaaS platform elements [wiki.eeng.dcu.ie] “Classical OS” browser container

Platforms are layered/nested

Course prerequisites Basic data structures and programming – Graphs, queues, trees, heap – Abstract data types (ADTs), classes, objects – Dynamic data structures, garbage collection Basic discrete math and probability Basic architecture – CPU context: registers – Execution: stacks and frames – Memory, storage, and caches – Virtual addressing and data layout

Reading Course notes and slides External sources on every topic – A few academic papers – Some tutorial readings on the web – Yes, even a “comic book” We’ll look at these with varying levels of scrutiny.

a classic Web/SaaS/cloud Saltzer/Kaashoek Very MIT Do not buy kindle edition. New! $10! No text, but these may be useful. New! $75!

Workload: projects 1.C/C++ A.Dynamic memory allocator (malloc/free) B.Unix shell 2.Java concurrency: multi-threaded programming 3.Key/value storage server 4.Performance evaluation of storage server

Projects Project 1A done on your own Projects 1B-4 done in groups of 2 or 3 (or maybe 4) groups to – By Wednesday (Sep 5) or sooner – One message per group, list every group member – For everyone: name and NetID – Cc: everyone in group Group members may be asked to rate each other Procedure for firing and quitting in syllabus

Collaboration OK among groups: – General discussion of course concepts and programming environment. – “What does this part of the handout mean?” Not OK among groups – Design/writing of another’s program – “How do I do this part of the handout?” If in doubt, ask me.

Thoughts on cheating Cheating is a form of laziness. Cheating happens at those other schools. Duke students work hard and don’t cut corners. Your work is your own: if in doubt, ask. Listen to what shame tells you.

Syllabus: grades, exams Projects: 35% Exams: 65% – Early midterm! Monday, October 1 – Late midterm! Monday, November 12 – Final: Thursday, December 13 at 2:00 PM

Syllabus: getting help News and discussion group – Should receive an invitation Office hours – With me: see web – With TA: TBA – With UTAs: TBA

Components and connectors We use the term component for a software element: – Named building block – Has an externally visible interface of some kind – Internal details are hidden (encapsulated). A connector: – Enables interaction among components – Established at runtime API SPI Componen t “Connector” Garlan and Shaw, An Introduction to Software Architecture, Abstract Data Type (ADT) object/class/module invoke interface stream through stage or filter

Context (Domain) Program Thread API SPI Componen t “Connector” Program Instantiating components Load a program and prepare to execute its instructions.

Program executable module procedure class package image archive library DLL launch load execute run instantiate What causes launch? Running a program

What’s in a program?

code instructions (“text”) procedures data global variables (“static”) constants (“immutable”) symbols (import/export) names interfaces signatures references data

The Birth of a Program (C/Ux) int j; char* s = “hello\n”; int p() { j = write(1, s, 6); return(j); } myprogram.c compiler ….. p: store this store that push jsr _write ret etc. myprogram.s assembler data myprogram.o linker object file data program (executable file) myprogram data libraries and other objects

Program Running a program When a program launches, the platform allocates memory to store its code and data. data

Program Running a program Can a program launch multiple running instances on the same platform?

Program Can a program launch multiple running instances on the same platform? Running a program It depends. On some platforms (e.g., Android) an app is either active or it is not.

On most platforms, contexts are isolated. They cannot interfere with one another, even if they are running the same program. I.e., each context is its own “sandbox”. The programs may fail independently. In classical OS, a context is called a process. Each has a private virtual address space. Isolated contexts (domains) Butler Lampson’s definition: “I am isolated if anything that goes wrong is my fault (or my program’s fault).” Isolation might not be absolute. E.g., the program instances may choose to interact, or may access shared data.

The Operating System An operating system: – sets up the contexts – enforces isolation – mediates interactions Applications trust the OS to do these things. Any software platform for running application programs can be called an OS.