competitive freshness algorithms for wait free objects
play

Competitive Freshness Algorithms for Wait free Objects Wait-free - PowerPoint PPT Presentation

Competitive Freshness Algorithms for Wait free Objects Wait-free Objects Peter Damaschke, Phuong Ha & Philippas Tsigas Presentation at the Euro-Par 2006 29 th Aug. 1 st Sept. 2006, Dresden, Germany. Introduction Wait-free data objects


  1. Competitive Freshness Algorithms for Wait free Objects Wait-free Objects Peter Damaschke, Phuong Ha & Philippas Tsigas Presentation at the Euro-Par 2006 29 th Aug. – 1 st Sept. 2006, Dresden, Germany.

  2. Introduction Wait-free data objects Modeling the problem Deterministic algorithm Randomized algorithm Concl sions Conclusions • Concurrent data objects – Consistency! Consistency! • Solutions: • Solutions: – Mutual exclusion? ⇒ risks of lock-convoy deadlock & priority inversion � ⇒ risks of lock convoy, deadlock & priority inversion � – Non-blocking synchronization Non blocking synchronization • Wait-free: – every operation is guaranteed to finish in a limited number of steps steps. ⇒ Suitable for real-time systems EuroPar'06 2

  3. Introduction Modeling the problem Freshness Deterministic algorithm Randomized algorithm Concl sions Conclusions • Reactive systems need read-operations that both respond fast and return fresh values W(0) A W(1) B R(0 or 1) C ( ) w 3 sensor 3 e 3 3 w 2 sensor 2 e 2 w 1 sensor 1 e 1 r r 0 CPU 0 e 0 e 0 +d s 0 e 0 +D EuroPar'06 3

  4. Introduction Modeling the problem Earlier work Deterministic algorithm Randomized algorithm Concl sions Conclusions • Freshness in databases • Freshness in caching systems • Freshness for concurrent data objects Freshness for concurrent data objects – single-writer-to-single-reader asynch. comm. EuroPar'06 4

  5. Introduction Modeling the problem Contributions Deterministic algorithm Randomized algorithm Conclusions Concl sions • The first paper that attacks the freshness for multi-writer multi-reader shared objects lti it lti d h d bj t • Competitive freshness – An optimal deterministic algorithm An optimal deterministic algorithm – A nearly-optimal randomized algorithm EuroPar'06 5

  6. Introduction Modeling the problem Road-map Deterministic algorithm Randomized algorithm Concl sions Conclusions • Introduction Introduction • Modeling the problem • Optimal deterministic algorithm Optimal deterministic algorithm • Nearly-optimal randomized algorithm • Conclusions EuroPar'06 6

  7. Introduction Modeling the problem Model Deterministic algorithm Randomized algorithm Concl sions Conclusions • Assumptions: – An upper bound D on operation execution time An upper bound D on operation execution time | (| e | |) k e d = = d d f d f f d f • Freshness Freshness d ( d ) d h | − | e d M M ≤ ≤ d ≤ ≤ ≤ ≤ d ≤ ≤ and and • Constraints • Constraints 1 f f f f M M d d D w 3 sensor 3 e e 3 w 2 sensor 2 e 2 w 1 d : delay, 1 ≤ d ≤ D+1 sensor 1 e 1 e 1 |e | : # fresh values |e d | : # fresh values M : # concurrent writes at e 0 CPU 0 s 0 e 0 e 0 -1+d e 0 +D EuroPar'06 7

  8. Introduction Modeling the problem Freshness as an online game Deterministic algorithm Randomized algorithm Conclusions Concl sions freshness (log) ≤ − ≤ ≤ ≤ ln 0 ln ln ln ln ln M f d D D f M ln D d − ≤ ≤ − ln ln ln ln ln e d f D d − 1 d d Online game: g • player (read operation) vs. X • malicious adversary time (log) time (log) ln D 0 Freshness EuroPar'06 8

  9. Introduction Modeling the problem A deterministic algorithm Deterministic algorithm Randomized algorithm Conclusions Concl sions M f d ≥ Algorithm: The read accepts the first D Analysis: f f f f M f c ≈ 1 ≈ f 2 T c x ln D ln D 2 f / M D T f T f 1 x f T - ε p 2 x f T p p 1 x ln D ln D 0 0 t t ⇒ = = c c D 1 2 EuroPar'06 9

  10. Introduction Modeling the problem Lower bound D Deterministic algorithm Randomized algorithm Concl sions Conclusions • Adversary’s strategy: – Start with c=ln(D)/2 & Start with c ln(D)/2 & f decrease c at unit speed ln D until the player stops. At this time this time, • if c > 0 , c jumps to the max. f 1 • if c ≤ 0 , c keeps decreasing ln D f 2 2 • Case 1 f 1 - p 1 = ln D / 2 p 1 ln D • Case 2: 0 t f 2 - p 2 ≥ ln D / 2 p 2 X p 2 ⇒ Comp. ratio = e (f-p) ≥ D EuroPar'06 10

  11. Introduction Modeling the problem A randomized algorithm Deterministic algorithm Randomized algorithm Concl sions Conclusions • Ideas: – Put a probability on the P t b bilit th f freshness c when it starts to ln D go down. g h • Algorithm g – When c is decreasing, put on a c = 2 / ln p D it a probability – If the game is over (i.e. h=g ), put the rest r on the current c ln D t t 1 0 EuroPar'06 11

  12. Introduction Modeling the problem A randomized algorithm Deterministic algorithm Randomized algorithm Concl sions Conclusions • Competitive ratio ln ln D D → ∞ = ⎯ ⎯ → ⎯ D c + 2 1 ln 2 + + − − 1 1 ln ln 2 2 D • Optimal randomized comp. ratio ( ln D)/2, ( l D)/2 O ti l d i d ti asymptotically (cf. TR-CS-2005:17) EuroPar'06 12

  13. Introduction Modeling the problem Conclusions Deterministic algorithm Randomized algorithm Conclusions Concl sions • The first paper that defines the freshness problem for wait-free data objects. problem for wait-free data objects • Competitive freshness – An optimal deterministic algorithm – A nearly-optimal randomized algorithm • Contributions to the online search problem – New general models New general models EuroPar'06 13

  14. Thank you for your attention! Thank you for your attention!

  15. Introduction Modeling the problem A randomized algorithm Deterministic algorithm Randomized algorithm Concl sions Conclusions ln D = c • Comp. ratio 2 1 + + − 1 ln ln 2 2 lf D ln D • Randomized online search → Randomized online search → g deterministic one-way trading: f – exchanging some fraction of money ≈ stopping the search with money ≈ stopping the search with that probability c • Conventions: – distributed money on axis lf – T(x) : density of exchanged money ln D 0 t ⇒ player’s profit = ∫ (x.T(x)) ( ( )) p y p EuroPar'06 15

  16. Introduction Modeling the problem Randomized algorithm Deterministic algorithm Randomized algorithm Concl sions Conclusions • Ideas: – Exchange /////// when c starts Exchange /////// when c starts to go down. lf ln D g comp. ratio p f a c • Optimal comp. ratio O(ln D) ln D 0 t (cf TR-CS-2005:17) (cf. TR CS 2005:17) EuroPar'06 16

  17. Introduction Modeling the problem Analysis Deterministic algorithm Randomized algorithm Conclusions Concl sions • Let x = f – c (final value) L t f (fi l l ) • Observations: f f – T=2 on [c,f] or c=f – ∑ (gaps with T=0) ≤ r ∑ (gaps with T=0) ≤ r T=2 • Player’s profit x x ⎛ ⎞ + ( ln ) / 2 r D x ⎜ ⎟ ∫ ∫ ∫ ∫ − − − ≥ + + t t t . min 2 2 f f e dt re e dt ⎜ ⎜ ⎟ ⎟ ⎝ ⎠ , r x + r T=0 0 x r worst ⎛ ⎞ 2 > + − ⎜ ⎟ 1 ln 2 f x+r x r ⎝ ⎝ ⎠ ⎠ D D Adversary profit: f.ln D • T=2 ln ln D D ⇒ comp. ratio = ti r + c ln D + − 1 ln 2 2 / D 2 Optimal comp ratio O(ln D) Optimal comp. ratio O(ln D) • • (cf. TR-CS-2005:17) EuroPar'06 17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend