Introduction to Operating Systems

Slides:



Advertisements
Similar presentations
Remus: High Availability via Asynchronous Virtual Machine Replication
Advertisements

Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Threads Clients Servers Code Migration Software Agents Summary
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
Remus: High Availability via Asynchronous Virtual Machine Replication.
File System Variations and Software Caching May 19, 2000 Instructor: Gary Kimura.
Caching and Demand-Paged Virtual Memory
Address Translation.
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #29-1 Chapter 33: Virtual Machines Virtual Machine Structure Virtual Machine.
1 OS & Computer Architecture Modern OS Functionality (brief review) Architecture Basics Hardware Support for OS Features.
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
1 CSC 2405: Computer Systems II Spring 2012 Dr. Tom Way.
Tanenbaum 8.3 See references
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Remus: VM Replication Jeff Chase Duke University.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
ECE200 – Computer Organization Chapter 9 – Multiprocessors.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 9: Virtual Memory.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Demand Paging.
Processes and Virtual Memory
Lecture 26 Virtual Machine Monitors. Virtual Machines Goal: run an guest OS over an host OS Who has done this? Why might it be useful? Examples: Vmware,
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
E Virtual Machines Lecture 6 Topics in Virtual Machine Management Scott Devine VMware, Inc.
Processes Chapter 3. Processes in Distributed Systems Processes and threads –Introduction to threads –Distinction between threads and processes Threads.
Introduction to Operating Systems Concepts
Virtual Machine Monitors
Introduction to Operating Systems
Introduction to Operating Systems
8 July 2015 Charles Reiss
Introduction to Operating Systems
Jonathan Walpole Computer Science Portland State University
Presented by: Daniel Taylor
Operating Systems CMPSC 473
Chapter 8: Main Memory.
Memory Protection: Kernel and User Address Spaces
CS352H: Computer Systems Architecture
Andy Wang COP 5611 Advanced Operating Systems
Chapter 9: Virtual Memory
Chapter 1: Introduction
Andy Wang COP 5611 Advanced Operating Systems
Chapter 2: System Structures
Introduction to Operating Systems
Group 8 Virtualization of the Cloud
Introduction to Operating Systems
Introduction to Operating Systems
Introduction to Operating Systems
OS Virtualization.
Memory Protection: Kernel and User Address Spaces
Introduction to Operating Systems
Memory Protection: Kernel and User Address Spaces
Memory Protection: Kernel and User Address Spaces
Chapter 9: Virtual-Memory Management
Andy Wang Operating Systems COP 4610 / CGS 5675
Andy Wang COP 5611 Advanced Operating Systems
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Andy Wang COP 5611 Advanced Operating Systems
Lecture 7: Flexible Address Translation
CSE 471 Autumn 1998 Virtual memory
Operating Systems Structure
Lecture 9: Caching and Demand-Paged Virtual Memory
Andy Wang COP 5611 Advanced Operating Systems
Memory Protection: Kernel and User Address Spaces
COT 5611 Operating Systems Design Principles Spring 2014
Introduction to Operating Systems
III. Operating System Structures
Presentation transcript:

Introduction to Operating Systems CPSC/ECE 3220 Summer 2018 Lecture Notes OSPP Chapter 10 (adapted by Mark Smotherman from Tom Anderson’s slides on OSPP web site)

Address Translation Uses (Review) Process isolation Keep a process from touching anyone else’s memory, or the kernel’s Efficient interprocess communication Shared regions of memory between processes Shared code segments E.g., common libraries used by many different programs Program initialization Start running a program before it is entirely in memory

Address Translation Uses (Review 2) Dynamic memory allocation Allocate and initialize stack/heap pages on demand Program debugging Data breakpoints when address is accessed Memory mapped files Access file data using load/store instructions Demand-paged virtual memory Illusion of near-infinite memory, backed by disk or memory on other machines

Address Translation Uses (This Chapter) Zero-copy I/O Directly from I/O device into/out of user memory Efficient support of virtual machines Checkpoint/restart Transparently save a copy of a process, without stopping the program while the save happens Process migration Transparently move processes between machines Persistent data structures Implement data structures that can survive system reboots Information flow control Track what data is being shared externally Distributed shared memory Illusion of memory that is shared between machines

Web Server

Zero-Copy I/O Block Aligned Read/Write System Calls

Virtual Machines and Virtual Memory

Shadow Page Tables

Hardware Support for Virtual Machines x86 recently added hardware support for running virtual machines at user level Operating system kernel initializes two sets of translation tables One for the guest OS One for the host OS Hardware translates address in two steps First using guest OS tables, then host OS tables TLB holds composition

VMM Memory Compression

Transparent Checkpoint

Question At what point can we resume the execution of a checkpointed program? When the checkpoint starts? When the checkpoint is entirely on disk?

Incremental Checkpoint

Process Migration What if we checkpoint a process and then restart it on a different machine? Process migration: move a process from one machine to another Special handling needed if any system calls are in progress Where does the system call return to?

Recoverable Virtual Memory Data structures that survive failures Want a consistent version of the data structure User marks region of code as needing to be atomic Begin transaction, end transaction If crash, restore state before or after transaction

Recoverable Virtual Memory On begin transaction: Snapshot data structure to disk Change page table permission to read-only On page fault: Mark page as modified by transaction Change page table permission to read-write On end transaction: Log changed pages to disk Commit transaction when all mods are on disk Recovery: Read last snapshot + logged changes, if committed

Deterministic Debugging Can we precisely replay the execution of a multi-threaded process? If process does not have a memory race From a checkpoint, record: All inputs and return values from system calls All scheduling decisions All synchronization operations Ex: which thread acquired lock in which order

Security VM “honeypot” Information flow control Defense in depth Clone VM to run suspect code Watch for changes to browser or OS in VM Information flow control Track what data is being shared externally Defense in depth Keep all system software up to date Multiple levels of protection

Cooperative Caching Can we demand page to memory on a different machine? Remote memory over LAN much faster than disk On page fault, look in remote memory first before fetching from disk

Distributed Virtual Memory Can we make a network of computers appear to be a shared-memory multiprocessor? Read-write: if page is cached only on one machine Read-only: if page is cached on several machines Invalid: if page is cached read-write on a different machine On read page fault: Change remote copy to read-only Copy remote version to local machine On write page fault (if cached): Change remote copy to invalid Change local copy to read-write