Minimizing Cache Usage in Paging Alejandro López-Ortiz, Alejandro Salinger University of Waterloo.

Slides:



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

Online Algorithm Huaping Wang Apr.21
Chapter 11 – Virtual Memory Management
Virtual Memory: Page Replacement
Online Algorithms Amrinder Arora Permalink:
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.
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.
Competitive Paging Algorithms Amos Fiat, Richard Karp, Michael Luby, Lyle McGeoch, Daniel Sleator, Neal Young presented by Seth Phillips.
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.
Minimizing Cache Usage in Paging Alejandro Salinger University of Waterloo Joint work with Alex López-Ortiz.
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.
« Performance of Compressed Inverted List Caching in Search Engines » Proceedings of the International World Wide Web Conference Commitee, Beijing 2008)
Online Algorithms. Introduction An offline algorithm has a full information in advance so it can compute the optimal strategy to maximize its profit (minimize.
Qingqing Gan Torsten Suel CSE Department Polytechnic Institute of NYU Improved Techniques for Result Caching in Web Search Engines.
Chapter 21 Virtual Memoey: Policies Chien-Chung Shen CIS, UD
Minimizing Stall Time in Single Disk Susanne Albers, Naveen Garg, Stefano Leonardi, Carsten Witt Presented by Ruibin Xu.
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
Time Parallel Simulations I Problem-Specific Approach to Create Massively Parallel Simulations.
A polylog competitive algorithm for the k-server problem Nikhil Bansal (IBM) Niv Buchbinder (Open Univ.) Aleksander Madry (MIT) Seffi Naor (Technion)
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
Cache memory Replacement Policy Prof. Sin-Min Lee Department of Computer Science.
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.
A Graph Theoretic Approach to Cache-Conscious Placement of Data for Direct Mapped Caches Mirza Beg and Peter van Beek University of Waterloo June
CAM Content Addressable Memory
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
CGS 3763 Operating Systems Concepts Spring 2013
ECE 445 – Computer Organization
Cache Replacement Scheme based on Back Propagation Neural Networks
CGS 3763 Operating Systems Concepts Spring 2013
Virtual Memory فصل هشتم.
COT 4600 Operating Systems Spring 2011
Greedy Algorithms / Caching Problem Yin Tat Lee
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 López-Ortiz, Alejandro Salinger University of Waterloo

Outline Paging Paging with cache usage Interval Scheduling Online algorithms Simulations Conclusions 2

Paging 3 Slow memory Cache of size k …p 6 p 3 p 2 p 4 p 4 p 2 p 10 p 11 p 5 p 4 …Page requests Is p i in the cache? -Yes Goal: minimize number of faults Traditional cost model Hit: 0 Fault: 1 Hit -No Fault Fetch p i from slow memory, evict one page from cache

Paging Common eviction policies: Least Recently Used (LRU) First In First Out (FIFO) Flush When Full (FWF) Furthest In The Future (FITF) (offline) Marking and conservative algorithms are k-competitive 4

Paging with Cache Usage 5

fault cost cell cost 6

Applications Shared cache multiprocessors 7

Applications Shared cache multiprocessors Cooperative caching 8

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

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

Related Cost Models 11

Related Cost Models Buying Cache Model [Csirik et al. 01] Algorithm may purchase cache at cost c(x) Cost = faults + purchased cache No limit on purchased cache No returns 12

Paging as Interval Scheduling 13

Interval Scheduling

Offline Optimum

Online Algorithms 16

Online Algorithms 17

Online Algorithms p Not quite… 18

For any conservative or marking A k = 10 19

20

21

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

Simulations 23

Cost Ratio k=5 24

Cost Ratio k=7 25

Faults 26

Average Cache Usage 27

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 are competitive in practice Future Work: Deeper lower bound analysis Other online algorithms Applications, e.g., shared cache cooperative strategy Thank you 28

k = 10 29

Paging Cache Memory Hit! Memory 30

Paging Fault! Cache Memory

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 32

Competitive Analysis 33

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 34

Paging Models 35

…,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 36

Interval Scheduling

Interval Scheduling

Interval Scheduling

Offline Optimum 40

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 42

OPT 43

44

45

46

47

Faults k=7 48

Average Cache Usage k=7 49

… … 50

k = 9 51