What s Wrong with the Operating System Interface? Collin Lee and John Ousterhout

Similar documents
Arachne. Core Aware Thread Management Henry Qin Jacqueline Speiser John Ousterhout

Low-Latency Datacenters. John Ousterhout

RAMCloud and the Low- Latency Datacenter. John Ousterhout Stanford University

Chapter 8: Virtual Memory. Operating System Concepts

Low-Latency Datacenters. John Ousterhout Platform Lab Retreat May 29, 2015

First-In-First-Out (FIFO) Algorithm

CGAR: Strong Consistency without Synchronous Replication. Seo Jin Park Advised by: John Ousterhout

COLLIN LEE INITIAL DESIGN THOUGHTS FOR A GRANULAR COMPUTING PLATFORM

Main Memory (Part II)

CS307: Operating Systems

OPERATING SYSTEM. Chapter 9: Virtual Memory

Virtual Memory. Patterson & Hennessey Chapter 5 ELEC 5200/6200 1

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

RAMCloud: Scalable High-Performance Storage Entirely in DRAM John Ousterhout Stanford University

File system internals Tanenbaum, Chapter 4. COMP3231 Operating Systems

Millisort: An Experiment in Granular Computing. Seo Jin Park with Yilong Li, Collin Lee and John Ousterhout

Chapter 9: Virtual-Memory

Chapter 8: Main Memory

Reducing Hit Times. Critical Influence on cycle-time or CPI. small is always faster and can be put on chip

Chapter 8: Memory-Management Strategies

Network File System (NFS)

Network File System (NFS)

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Paging. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition

Virtual Memory I. Jo, Heeseung

Virtual to physical address translation

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES

Operating Systems, Fall

CS370 Operating Systems

Operating Systems, Fall

Chapter 8: Main Memory. Operating System Concepts 9 th Edition

!! What is virtual memory and when is it useful? !! What is demand paging? !! When should pages in memory be replaced?

Indexing in RAMCloud. Ankita Kejriwal, Ashish Gupta, Arjun Gopalan, John Ousterhout. Stanford University

Qualifying exam: operating systems, 1/6/2014

Chapter 8: Main Memory

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts

I/O Systems. Jo, Heeseung

VIRTUAL MEMORY. Operating Systems 2015 Spring by Euiseong Seo

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

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University

EECS 482 Introduction to Operating Systems

Exploiting Commutativity For Practical Fast Replication. Seo Jin Park and John Ousterhout

Maximum Performance. How to get it and how to avoid pitfalls. Christoph Lameter, PhD

CS370 Operating Systems

CS370 Operating Systems

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

Introduction to OS. File Management. MOS Ch. 4. Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

Chapter 10: Virtual Memory

Readings and References. Virtual Memory. Virtual Memory. Virtual Memory VPN. Reading. CSE Computer Systems December 5, 2001.

GPUfs: Integrating a File System with GPUs. Yishuai Li & Shreyas Skandan

CHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CS307: Operating Systems

CS399 New Beginnings. Jonathan Walpole

V. Primary & Secondary Memory!

RAMCloud: A Low-Latency Datacenter Storage System Ankita Kejriwal Stanford University

PM Support in Linux and Windows. Dr. Stephen Bates, CTO, Eideticom Neal Christiansen, Principal Development Lead, Microsoft

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Memory Management

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access

OPERATING SYSTEMS & Network OVERVIEW. 1: OS & Network Overview

CS252 S05. Main memory management. Memory hardware. The scale of things. Memory hardware (cont.) Bottleneck

Memory Allocation. Copyright : University of Illinois CS 241 Staff 1

Virtual Memory. Today. Segmentation Paging A good, if common example

Virtual Memory Outline

Google File System. Arun Sundaram Operating Systems

Motivation. Threads. Multithreaded Server Architecture. Thread of execution. Chapter 4

Paging. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Memory Management Topics. CS 537 Lecture 11 Memory. Virtualizing Resources

Virtual Memory. Kevin Webb Swarthmore College March 8, 2018

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Chapter 8: Memory- Management Strategies

Arrakis: The Operating System is the Control Plane

I, J A[I][J] / /4 8000/ I, J A(J, I) Chapter 5 Solutions S-3.

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi

Half full or half empty? William Gropp Mathematics and Computer Science

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

Computer Architecture. Lecture 8: Virtual Memory

Chapter 9: Virtual Memory. Operating System Concepts 9th Edition

CS 550 Operating Systems Spring Memory Management: Paging

Virtual Memory. Motivation:

Xen and the Art of Virtualization. Nikola Gvozdiev Georgian Mihaila

CS399 New Beginnings. Jonathan Walpole

Learning to Play Well With Others

PROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18

Contiguous memory allocation in Linux user-space

csci 3411: Operating Systems

Lightning Talks. Platform Lab Students Stanford University

CS3600 SYSTEMS AND NETWORKS

ò Server can crash or be disconnected ò Client can crash or be disconnected ò How to coordinate multiple clients accessing same file?

Registers Cache Main memory Magnetic disk Magnetic tape

CSE 4/521 Introduction to Operating Systems. Lecture 14 Main Memory III (Paging, Structure of Page Table) Summer 2018

CS162 - Operating Systems and Systems Programming. Address Translation => Paging"

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

NFS. Don Porter CSE 506

Virtualization, Xen and Denali

Much Faster Networking

Operating Systems. Week 9 Recitation: Exam 2 Preview Review of Exam 2, Spring Paul Krzyzanowski. Rutgers University.

An Implementation of the Homa Transport Protocol in RAMCloud. Yilong Li, Behnam Montazeri, John Ousterhout

! Design constraints. " Component failures are the norm. " Files are huge by traditional standards. ! POSIX-like

Page Replacement Algorithms

Transcription:

What s Wrong with the Operating System Interface? Collin Lee and John Ousterhout

Goals for the OS Interface More convenient abstractions than hardware interface Manage shared resources Provide near-hardware performance January 30, 2018 What's Wrong with the OS Interface? Slide 2

Multi-tasking (1970s) 1 thread per process. Evolution of Threads Threads used to model concurrency between processes. Multi-threading (1990s) 1 thread per concurrent task (within a process). Threads used to model concurrency within a process (application). Multi-Core (2000s) 1 thread per desired parallel execution (core). Threads used to request resources for parallel execution. Designed to provide logical concurrency for long tasks. NOT designed to schedule parallel execution. (Though this is how we use it today.) January 30, 2018 What's Wrong with the OS Interface? Slide 3

Faster Threads for Short Tasks Today we have lower latency tasks. Threads aren t fast enough to model concurrency for short tasks. Threads were designed for long running task. Thread creation 5.76µs; condition signal 4.14µs. Dynamic thread creation is impractical. Most apps use a fixed number of threads or thread pool. Most applications limit threads to number of expected cores. Why are kernel threads so slow? Kernel Bypass for Threads (User Space Threading)? Go Routines? Arachne? Are there issues with user space threading? How does the current kernel interface restricting us? January 30, 2018 What's Wrong with the OS Interface? Slide 4

Core Aware Threading Threading model not designed to express parallelism. Designed for concurrency and co-opted for parallelism for multi-core. Applications today are blindly requesting parallelism. Applications use threads as a proxy for cores. No way for applications to know what resources (cores) are actually available to it. Blind thread allocation leads to inefficient resource utilization. Underutilization (# threads < # cores) or inefficiency (# threads > #cores) Separate mechanisms for concurrency and parallelism? We don t really use threads for concurrency anymore anyway. New Core Request API? Provide way for applications to ask for cores and and know when they are revoked. On the other hand, does an application actually want to deal with cores? January 30, 2018 What's Wrong with the OS Interface? Slide 5

Does Virtual Memory Make Sense? 1960 s 2018 Change Flash Disk latency 80 ms 5 ms 16x 10 µs Disk transfer rate 250 KB/s 200 MB/s 800x 2 GB/s Memory size 256 KB 64 GB 250,000x 64 GB Time to replace all of memory (random) 6.4 s 22 hrs 12500x 160 s Time to replace all of memory (sequential) 1 s 320 s 320x 32 s Can t afford to page out unless I/O for a long time January 30, 2018 What's Wrong with the OS Interface? Slide 6

Does Paging Make Sense? How did we end up with 4 KB pages? Flexible management of physical memory: noncontiguous allocation Flexible management of virtual address space (e.g., sharing) Efficient paging (granular) 4 KB pages: too small TLB misses double cost of cache miss 1 GB pages: Too large: not enough independently manageable units? Too large: internal fragmentation Too small: still can t map all of memory in TLB January 30, 2018 What's Wrong with the OS Interface? Slide 7

Return to Segmentation? For example: Fixed number of segment descriptors (~100?) for each virtual address space Always loaded in TLB : no misses, ever Potential problems: Will there be enough independently shareable units? How many mmapped files might be open at once? Must do additions and subtractions during memory translation Compromise: Mark Hill s proposal One segment per process, plus the usual paging Assumption: huge applications typically have one large memory region (e.g., RAMCloud log) January 30, 2018 What's Wrong with the OS Interface? Slide 8

Kernel_Bypass_Networking++ Kernel networking has been found to be too slow. Designed to handle slow networks and packet loss. 100B RAMCloud network read: 24µs (kernel UDP) vs 5µs (kernel bypass). Solution was to move the transport into user space (kernel bypass). The kernel is only involved during initial setup and not on the data path. Allows for customized, simpler, faster network transports. Problem: Possible interference between user space transports Having multiple transports can cause avoidable contention on the network. Should each app have its own transport? Can applications share a transport? How do you deal with protection? New Kernel Shared Network Resource State API? Provide a way for transports to share state about the network. January 30, 2018 What's Wrong with the OS Interface? Slide 9