Online Algorithms Motivation and Definitions Paging Problem Competitive Analysis Online Load Balancing.

Slides:



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

Coordination Mechanisms for Unrelated Machine Scheduling Yossi Azar joint work with Kamal Jain Vahab Mirrokni.
Online Algorithm Huaping Wang Apr.21
Tight Bounds for Online Class- constrained Packing Hadas Shachnai Bell Labs and The Technion IIT Tami Tamir The Technion IIT.
Optimization Problems in Optical Networks. Wavelength Division Multiplexing (WDM) Directed: Symmetric: Undirected: Optic Fiber.
Online Algorithms Advanced Seminar A Supervisor: Matya Katz Ran Taig, Achiya Elyasaf December, 2009.
1 SOFSEM 2007 Weighted Nearest Neighbor Algorithms for the Graph Exploration Problem on Cycles Eiji Miyano Kyushu Institute of Technology, Japan Joint.
Optimization Problems in Optical Networks. Wavelength Division Multiplexing (WDM) Directed: Symmetric: Optic Fiber.
Online Algorithms Amrinder Arora Permalink:
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Online Scheduling with Known Arrival Times Nicholas G Hall (Ohio State University) Marc E Posner (Ohio State University) Chris N Potts (University of Southampton)
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Competitive Analysis.
An Optimal Lower Bound for Buffer Management in Multi-Queue Switches Marcin Bieńkowski.
Dynamic Wavelength Allocation in All-optical Ring Networks Ori Gerstel and Shay Kutten Proceedings of ICC'97.
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.
Combinatorial Algorithms
Greedy Algorithms Basic idea Connection to dynamic programming Proof Techniques.
Advanced Topics in Algorithms and Data Structures Lecture 7.1, page 1 An overview of lecture 7 An optimal parallel algorithm for the 2D convex hull problem,
1 Competitive analysis of the LRFU paging algorithm Edith Cohen -- AT&T Haim Kaplan -- Tel Aviv Univ. Uri Zwick -- Tel Aviv Univ.
CS 345 Data Mining Online algorithms Search advertising.
Providing Performance Guarantees in Multipass Network Processors Isaac KeslassyKirill KoganGabriel ScalosubMichael Segal EE, TechnionCISCO & CSE, BGU.
1 Ecole Polytechnque, Nov 7, 2007 Scheduling Unit Jobs to Maximize Throughput Jobs:  all have processing time (length) = 1  release time r j  deadline.
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
Packet Scheduling with Bounded Buffers A router can send one packet at a time Arriving packets must be queued in a finite buffer B (though we often ignore.
CS 345 Data Mining Online algorithms Search advertising.
Ecole Polytechnique, Nov 7, Online Job Scheduling Marek Chrobak University of California, Riverside.
Evaluation of Algorithms for the List Update Problem Suporn Pongnumkul R. Ravi Kedar Dhamdhere.
Competitive Paging Algorithms Amos Fiat, Richard Karp, Michael Luby, Lyle McGeoch, Daniel Sleator, Neal Young presented by Seth Phillips.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
Priority Models Sashka Davis University of California, San Diego June 1, 2003.
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
Paging for Multi-Core Shared Caches Alejandro López-Ortiz, Alejandro Salinger ITCS, January 8 th, 2012.
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
Minimizing Cache Usage in Paging Alejandro Salinger University of Waterloo Joint work with Alex López-Ortiz.
Load Balancing Tasks with Overlapping Requirements Milan Vojnovic Microsoft Research Joint work with Dan Alistarh, Christos Gkantsidis, Jennifer Iglesias,
Called as the Interval Scheduling Problem. A simpler version of a class of scheduling problems. – Can add weights. – Can add multiple resources – Can ask.
Competitive On-Line Admission Control and Routing By: Gabi Kliot Presentation version.
Throughput Competitive Online Routing Baruch Awerbuch Yossi Azar Serge Plotkin.
Yossi Azar Tel Aviv University Joint work with Ilan Cohen Serving in the Dark 1.
Great Theoretical Ideas in Computer Science.
Approximation schemes Bin packing problem. Bin Packing problem Given n items with sizes a 1,…,a n  (0,1]. Find a packing in unit-sized bins that minimizes.
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.
Great Theoretical Ideas in Computer Science.
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.
Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin.
Minimizing Cache Usage in Paging Alejandro López-Ortiz, Alejandro Salinger University of Waterloo.
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.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
Competitive Queue Policies for Differentiated Services Seminar in Packet Networks1 Competitive Queue Policies for Differentiated Services William.
Course Title: “Operating System” Chapter No: 04 “Process Scheduling” Course Instructor: ILTAF MEHDI IT Lecturer, MIHE, Kart-i Parwan, Kabul.
Jennifer Campbell November 30,  Problem Statement and Motivation  Analysis of previous work  Simple - competitive strategy  Near optimal deterministic.
Instructor Neelima Gupta Table of Contents Factor 2 algorithm for Bin Packing Factor 2 algorithm for Minimum Makespan Scheduling Reference:
A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉.
Loss-Bounded Analysis for Differentiated Services. By Alexander Kesselman and Yishay Mansour Presented By Sharon Lubasz
CS425: Algorithms for Web Scale Data Most of the slides are from the Mining of Massive Datasets book. These slides have been modified for CS425. The original.
1 Chapter 5-1 Greedy Algorithms Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
© The McGraw-Hill Companies, Inc., Chapter 12 On-Line Algorithms.
Non-Preemptive Buffer Management for Latency Sensitive Packets Moran Feldman Technion Seffi Naor Technion.
Saket Mengle Paging refers to the process of managing program access to virtual memory pages that do not currently reside in RAM.
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.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
Greedy Method 6/22/2018 6:57 PM Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.
Exercise 3.10 Prove Theorem 3.8 R(ALG) >= k(s+1)/(k+s) Solution:
Greedy Algorithms / Caching Problem Yin Tat Lee
A new and improved algorithm for online bin packing
Greedy Algorithms: Homework Scheduling and Optimal Caching
Greedy Algorithms / Caching Problem Yin Tat Lee
Exercise (11).
An Optimal Lower Bound for Buffer Management in Multi-Queue Switches
Presentation transcript:

Online Algorithms Motivation and Definitions Paging Problem Competitive Analysis Online Load Balancing

Motivation In many settings, an algorithm needs to make a decision “online” without complete knowledge of the input. For example, when a page fault occurs, the virtual memory system must decide on a page to evict without knowing what future requests will be We model this lack of knowledge of the future by defining the concept of online problems

Definition Optimization problem  –Goal is to minimize or maximize some cost/value Input is given as a sequence of requests σ –σ 1, σ 2, … An algorithm A must service request σ i without knowledge of future requests (including whether or not there are more requests) A(σ) represents the cost of using algorithm A to service sequence σ

Example: Paging Problem Setting –We have k fast memory pages and an infinite number of slow memory pages –Input: A sequence of requests for slow memory pages If the page currently also resides in fast memory (hit), we can service this page with 0 cost If the page only resides in slow memory (fault), we must bring the page into fast memory and evict a page currently in fast memory for cost 1 –Goal: Process the requests with minimum cost.

The offline version of the problem Suppose we knew the entire request sequence in advance. What is the optimal way to handle any page fault? –2 fast memory pages –σ =1, 3, 1, 2, 1, 3, 2, 3, 1, 3, 1, 2, 2, 1, 3, 2

Worst-case Analysis of Online Algorithms What are some natural online algorithms we can define for this problem? Show that for every online algorithm A, there exists a request sequence σ A such that A performs poorly on σ A What does this imply about using this form of worst-case analysis for online algorithms? What is a good online algorithm for the paging problem given this performance metric?

Competitive Analysis Let A(σ) denote algorithm A’s cost on input sequence σ Let Opt(σ) denote the optimal algorithm’s cost on input sequence σ We say that algorithm A is c-competitive if for any sequence σ and some constant b, A(σ) ≤ c Opt(σ) + b –Essentially that A(s)/Opt(s) ≤ c The competitive ratio c A is the infimum of {c | A is c- competitive}. The optimal competitive ratio for a problem is –infimum A c A

2 example online algorithms Consider the following two algorithms –MRU (evict the most recently used page) –LRU (evict the least recently used page) Consider a scenario with 2 fast memory pages and the following request sequences –σ 1 = 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, … –σ 2 = 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, … –What is LRU(σ 1 )/OPT(σ 1 ) ? MRU(σ 1 )/OPT(σ 1 ) ? –What is LRU(σ 2 )/OPT(σ 2 ) ? MRU(σ 2 )/OPT(σ 2 ) ?

General questions Show that for any online algorithm A, there exists a request sequence σ A such that A faults on every request of σ A while OPT faults on at most /k requests of σ A where there are k fast memory pages and there are k+1 slow memory pages What does this result imply about the best possible competitive ratio of any online algorithm for the paging problem. How can we try to show that LRU achieves this competitive ratio?

Example: Online Load Balancing Setting –We have m identical machines –Input: A sequence of jobs with loads σ i We must assign each job to a machine before the next job arrives –Goal: Assign jobs to machines so that the maximum load on any machine is minimized

The offline version of the problem Suppose we knew the entire request sequence in advance. Consider the following problem instance: –2 machines –σ =1, 7, 9, 12, 15, 7, 9 What is optimal solution for this instance? What can you say about the hardness of this offline problem?

Online Algorithms and Questions What is an obvious greedy strategy for this problem? Consider the following two lower bounds on OPT(σ) –OPT(σ) ≥ max i σ i (largest job is on some machine) –OPT(σ) ≥ Σ i σ i /m (at best total load is divided evenly) Prove that the greedy strategy has a competitive ratio of 2 – 1/m –Consider the last job j placed on the max loaded machine for greedy –Greedy(σ) = h, the load of the machine before job j, + σ j –Using the lower bound above, argue that Greedy(σ) ≤ (2-1/m) OPT(σ) Find specific input instances σ where Greedy(σ) = (2-1/m) OPT(σ) for m=2 and 3. For these input instances, could any online algorithm do better? Argue why not.