Alternative Models for Online Analysis Alex López-Ortiz University of Waterloo joint work with Reza...

20
Alternative Models for Online Analysis Alex López-Ortiz University of Waterloo joint work with Reza Dorrigiv, Spyros Angelopoulos and Ian Munro

Transcript of Alternative Models for Online Analysis Alex López-Ortiz University of Waterloo joint work with Reza...

Alternative Models for Online Analysis

Alex López-Ortiz

University of Waterloo

joint work with Reza Dorrigiv,

Spyros Angelopoulos and Ian Munro

Competitive analysis drawbacks

• Sometimes too pessimistic

• Focus on worst case at the expense of every-day case

• Uses off-line optimum concept

• Perhaps one of the reasons for the theoretical vs practical motion planning divide?

Paging: A case study

• One of the earliest problems to be studied under the online model

• Competitive analysis not always satisfactory, too pessimistic

• A good starting point for considering alternatives

• “Real life” inputs well understood and characterized (temporal + spatial locality)

Paging Algorithms

• Data brought from slower memory into cache

RAM

CPU

Paging Algorithms

• Data brought from slower memory into cache

• Unit of transfer: pages of equal size

• Paging algorithm ≡ Eviction policy

• Commonly studied under competitive ratio framework

• All lazy marking algorithms are “optimal”

Theory

1. Commonly studied under competitive ratio framework

2. Worst case analysis3. Marking algorithms optimal4. In practice LRU is best5. LFD is offline optimal6. Competitive ratio is k 7. User is malicious adversary

Systems

1. Commonly studied using fault rate measure

2. Typical case analysis3. LRU and friends is best4. LRU is impractical5. Huh?6. Competitive ratio is 2 or 37. User is your friend

Online motion planning

1. Commonly studied under competitive ratio framework

2. Worst case analysis3. Continuous curved motions4. Perfect scans 5. Flawless detection6. No error in motion7. Architects are your enemy

Robotics

1. Commonly studied using distance & scan cost

2. Typical case analysis3. Piecewise linear 4. Scanning error5. High detection error 6. Forward & rotational lag 7. Architects are your friend

“Architects are your friend”

Most of the time, anyhow.

Fix the Theory-Practice disconnect

1. Make both columns match

How?

• Fix reality

or

• Fix the model

A more realistic theoretical model is likely to lead to practical insights

Previous work (paging case)1. Disconnect has been noted before.

2. Has been subject of intense study, viz.

1. Borodin et al. 2. Karlin et al. 3. Koutsoupias and Papadimitriou4. Sleator and Tarjan5. Denning6. Young 7. Albers et al.8. Boyar et al. + many others

Theory

1. Commonly studied under competitive ratio framework

2. Worst case analysis3. Marking algorithms optimal4. In practice LRU is best5. LFD is offline optimal6. Competitive ratio is k 7. User is malicious adversary

Systems

1. Commonly studied using fault rate measure

2. Typical case analysis3. LRU and friends is best4. LRU is impractical5. Huh?6. Competitive ratio is 2 or 37. User is your friend

Results

1. competitive ratio framework/fault rate framework

– new model which incorporates fault rate considerations (concave analysis)

2. worst case analysis/typical case analysis– model focuses on “every-case” analysis, not

just worst case (bijective analysis)

Results

• marking algorithms optimal/LRU and friends is best

– LRU is unique optimum under new model

• in practice LRU is best/LRU is impractical

– initiated study of computationally limited caching strategies

Results

• LFD is offline optimal/huh?– removed concept of offline optimum

• competitive ratio is k/competitive ratio is 2 or 3

– Nothing to do!

Results• user is malicious adversary/user is your

friend– incorporated assumption of locality of

reference in our analysis

Applies to other online problems e.g. list access

This leads to a new notion called cooperative ratio

Cooperative ratio

• Agreement between user and algorithm about inputs which are:

– likely– common– good– important

Cooperative ratio

• Badly written code (not cache conscious)– (Rightly) considered the programmer’s fault – Paging strategy not responsible for

predicting non-standard paging behaviour

• Well written code (cache conscious)– Code can rely on well defined paging

behaviour to produce better code (e.g. I/O model, cache oblivious model)

Cooperative ratio for motion planning

• Robot must search efficiently scenes which are “reasonable”

• Can perform somewhat worse in “unreasonable” scenes

• Leads to adaptive-style analysis. E.g. define niceness measure of office floor plan in terms of orthogonality of scene, number of rooms/corridors, size of smallest relevant feature, etc.

Cooperative ratio for motion planning

• Look around the corner

• Leads to “straighter” curve

• Applicable to polygon recognition (work in progress)

Conclusions

• Improved model for paging

• Bridged theory-practice disconnect

• Next talk: Unique optimality of LRU under new, more realistic model

• New cooperative analysis model applicable to online research