title
play

Title How FIFO is Your Concurrent FIFO Queue? Andreas Haas , - PowerPoint PPT Presentation

Title How FIFO is Your Concurrent FIFO Queue? Andreas Haas , Christoph M. Kirsch, Michael Lippautz, Hannes Payer University of Salzburg RACES Workshop, October 2012 1/17 Strict vs. Relaxed FIFO Queues strict FIFO queue implementations


  1. Title How FIFO is Your Concurrent FIFO Queue? Andreas Haas , Christoph M. Kirsch, Michael Lippautz, Hannes Payer University of Salzburg RACES Workshop, October 2012 1/17

  2. Strict vs. Relaxed FIFO Queues strict FIFO queue implementations relaxed FIFO queue implementations 2/17

  3. Strict vs. Relaxed FIFO Queues strict FIFO queue implementations relaxed FIFO queue implementations linearizable with respect to strict FIFO queue semantics 2/17

  4. Strict vs. Relaxed FIFO Queues strict FIFO queue implementations relaxed FIFO queue implementations linearizable with respect to linearizable with respect to strict FIFO queue semantics relaxed FIFO queue semantics 2/17

  5. Strict vs. Relaxed FIFO Queues strict FIFO queue implementations relaxed FIFO queue implementations linearizable with respect to linearizable with respect to strict FIFO queue semantics relaxed FIFO queue semantics bounded out-of-order treatment of queue elements possible 2/17

  6. Strict vs. Relaxed FIFO Queues strict FIFO queue implementations relaxed FIFO queue implementations linearizable with respect to linearizable with respect to strict FIFO queue semantics relaxed FIFO queue semantics 5000 4500 operations/ms (more is better) 4000 bounded out-of-order treatment 3500 of queue elements 3000 possible 2500 2000 1500 1000 500 0 2 10 20 30 40 50 60 70 80 number of threads LB MS FC 2/17

  7. Strict vs. Relaxed FIFO Queues strict FIFO queue implementations relaxed FIFO queue implementations linearizable with respect to linearizable with respect to strict FIFO queue semantics relaxed FIFO queue semantics 5000 4500 operations/ms (more is better) 4000 bounded out-of-order treatment 3500 of queue elements 3000 possible 2500 2000 1500 1000 500 0 2 10 20 30 40 50 60 70 80 number of threads LB US k-FIFO (k=80) MS FC 2/17

  8. Strict vs. Relaxed FIFO Queues strict FIFO queue implementations relaxed FIFO queue implementations linearizable with respect to linearizable with respect to strict FIFO queue semantics relaxed FIFO queue semantics 5000 4500 operations/ms (more is better) 4000 bounded out-of-order treatment 3500 of queue elements 3000 possible 2500 2000 1500 1000 500 0 2 10 20 30 40 50 60 70 80 number of threads LB US k-FIFO (k=80) MS RR Scal (p=80) FC 2RA Scal (p=80) 2/17

  9. How FIFO are Relaxed FIFO Queues? Some people say relaxed FIFO queues are not enough FIFO. No applications for relaxed FIFO queues. 3/17

  10. How FIFO are Relaxed FIFO Queues? Some people say relaxed FIFO queues are not enough FIFO. No applications for relaxed FIFO queues. We say relaxed FIFO queue implementations can be even more FIFO than strict FIFO queue implementations. 3/17

  11. Example enq b enq a deq b deq a time 4/17

  12. Example linearization point enq b enq a deq b deq a time 4/17

  13. Example linearization point linearizable enq b enq a deq b deq a time 4/17

  14. Example linearization point linearizable enq b enq a deq b deq a time enq b enq a deq b deq a time 4/17

  15. Example linearization point linearizable enq b enq a deq b deq a time not linearizable enq b enq a deq b deq a time 4/17

  16. Example out-of-order execution of overlapping operations linearization point linearizable enq b enq a deq b deq a time out-of-order treatment of queue elements not linearizable enq b enq a deq b deq a time 4/17

  17. Key Idea Record concurrent histories of various FIFO 1.) queue implementations. 2.) Analyze these concurrent histories using only the invocation times of operations. 5/17

  18. Key Idea Record concurrent histories of various FIFO 1.) queue implementations. 2.) Analyze these concurrent histories using only the invocation times of operations. Ideally operations would take zero time 5/17

  19. Key Idea Record concurrent histories of various FIFO 1.) queue implementations. 2.) Analyze these concurrent histories using only the invocation times of operations. Ideally operations would take zero time Independent of the execution time of operations 5/17

  20. Element-Fairness enq b enq a deq b deq a time 6/17

  21. Element-Fairness enq a enq b deq b deq a time zero-time linearization 6/17

  22. Element-Fairness b a element overtakes element enq a enq b deq b deq a time zero-time linearization 6/17

  23. Element-Fairness b a element overtakes element enq a enq b deq b deq a time zero-time linearization Definition element-fairness = number of overtakings in the zero-time linearization 6/17

  24. Experiments all threads do in parallel for 10.000 iterations { enqueue unique element dequeue element } 7/17

  25. Experiments all threads do in parallel for 10.000 iterations { enqueue unique element calculate Pi dequeue element calculate Pi } 7/17

  26. Experiments all threads do in parallel for 10.000 iterations { enqueue unique element calculate Pi dequeue element calculate Pi } No dequeues in the first 200 iterations to avoid empty checks. No enqueues in the last 200 iterations to empty the queue. 7/17

  27. Element-Fairness per Element 80 threads 1000 element-fairness per element (logscale, less is better) 100 10 1 0.1 0 1000 2000 4000 8000 16000 32000 64000 computational load (logscale) 8/17

  28. Element-Fairness per Element 80 threads 1000 element-fairness per element (logscale, less is better) 100 10 1 0.1 0 1000 2000 4000 8000 16000 32000 64000 computational load (logscale) LB MS FC 8/17

  29. Element-Fairness per Element 80 threads 1000 element-fairness per element (logscale, less is better) 100 10 1 0.1 0 1000 2000 4000 8000 16000 32000 64000 computational load (logscale) LB US k-FIFO (k=80) MS FC 8/17

  30. Element-Fairness per Element 80 threads 1000 element-fairness per element (logscale, less is better) 100 10 1 0.1 0 1000 2000 4000 8000 16000 32000 64000 computational load (logscale) LB US k-FIFO (k=80) MS RR Scal (p=80) FC 2RA Scal (p=80) 8/17

  31. Operation-Fairness Measure the out-of order execution of single operations 9/17

  32. Operation-Fairness Measure the out-of order execution of single operations Observation: Linearization points induce a strict order on the queue operations 9/17

  33. Operation-Fairness Measure the out-of order execution of single operations Observation: Linearization points induce a strict order on the queue operations enq b enq a deq b deq a time 9/17

  34. Operation-Fairness Measure the out-of order execution of single operations Observation: Linearization points induce a strict order on the queue operations enq b enq a deq b deq a time 9/17

  35. enq b enq a

  36. b a operation enq overtakes operation enq enq b enq a

  37. b a operation enq overtakes operation enq enq b enq a Definition operation-fairness = number of overtakings in a concurrent history

  38. Operation-Age and Operation-Lateness Definition age (op) = number of operations op overtakes 10/17

  39. Operation-Age and Operation-Lateness Definition age (op) = number of operations op overtakes age(enq a ) = 0 age(enq b ) = 1 enq b enq a 10/17

  40. Operation-Age and Operation-Lateness Definition age (op) = number of operations op overtakes Definition lateness (op) = number of operations which overtake op age(enq a ) = 0 age(enq b ) = 1 enq b enq a 10/17

  41. Operation-Age and Operation-Lateness Definition age (op) = number of operations op overtakes Definition lateness (op) = number of operations which overtake op age(enq a ) = 0 age(enq b ) = 1 enq b lateness(enq a ) = 1 enq a lateness(enq b ) = 0 10/17

  42. Experiments (2) Only for strict FIFO queue implementations at the moment. Measuring relaxed implementations is future work. 11/17

  43. Experiments (2) Only for strict FIFO queue implementations at the moment. Measuring relaxed implementations is future work. all threads do in parallel for 10.000 iterations { enqueue unique element calculate Pi } 11/17

  44. Experiments (2) Only for strict FIFO queue implementations at the moment. Measuring relaxed implementations is future work. all threads do in parallel for 10.000 iterations { enqueue unique element calculate Pi } one thread does dequeue all elements sequentially 11/17

  45. Maximum Operation-Age 80 threads 100 maximum operation-age (logscale, less is better) 10 1 0 1000 2000 4000 8000 16000 32000 64000 computational load (logscale) LB MS FC 12/17

  46. Maximum Operation-Lateness 80 threads 100000 maximum operation-lateness 10000 (logscale, less is better) 1000 100 10 0 1000 2000 4000 8000 16000 32000 64000 computational load (logscale) LB MS FC 13/17

  47. Number of Overtaking Operations 80 threads % of enqueue operations with operation-age > 0 100 80 (less is better) 60 40 20 0 0 1000 2000 4000 8000 16000 32000 64000 computational load (logscale) LB MS FC 14/17

  48. Number of Overtaken Operations 80 threads % of enqueue operations with operation-lateness > 0 100 80 (less is better) 60 40 20 0 0 1000 2000 4000 8000 16000 32000 64000 computational load (logscale) LB MS FC 15/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