Minimizing Cache Usage in Paging Alejandro Salinger University of Waterloo Joint work with Alex López-Ortiz.

Slides:



Advertisements
Similar presentations
A Primal-Dual Approach to Online Optimization Problems.
Advertisements

Online Algorithm Huaping Wang Apr.21
Chapter 11 – Virtual Memory Management
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Virtual Memory: Page Replacement
Online Algorithms Amrinder Arora Permalink:
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Alternative Models for Online Analysis Alex López-Ortiz University of Waterloo joint work with Reza Dorrigiv, Spyros Angelopoulos and Ian Munro.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Competitive Analysis.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
1 Competitive analysis of the LRFU paging algorithm Edith Cohen -- AT&T Haim Kaplan -- Tel Aviv Univ. Uri Zwick -- Tel Aviv Univ.
SIGMOD 2006University of Alberta1 Approximately Detecting Duplicates for Streaming Data using Stable Bloom Filters Presented by Fan Deng Joint work with.
Day 23 Virtual Memory. Operating system’s role in VM Hardware-support Use VM or not Use paging or segmentation or both Software domain Algorithms for.
Institute of Computer Science University of Wroclaw Page Migration in Dynamic Networks Marcin Bieńkowski Joint work with: Jarek Byrka (Centrum voor Wiskunde.
Online Algorithms Motivation and Definitions Paging Problem Competitive Analysis Online Load Balancing.
CS 257 Database Systems Principles Assignment 2 Instructor: Student: Dr. T. Y. Lin Rajan Vyas (119)
Ecole Polytechnique, Nov 7, Online Job Scheduling Marek Chrobak University of California, Riverside.
OS Spring’04 Virtual Memory: Page Replacement Operating Systems Spring 2004.
1 Last Time: Paging Motivation Page Tables Hardware Support Benefits.
Paging for Multi-Core Shared Caches Alejandro López-Ortiz, Alejandro Salinger ITCS, January 8 th, 2012.
Lecture 33: Chapter 5 Today’s topic –Cache Replacement Algorithms –Multi-level Caches –Virtual Memories 1.
A polylog competitive algorithm for the k-server problem Nikhil Bansal (Eindhoven) Niv Buchbinder (Open Univ., Israel) Aleksander Madry (MIT) Seffi Naor.
Operating Systems ECE344 Ding Yuan Page Replacement Lecture 9: Page Replacement.
1/24 Algorithms for Generalized Caching Nikhil Bansal IBM Research Niv Buchbinder Open Univ. Israel Seffi Naor Technion.
Maninder Kaur VIRTUAL MEMORY 24-Nov
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
International Graduate School of Dynamic Intelligent Systems, University of Paderborn Improved Algorithms for Dynamic Page Migration Marcin Bieńkowski.
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
Online Algorithms and Competitive Analysis. Paging Algorithms Data brought from slower memory into cache RAM CPU.
Online Paging Algorithm By: Puneet C. Jain Bhaskar C. Chawda Yashu Gupta Supervisor: Dr. Naveen Garg, Dr. Kavitha Telikepalli.
9/8/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 6 Greedy Algorithms.
Online Algorithms. Introduction An offline algorithm has a full information in advance so it can compute the optimal strategy to maximize its profit (minimize.
Minimizing Cache Usage in Paging Alejandro López-Ortiz, Alejandro Salinger University of Waterloo.
Chapter 21 Virtual Memoey: Policies Chien-Chung Shen CIS, UD
Copyright ©: Lawrence Angrave, Vikram Adve, Caccamo 1 Virtual Memory.
By Andrew Yee. Virtual Memory Memory Management What is Page Replacement?
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 3:00-4:00 PM.
CSE 5314 On-line Computation Homework 1 Wook Choi Feb/26/2004.
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
Jennifer Campbell November 30,  Problem Statement and Motivation  Analysis of previous work  Simple - competitive strategy  Near optimal deterministic.
Efficient Cache Structures of IP Routers to Provide Policy-Based Services Graduate School of Engineering Osaka City University
Page Replacement Algorithms and Simulation Neville Allen.
Time Parallel Simulations I Problem-Specific Approach to Create Massively Parallel Simulations.
A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉.
1 Chapter 5-1 Greedy Algorithms Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Problem 3.2 Paging Algorithms-Time & Space Requirements Problem:What are the space and time requirements of LIFO, LFU, and LED? LRU:(least-recently-used):
CAM Content Addressable Memory
Operating Systems ECE344 Ding Yuan Page Replacement Lecture 9: Page Replacement.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 9: Virtual Memory.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
CAM Content Addressable Memory
Replacement Policy Replacement policy:
Multilevel Memories (Improving performance using alittle “cash”)
Day 22 Virtual Memory.
\course\cpeg324-08F\Topic7c
TLC: A Tag-less Cache for reducing dynamic first level Cache Energy
Greedy Algorithms / Caching Problem Yin Tat Lee
CGS 3763 Operating Systems Concepts Spring 2013
Cache Replacement Scheme based on Back Propagation Neural Networks
CGS 3763 Operating Systems Concepts Spring 2013
COT 4600 Operating Systems Spring 2011
Greedy Algorithms / Caching Problem Yin Tat Lee
Operating Systems CMPSC 473
Exercise (11).
Exercise (10).
Module IV Memory Organization.
Lecture 9: Caching and Demand-Paged Virtual Memory
CGS 3763 Operating Systems Concepts Spring 2013
Sarah Diesburg Operating Systems CS 3430
Presentation transcript:

Minimizing Cache Usage in Paging Alejandro Salinger University of Waterloo Joint work with Alex López-Ortiz

Outline Paging problem and models Paging with cache usage Offline optimum Online algorithms Simulations Conclusions

Paging Cache Memory Hit! Memory

Paging Fault! Cache Memory 6 6

Paging Input: sequence of page requests cache size k Paging algorithm = eviction policy What page should be evicted from the cache? Traditional cost model Hit: 0 Fault: 1 Goal: minimize the number of faults

Paging Common eviction policies: Least Recently Used (LRU) First In First Out (FIFO) Flush When Full (FWF) Furthest In The Future (FITF) (offline)

Competitive Analysis

Paging Models Page has fault cost and size Page fault (classic) model Uniform size and fault costs Weighted caching [Chrobak 91] Varying fault costs, uniform page sizes Fault model [Irani 97] Varying sizes, uniform fault cost Bit model [Irani 97] Fault cost equals size General [Young 98] k-competitive algorithms for all above Offline problem is NP-hard

Paging Models

Paging with Cache Usage

fault cost cell cost

Applications Shared cache multiprocessors

Applications Shared cache multiprocessors Cooperative caching

Applications Energy efficient caching Content Addressable Memories (CAMs) Cache 3

Applications Energy efficient caching Content Addressable Memories (CAMs) Power of search proportional to valid cells Cache 3

Offline Optimum

…,3,3,4,5,21,3,4,17,5,3,5,5,6,7,8, ??? Offline Optimum But paging is an online problem! Offline algorithm can lead to good online algorithms Classic paging optimum: FITF LRU …,3,3,4,5,21,3,4,17,5,3,5,5,6,7,8,9,6,7,4,4,5,3,15,13,3,3,7,8,9,… 8,7,6,5,5,3,5,17,4

Interval Scheduling

Offline Optimum

Online Algorithms

Marking algorithm: at most k faults in each phase LRU, FWF, CLOCK Conservative algorithm: at most k faults LRU, FIFO, CLOCK ≤ k distinct pages ≤ k

Online Algorithms

p Not quite…

k = 10

… …

k = 9

For any conservative or marking A k = 10

OPT

Locality of Reference L = Average length of phase in k-phase partition k = 10 L = 150

Simulations

Cost Ratio k=5

Cost Ratio k=7

Faults k=5

Faults k=7

Average Cache Usage k=5

Average Cache Usage k=7

Conclusions Introduced Minimum Cache Usage problem Cost-sensitive family of online algorithms 2 ≤ CR(α) ≤ k 2-competitive for sequences with high locality Polynomial time optimal offline algorithm Algorithms highly competitive in practice Future Work: Deeper lower bound analysis Other online algorithms Applications, e.g., shared cache cooperative strategy Thank you