Transforming Policies into Mechanisms with Infokernel Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau, Nathan C. Burnett, Timothy E. Denehy, Thomas J.

Slides:



Advertisements
Similar presentations
Module 10: Virtual Memory
Advertisements

The Performance Impact of Kernel Prefetching on Buffer Cache Replacement Algorithms (ACM SIGMETRIC 05 ) ACM International Conference on Measurement & Modeling.
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
A Survey of Web Cache Replacement Strategies Stefan Podlipnig, Laszlo Boszormenyl University Klagenfurt ACM Computing Surveys, December 2003 Presenter:
Investigating Distributed Caching Mechanisms for Hadoop Gurmeet Singh Puneet Chandra Rashid Tahir.
Outperforming LRU with an Adaptive Replacement Cache Algorithm Nimrod megiddo Dharmendra S. Modha IBM Almaden Research Center.
Buffer management.
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Information and Control in Gray-Box Systems Arpaci-Dusseau and Arpaci-Dusseau SOSP 18, 2001 John Otto Wi06 CS 395/495 Autonomic Computing Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 15: Background Information for the VMWare ESX Memory Management.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement.
Module 9: Virtual Memory
Module 10: Virtual Memory Background Demand Paging Performance of Demand Paging Page Replacement Page-Replacement Algorithms Allocation of Frames Thrashing.
Virtual Memory Background Demand Paging Performance of Demand Paging
Virtual Memory Introduction to Operating Systems: Module 9.
Exploiting Gray-Box Knowledge of Buffer Cache Management Nathan C. Burnett, John Bent, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau University of.
Cache Memory By JIA HUANG. "Computer Science has only three ideas: cache, hash, trash.“ - Greg Ganger, CMU.
Instructor: Umar KalimNUST Institute of Information Technology Operating Systems Virtual Memory.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Memory Management – 4 Page Replacement Algorithms CS 342 – Operating Systems.
Improving Proxy Cache Performance: Analysis of Three Replacement Policies Dilley, J.; Arlitt, M. A journal paper of IEEE Internet Computing, Volume: 3.
Chapter 9: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Chapter 9: Virtual Memory Background.
Chapter 10: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Chapter 10: Virtual Memory.
Instructor: Umar KalimNUST Institute of Information Technology Operating Systems Revisiting Virtual Memory.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy (Part II)
03/29/2004CSCI 315 Operating Systems Design1 Page Replacement Algorithms (Virtual Memory)
Disk and I/O Management
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Authors: Tong Li, Dan Baumberger, David A. Koufaty, and Scott Hahn [Systems Technology Lab, Intel Corporation] Source: 2007 ACM/IEEE conference on Supercomputing.
Page 19/17/2015 CSE 30341: Operating Systems Principles Optimal Algorithm  Replace page that will not be used for longest period of time  Used for measuring.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
Page Replacement in Real Systems Questions answered in this lecture: How can the LRU page be approximated efficiently? How can users discover the page.
Department of Computer Science & Engineering Abstract:. In our time, the advantage of technology is the biggest thing for current scientific works. One.
« Performance of Compressed Inverted List Caching in Search Engines » Proceedings of the International World Wide Web Conference Commitee, Beijing 2008)
X-RAY: A Non-Invasive Exclusive Caching Mechanism for RAIDs Lakshmi N. Bairavasundaram Muthian Sivathanu Andrea C. Arpaci-Dusseau Remzi H. Arpaci-Dusseau.
Chapter 21 Virtual Memoey: Policies Chien-Chung Shen CIS, UD
Exploiting Gray-Box Knowledge of Buffer Cache Management Nathan C. Burnett, John Bent, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau University of.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
Deconstructing Storage Arrays Timothy E. Denehy, John Bent, Florentina I. Popovici, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau University of Wisconsin,
1 Virtual Machine Memory Access Tracing With Hypervisor Exclusive Cache USENIX ‘07 Pin Lu & Kai Shen Department of Computer Science University of Rochester.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Page Replacement Allocation of.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Improving Disk Throughput in Data-Intensive Servers Enrique V. Carrera and Ricardo Bianchini Department of Computer Science Rutgers University.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 9 th Edition Chapter 9: Virtual-Memory Management.
Project Presentation By: Dean Morrison 12/6/2006 Dynamically Adaptive Prepaging for Effective Virtual Memory Management.
Operating Systems: Wrap-Up Questions answered in this lecture: What is an Operating System? Why are operating systems so interesting? What techniques can.
CS307 Operating Systems Virtual Memory Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2012.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 7 – Buffer Management.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
CS422 Principles of Database Systems Buffer Management Chengyu Sun California State University, Los Angeles.
WSRR 111 Coerced Cache Eviction and Discreet Mode Journaling: Dealing with Misbehaving Disks Abhishek Rajimwale, Vijay Chidambaram, Deepak Ramamurthi Andrea.
OPERATING SYSTEM CONCEPTS AND PRACTISE
Jonathan Walpole Computer Science Portland State University
Module 11: File Structure
Module 9: Virtual Memory
Chapter 9: Virtual-Memory Management
Chapter 11: Indexing and Hashing
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department
Page Replacement.
What Happens if There is no Free Frame?
5: Virtual Memory Background Demand Paging
A Simulator to Study Virtual Memory Manager Behavior
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Operating Systems CMPSC 473
Virtual Memory: Working Sets
Chapter 11: Indexing and Hashing
Module 9: Virtual Memory
Virtual Memory.
Sarah Diesburg Operating Systems CS 3430
Presentation transcript:

Transforming Policies into Mechanisms with Infokernel Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau, Nathan C. Burnett, Timothy E. Denehy, Thomas J. Engle, Haryadi S. Gunawi, James A. Nugent, and Florentina I. Popovici Department of Computer Sciences University of Wisconsin - Madison

Policies and Mechanisms Definitions –Policies are schemes for deciding what to do –Mechanisms are tools for implementing policies From user or application perspective –See only fixed OS policies –Defaults may not be the best policies

Policies and Mechanisms Definitions –Policies are schemes for deciding what to do –Mechanisms are tools for implementing policies From user or application perspective –See only fixed OS policies –Defaults may not be the best policies How can we transform existing OS policies into useful mechanisms for higher-level services?

From Policies to Mechanisms Information empowers transformation OS - Policies Application

From Policies to Mechanisms Information empowers transformation OS - Policies (infokernel) Application small changes

From Policies to Mechanisms Information empowers transformation OS - Policies (infokernel) Application Information small changes algorithms, state

From Policies to Mechanisms Information empowers transformation OS - Policies (infokernel) Application Information small changes algorithms, state Library

From Policies to Mechanisms Information empowers transformation OS - Policies (infokernel) Application Information small changes algorithms, state Library exploit predict

From Policies to Mechanisms Information empowers transformation OS - Policies (infokernel) Application Information small changes algorithms, state Library exploit predict adapt

From Policies to Mechanisms Information empowers transformation OS - Policies (infokernel) Application Information small changes algorithms, state Library exploit predict adapt manipulate

Building Infokernels Exploit information to control policies in Linux, BSD File cache replacement –Convert 2Q into FIFO, LRU, MRU, LFU File and directory placement –Control placement of data on disk Disk scheduling –Enable background scheduling and free-block scheduling Network scheduling –Convert TCP Reno into TCP Vegas congestion control

Infokernel Observations Policies can be manipulated efficiently Ideas applicable to diverse policies Several useful abstractions Simple to implement

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

Case Study: InfoReplace Convert a source OS file cache replacement policy into a different target policy Manipulate source policy by accessing cache pages favored by the target policy File Caching (infokernel) Application Information InfoReplace

Repeated Sequential Scans Imagine a 3 page cache and a 4 page file 1 Read page 1 LRU 1 Read page Read page Read page Read page Read page % Hit Rate…

Repeated Sequential Scans Imagine a 3 page cache and a 4 page file 1 Read page 1 LRU 1 Read page Read page Read page Read page Read page % Hit Rate 1 LIFO % Hit Rate…

Repeated Sequential Scans Imagine a 3 page cache and a 4 page file 1 Read page 1 LRU (source) 1 Read page Read page Read page Read page Read page % Hit Rate LIFO (target) 50% Hit Rate… 1 InfoReplace

Repeated Sequential Scans Imagine a 3 page cache and a 4 page file 1 Read page 1 LRU (source) 1 Read page Read page Read page Read page Read page % Hit Rate LIFO (target) 50% Hit Rate… 1 InfoReplace

Repeated Sequential Scans Imagine a 3 page cache and a 4 page file 1 Read page 1 LRU (source) 1 Read page Read page Read page Read page Read page % Hit Rate LIFO (target) 50% Hit Rate… 1 InfoReplace

Repeated Sequential Scans Imagine a 3 page cache and a 4 page file 1 Read page 1 LRU (source) 1 Read page Read page Read page Read page Read page % Hit Rate LIFO (target) 50% Hit Rate… 1 InfoReplace

Repeated Sequential Scans Imagine a 3 page cache and a 4 page file 1 Read page 1 LRU (source) 1 Read page Read page Read page Read page Read page % Hit Rate LIFO (target) 50% Hit Rate… 1 InfoReplace % Hit Rate

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

Amount of Information InfoReplace –Could export exact file page cache structures Specific to the source policy and the particular implementation Kernel changes would force user-level modifications –Instead, export an abstract ordered list of file pages Order indicates which pages are likely to be evicted Possible to build a single library for many source policies General observations –Information must be recast –Hide actual implementations –Export general abstractions applying to a range of policies

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

Efficient Abstractions InfoReplace –Victim list, next N victims from file cache page list Faster to copy a small portion of the list –Victim counter, tracks additions to the victim list Faster to determine when manipulation is necessary General observations –Efficient optimizations for each case study –Reusable abstractions for exporting information Lists, counters, notifiers

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

Simulated cache Emulating Target Policies InfoReplace –Interpose on file reads and writes –Simulate the target policy and compare its shadow file cache entries to the actual cache –Access pages that may be evicted but are favored under the target policy OS cache compare manipulate

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

Implementation Complexity InfoReplace –Kernel: 109 lines of code –User-level: 1,361 lines of code Most due to the simulation framework (720 lines) About 100 lines of code for each target policy General observations –Small code sizes for all case studies (< 1,900 lines) –Abstractions easily implemented in Linux and BSD

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

InfoReplace Accuracy Convert Linux 2Q into FIFO, LRU, MRU, LFU Workload varies recency and frequency of access to a file Compare pages in actual and simulated caches Accuracy is high except for MRU, which is opposed to 2Q

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

InfoReplace Overhead Convert Linux 2Q into FIFO, LRU, MRU, LFU Overheads are small except LFU which is expensive to simulate Even LFU overhead is acceptable if we can gain just 1% in hit rate

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

InfoReplace Workload Benefits Convert Linux 2Q policy into PinRange Pin the upper levels of a database index tree in memory Workload of random index lookups Level 6 hit rate increases under PinRange Run time decreases 22%

InfoReplace Workload Benefits Convert Linux 2Q policy into PinRange Pin the upper levels of a database index tree in memory Workload of random index lookups Level 6 hit rate increases under PinRange Run time decreases 22%

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

Adding Mechanisms InfoReplace –Could build several cache policies into the OS Difficult to supply the right policy for every application General observations –Infeasible to deliver all policies for all applications –Provide abstract tools for policy customization

Infokernel Questions Exporting information –How much information should we export? –How do we access information efficiently? Controlling policies –How can we emulate other policies? –How complex is the implementation? Evaluation –How accurate is our policy control? –How much overhead is incurred? –What benefits can we achieve? Other issues –Why not add new mechanisms for control? –Could greedy processes misbehave?

Greedy Processes InfoReplace –A process could monopolize the file cache –Such activity was possible before General observations –Stresses the role of the OS to arbitrate resources –No new mechanisms, so no new OS responsibilities

Case Study: InfoFreeSched Provide free-block scheduling on a source disk scheduling policy Manipulate source policy by carefully introducing background requests Disk Sched (infokernel) Application Information InfoFreeSched

InfoFreeSched Abstractions Name of disk scheduling policy –Determine where new requests will be placed Disk request list Notifier for changes to disk request list –Faster to recognize new scheduling opportunities Timers for disk accesses –Build an approximate disk model based on logical block distances

InfoFreeSched Operation Lack complete control over disk request queue –Limited by source policy and existing requests

InfoFreeSched Operation Lack complete control over disk request queue –Limited by source policy and existing requests Obtain current list of disk requests

InfoFreeSched Operation Lack complete control over disk request queue –Limited by source policy and existing requests Obtain current list of disk requests For each background request

InfoFreeSched Operation Lack complete control over disk request queue –Limited by source policy and existing requests Obtain current list of disk requests For each background request –Determine its queue position

InfoFreeSched Operation Lack complete control over disk request queue –Limited by source policy and existing requests Obtain current list of disk requests For each background request –Determine its queue position –Calculate effect on foreground using disk model

InfoFreeSched Operation Lack complete control over disk request queue –Limited by source policy and existing requests Obtain current list of disk requests For each background request –Determine its queue position –Calculate effect on foreground using disk model –Insert request if impact is minimal

InfoFreeSched Workload Benefits Workload of foreground and background random read requests Increase overall bandwidth with minimal impact on foreground

Conclusions Infokernels –Can efficiently manipulate OS polices –Apply to a diverse set of policies –Can be built from several useful abstractions –Are simple to implement

Conclusions Infokernels –Can efficiently manipulate OS polices –Apply to a diverse set of policies –Can be built from several useful abstractions –Are simple to implement Information empowers applications

Questions?