Advanced Memory Management

Similar documents
Lecture 13: Address Translation

Caching and Demand-Paged Virtual Memory

Main Memory: Address Translation

Main Points. Address Transla+on Concept. Flexible Address Transla+on. Efficient Address Transla+on

Caching and Demand- Paged Virtual Memory

Lecture 14: Cache & Virtual Memory

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture

Chapter 5 B. Large and Fast: Exploiting Memory Hierarchy

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

Chapter 5 (Part II) Large and Fast: Exploiting Memory Hierarchy. Baback Izadi Division of Engineering Programs

Distributed Systems. Distributed Shared Memory. Paul Krzyzanowski

RECOVERY CHAPTER 21,23 (6/E) CHAPTER 17,19 (5/E)

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

NFSv4 as the Building Block for Fault Tolerant Applications

NPTEL Course Jan K. Gopinath Indian Institute of Science

Demand- Paged Virtual Memory

Concurrent & Distributed Systems Supervision Exercises

MEMBRANE: OPERATING SYSTEM SUPPORT FOR RESTARTABLE FILE SYSTEMS

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

GFS: The Google File System. Dr. Yingwu Zhu

Recoverability. Kathleen Durant PhD CS3200

Recall: Address Space Map. 13: Memory Management. Let s be reasonable. Processes Address Space. Send it to disk. Freeing up System Memory

Fast access ===> use map to find object. HW == SW ===> map is in HW or SW or combo. Extend range ===> longer, hierarchical names

Portland State University ECE 587/687. Virtual Memory and Virtualization

Virtual Memory. Virtual Memory

Lecture 3 Memory Virtualization Larry Rudolph

Background. IBM sold expensive mainframes to large organizations. Monitor sits between one or more OSes and HW

Samsara: Efficient Deterministic Replay in Multiprocessor. Environments with Hardware Virtualization Extensions

ReVirt: Enabling Intrusion Analysis through Virtual Machine Logging and Replay

CS533 Concepts of Operating Systems. Jonathan Walpole

Last Class. Demand Paged Virtual Memory. Today: Demand Paged Virtual Memory. Demand Paged Virtual Memory

Lecture: Consistency Models, TM. Topics: consistency models, TM intro (Section 5.6)

Lecture: Consistency Models, TM

Virtual Memory. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

CSC 2405: Computer Systems II

OS Extensibility: SPIN and Exokernels. Robert Grimm New York University

File Systems: Consistency Issues

0x1A Great Papers in Computer Security

Administrative Details. CS 140 Final Review Session. Pre-Midterm. Plan For Today. Disks + I/O. Pre-Midterm, cont.

A Survey on Virtualization Technologies

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

Memory Management. Disclaimer: some slides are adopted from book authors slides with permission 1

Topics. File Buffer Cache for Performance. What to Cache? COS 318: Operating Systems. File Performance and Reliability

Anne Bracy CS 3410 Computer Science Cornell University

CA485 Ray Walshe Google File System

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

Distributed Systems Principles and Paradigms. Chapter 01: Introduction

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

CSCI 4717 Computer Architecture

Distributed systems. Lecture 6: distributed transactions, elections, consensus and replication. Malte Schwarzkopf

EECS 482 Introduction to Operating Systems

Address spaces and memory management

Failure Models. Fault Tolerance. Failure Masking by Redundancy. Agreement in Faulty Systems

University of Alberta. Zhu Pang. Master of Science. Department of Computing Science

Memory Management. Disclaimer: some slides are adopted from book authors slides with permission 1

Introduction to MySQL Cluster: Architecture and Use

An introduction to checkpointing. for scientifc applications

Distributed Systems Principles and Paradigms. Chapter 01: Introduction. Contents. Distributed System: Definition.

Lecture 21: Transactional Memory. Topics: Hardware TM basics, different implementations

Module 6: Process Synchronization. Operating System Concepts with Java 8 th Edition

Anne Bracy CS 3410 Computer Science Cornell University

Fault Tolerance. Goals: transparent: mask (i.e., completely recover from) all failures, or predictable: exhibit a well defined failure behavior

Authors : Ruslan Nikolaev Godmar Back Presented in SOSP 13 on Nov 3-6, 2013

This section covers the MIPS instruction set.

Fast access ===> use map to find object. HW == SW ===> map is in HW or SW or combo. Extend range ===> longer, hierarchical names

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Administrivia. Last Class. Faloutsos/Pavlo CMU /615

CA464 Distributed Programming

Multiprocessor Systems Continuous need for faster computers Multiprocessors: shared memory model, access time nanosec (ns) Multicomputers: message pas

24-vm.txt Mon Nov 21 22:13: Notes on Virtual Machines , Fall 2011 Carnegie Mellon University Randal E. Bryant.

Operating Systems, Fall Lecture 9, Tiina Niklander 1

Chapter 5 Large and Fast: Exploiting Memory Hierarchy (Part 2)

CPSC/ECE 3220 Fall 2017 Exam Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts.

CrashMonkey: A Framework to Systematically Test File-System Crash Consistency. Ashlie Martinez Vijay Chidambaram University of Texas at Austin

What is checkpoint. Checkpoint libraries. Where to checkpoint? Why we need it? When to checkpoint? Who need checkpoint?

FAULT TOLERANT SYSTEMS

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I

Virtual Memory Primitives for User Programs

Midterm Exam Answers

Computer Architecture Computer Science & Engineering. Chapter 5. Memory Hierachy BK TP.HCM

Process Description and Control. Chapter 3

Integrated Approach. Operating Systems COMPUTER SYSTEMS. LEAHY, Jr. Georgia Institute of Technology. Umakishore RAMACHANDRAN. William D.

Module 6: Process Synchronization

Modeling Page Replacement: Stack Algorithms. Design Issues for Paging Systems

EECS 482 Introduction to Operating Systems

Kernel Support for Paravirtualized Guest OS

Operating Systems : Overview

Google File System 2

6.830 Lecture Recovery 10/30/2017

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Fault Tolerance Causes of failure: process failure machine failure network failure Goals: transparent: mask (i.e., completely recover from) all

transaction - (another def) - the execution of a program that accesses or changes the contents of the database

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz I Solutions

Xen and the Art of Virtualization. CSE-291 (Cloud Computing) Fall 2016

Introduction to Virtual Machines. Carl Waldspurger (SB SM 89 PhD 95) VMware R&D

CSC 4320 Test 1 Spring 2017

Veritas Volume Replicator Administrator s Guide

Percona Live September 21-23, 2015 Mövenpick Hotel Amsterdam

Distributed Systems Principles and Paradigms

Transcription:

Advanced Memory Management

Main Points Applications of memory management What can we do with ability to trap on memory references to individual pages? File systems and persistent storage Goals Abstractions Interfaces

Address Translation Uses 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 Dynamic memory allocation Allocate and initialize stack/heap pages on demand

Address Translation (more) Program debugging Data breakpoints when address is accessed Zero-copy I/O Directly from I/O device into/out of user memory 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 (even more) Checkpoint/restart Transparently save a copy of a process, without stopping the program while the save happens Persistent data structures Implement data structures that can survive system reboots Process migration Transparently move processes between machines 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

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

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?

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

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