Online Paging Algorithm By: Puneet C. Jain Bhaskar C. Chawda Yashu Gupta Supervisor: Dr. Naveen Garg, Dr. Kavitha Telikepalli.

Slides:



Advertisements
Similar presentations
Online Algorithm Huaping Wang Apr.21
Advertisements

§12.4 Static Paging Algorithms
Tight Bounds for Online Class- constrained Packing Hadas Shachnai Bell Labs and The Technion IIT Tami Tamir The Technion IIT.
Online Algorithms Advanced Seminar A Supervisor: Matya Katz Ran Taig, Achiya Elyasaf December, 2009.
How to Schedule a Cascade in an Arbitrary Graph F. Chierchetti, J. Kleinberg, A. Panconesi February 2012 Presented by Emrah Cem 7301 – Advances in Social.
ARC: A SELF-TUNING, LOW OVERHEAD REPLACEMENT CACHE
Outperforming LRU with an Adaptive Replacement Cache Algorithm Nimrod megiddo Dharmendra S. Modha IBM Almaden Research Center.
Lower bound: Decision tree and adversary argument
Congestion Games with Player- Specific Payoff Functions Igal Milchtaich, Department of Mathematics, The Hebrew University of Jerusalem, 1993 Presentation.
Study Group Randomized Algorithms 21 st June 03. Topics Covered Game Tree Evaluation –its expected run time is better than the worst- case complexity.
Online Algorithms Amrinder Arora Permalink:
Online Scheduling with Known Arrival Times Nicholas G Hall (Ohio State University) Marc E Posner (Ohio State University) Chris N Potts (University of Southampton)
Bounds on Code Length Theorem: Let l ∗ 1, l ∗ 2,..., l ∗ m be optimal codeword lengths for a source distribution p and a D-ary alphabet, and let L ∗ be.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Competitive Analysis.
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
Online Algor ithm Paging and Caching. Caching (paging) Structure of data storage Cache memory : Static RAM Level 1 Cache Level 2 Cache Main memory Hard.
1 Competitive analysis of the LRFU paging algorithm Edith Cohen -- AT&T Haim Kaplan -- Tel Aviv Univ. Uri Zwick -- Tel Aviv Univ.
Evaluation of Algorithms for the List Update Problem Suporn Pongnumkul R. Ravi Kedar Dhamdhere.
CPSC 668Set 5: Synchronous LE in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 12 June 18, 2006
Dynamic Power Management for Systems with Multiple Power Saving States Sandy Irani, Sandeep Shukla, Rajesh Gupta.
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.
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
The k-server Problem Study Group: Randomized Algorithm Presented by Ray Lam August 16, 2003.
Ecole Polytechnique, Nov 7, Online Job Scheduling Marek Chrobak University of California, Riverside.
Competitive Analysis of Incentive Compatible On-Line Auctions Ron Lavi and Noam Nisan SISL/IST, Cal-Tech Hebrew University.
Week 2: Greedy Algorithms
Competitive Paging Algorithms Amos Fiat, Richard Karp, Michael Luby, Lyle McGeoch, Daniel Sleator, Neal Young presented by Seth Phillips.
Game Theory.
Priority Models Sashka Davis University of California, San Diego June 1, 2003.
Paging for Multi-Core Shared Caches Alejandro López-Ortiz, Alejandro Salinger ITCS, January 8 th, 2012.
Improved results for a memory allocation problem Rob van Stee University of Karlsruhe Germany Leah Epstein University of Haifa Israel WADS 2007 WAOA 2007.
Minimizing Cache Usage in Paging Alejandro Salinger University of Waterloo Joint work with Alex López-Ortiz.
1/24 Algorithms for Generalized Caching Nikhil Bansal IBM Research Niv Buchbinder Open Univ. Israel Seffi Naor Technion.
Ch. 8 & 9 – Linear Sorting and Order Statistics What do you trade for speed?
Called as the Interval Scheduling Problem. A simpler version of a class of scheduling problems. – Can add weights. – Can add multiple resources – Can ask.
International Graduate School of Dynamic Intelligent Systems, University of Paderborn Improved Algorithms for Dynamic Page Migration Marcin Bieńkowski.
Yossi Azar Tel Aviv University Joint work with Ilan Cohen Serving in the Dark 1.
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.
Online Algorithms By: Sean Keith. An online algorithm is an algorithm that receives its input over time, where knowledge of the entire input is not available.
1 Online algorithms Typically when we solve problems and design algorithms we assume that we know all the data a priori. However in many practical situations.
Minimizing Stall Time in Single Disk Susanne Albers, Naveen Garg, Stefano Leonardi, Carsten Witt Presented by Ruibin Xu.
CSE 5314 On-line Computation Homework 1 Wook Choi Feb/26/2004.
Probabilistic Analysis and Randomized Algorithm. Average-Case Analysis  In practice, many algorithms perform better than their worse case  The average.
Jennifer Campbell November 30,  Problem Statement and Motivation  Analysis of previous work  Simple - competitive strategy  Near optimal deterministic.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 5: Synchronous LE in Rings 1.
A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉.
1. 2 You should know by now… u The security level of a strategy for a player is the minimum payoff regardless of what strategy his opponent uses. u A.
1 Chapter 5-1 Greedy Algorithms Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
International Graduate School of Dynamic Intelligent Systems, University of Paderborn Fighting Against Two Adversaries: Page Migration in Dynamic Networks.
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):
11 -1 Chapter 12 On-Line Algorithms On-Line Algorithms On-line algorithms are used to solve on-line problems. The disk scheduling problem The requests.
Adversarial Search 2 (Game Playing)
CSE 421 Algorithms Richard Anderson Lecture 8 Greedy Algorithms: Homework Scheduling and Optimal Caching.
CSE 5314 – Spring 2004 Homework #1 - Solutions [Soumya Sanyal] Q 1.5: Prove that the algorithm “MTF every-other-access” (i.e. move the item to the front.
Clustering Data Streams A presentation by George Toderici.
Computer Architecture
Streaming & sampling.
Greedy Algorithms / Caching Problem Yin Tat Lee
Enumerating Distances Using Spanners of Bounded Degree
Richard Anderson Autumn 2015 Lecture 8 – Greedy Algorithms II
A new and improved algorithm for online bin packing
Greedy Algorithms: Homework Scheduling and Optimal Caching
Greedy Algorithms / Caching Problem Yin Tat Lee
Page Replacement FIFO, LIFO, LRU, NUR, Second chance
Richard Anderson Autumn 2016 Lecture 8 – Greedy Algorithms II
Richard Anderson Autumn 2019 Lecture 8 – Greedy Algorithms II
Presentation transcript:

Online Paging Algorithm By: Puneet C. Jain Bhaskar C. Chawda Yashu Gupta Supervisor: Dr. Naveen Garg, Dr. Kavitha Telikepalli

Topics 1. Introduction to paging algorithms 2. Definition of competitiveness 3. Randomized online algorithms 4. Oblivious adversary

PAGING PROBLEM DESCRIPTION A processor requests a piece of data item from a local cache.  Cache size The cache can hold at most k items.  Cache hit The item requested is located in the cache, no cost for data access.  Cache miss The item requested is not located in the cache. The item will be fetched from the main memory at one unit cost and evict one existent item in cache to make room for the new comer.  Cost measure The number of misses on a sequence of requests. A paging algorithm will decide which k items to retain in the cache in order to minimize the miss rate.

PAGING ALGORITHMS Category of algorithms: Offline algorithms generates optimal solution given the input of complete information. Online algorithms makes decision given the input of information up to time. No future information is available at the decision moment. Realistic paging algorithms are online because future memory access information is not given at the time of cache line eviction. Online deterministic algorithms:  LRU cache evicts the Least Recently Used item.  FIFO cache evicts the oldest item.  LFU cache evicts the Least Frequently Used item. Offline optimal algorithm MIN: cache evicts the item whose next request occurs furthest in the given sequence. It has been proved to be optimal among all offline algorithms.

Formal Model Definitions: A  online algorithm O  offline optimal algorithm Sn = (p1,p2,p3,p4….pn) a sequence of requests of length n fA(Sn) number of times A misses on sequence Sn fO(Sn) number of times O misses on sequence Sn Some conclusions:  Theorem 1. For any deterministic online algorithm A, there is always a sequence resulting the miss rate 100%  Theorem 2. If the memory is of size k + 1, MIN misses no more than N=k times on any sequence of length N.

Upper Bound For MIN Proof. Suppose initially k items in a cache. Only one item in the memory is not in the cache. The first miss will occur when the request refers to the one not in cache. Claim the worst case sequence of requests be the one evicted by MIN located at k + 1th position in sequence. According to MIN, it won’t be requested during the next (k – 1) accesses. Since the size of cache is k, the rest k -1 items are still located in the cache. No miss will occur. If this request pattern repeats, MIN will have 1 miss on every k requests. Therefore the total miss on N items is N/k. Then we show that worst case sequence actually results the maximum miss rate. It is impossible to construct a sequence such that the one evicted is located at ≤ kth position because k - 1 items in cache will not all show up in a sequence of k - 2. If the one evicted is located ≥ k + 1, fewer misses will result. Therefore, miss rate N/k is the worst case for MIN.

DEFINITION OF COMPETITIVENESS Definition 1. An algorithm A is C - competitive if there exists a constant b such that for all sequence Sn, fA(Sn) - CfO(Sn) ≤ b Denote the competitiveness coefficient CA be the infimum of C. Note that b is not related to N. Competitiveness is a measurement of the effectiveness of an online algorithm. Consider the online algorithm and the offline algorithm is a pair of player in a game. The goal of A is to minimize C by reducing fA(.) while O acts as an opponent to hinder A’s minimization by reducing fO(.). Consider CA be the best strategy A could ever had to beat O.

DEFINITION OF COMPETITIVENESS Theorem 3. For any deterministic online algorithm A, CA ≥ k. Proof. It trivially follows the result of Theorem 2. A sequence can be constructed such that A misses N times. However, N/k is the smallest misses O could ever have among all worst case sequences because worse case miss rate is proportional to the memory size. N – C(N/k) ≤ b holds for all sequences since fA ≤ N and fO ≥ N/k as largest lower bound. Since b is a constant independent to N, CA ≥ k.

RANDOMIZED ONLINE ALGORITHMS  A randomized algorithm makes random choice for each step from all deterministic algorithms in some probability distribution. R  Denote a randomized algorithm, the number of misses on Sn is a random variable fR(Sn).

ADVERSARIES Consider adversaries are opponents offline algorithm O who plays “minimize competitiveness games” with a randomized online algorithm. Adversaries are categorized by powerfulness. Oblivious adversary has no knowledge of the random choices made by R. Consider a game such that O makes all choices before R make any choice. Of course, R will never “see” O’s choices since it is an online algorithm. Adaptive adversary determines its strategy based on the past choices made by A.  Online adversary makes choices step by step as R makes choices.  Offline adversary makes choices after R finishes all choices over a sequence. It is most powerful.

Random Marking Paging Algo  It works as follows: Initially all the pages in the cache are unmarked. Upon request of page p: p is in the cache  mark P p is not in the cache  if all the pages in the cache are marked then unmark all the pages and start afresh. Evist a uniformly chosen random unmarked page. Fetch p and mark p.

References  [1] R. Motwani and P. Raghavan, Randomized Algorithms, 1995