fence insertion
play

Fence-Insertion for Structured Programs Arash Pourdamghani - PowerPoint PPT Presentation

Fence-Insertion for Structured Programs Arash Pourdamghani Mohammad Taheri Mohsen Lesani Spring 2020 University of Vienna Developing a Distributed System! 2 Looking Deeper 357 F(x) .. 385 F(x) 3 Out of Order Execution


  1. Fence-Insertion for Structured Programs Arash Pourdamghani Mohammad Taheri Mohsen Lesani Spring 2020 University of Vienna

  2. Developing a Distributed System! 2

  3. Looking Deeper 357 F(x) ……….. 385 F’(x) 3

  4. Out of Order Execution F’(x) 357 F(x) ↓ ……….. 385 F’(x) F(x) Programmer's Runtime 4 Expectation Execution

  5. Fence Insertion 500 H(x) 357 F(x) 525 H’(x) 385 F’(x) 146 G(x) 912 G’(x) 5

  6. Our Solution 6

  7. Outline Problem Poly-time NP-Hardness Statement Algorithm 7

  8. CFG 8

  9. A Closer Look h F(x) i Some Code k G(x) 9

  10. Maintaining Correctness h F(x) i Some Code k F’(x) 10

  11. Fence Insertion h F(x) i Some Code k F’(x) 11

  12. All Constraints 12

  13. Naive Solution 13

  14. Optimization 14

  15. Outline Problem Poly-time NP-Hardness Statement Algorithm 15

  16. Reduction from Minimum Set Cover 𝑉 = 𝑣 1 , 𝑣 2 , 𝑣 3 , 𝑣 4 , … , u n 𝑇 = 𝑇 1 , 𝑇 2 , … , 𝑇 𝑛 𝐹𝑦𝑏𝑛𝑞𝑚𝑓: 𝑇1 = 𝑣 1 , 𝑣 2 , 𝑣 3 , 𝑇2 = {𝑣 2 , 𝑣 4 } 16

  17. Reduction from Minimum Set Cover 𝑉 = 𝑣 1 , 𝑣 2 , 𝑣 3 , 𝑣 4 , … , u n : Constraint Types, Straight line program with 2n instructions, Constraints with type 𝑣 𝑗 𝑝𝑜 𝑤 𝑗 , 𝑤 2𝑜−𝑗+1 , 2 + 1): The middle edge (𝑤 𝑜 2 , 𝑤 𝑜 17

  18. Reduction from Minimum Set Cover 𝑇 = 𝑇 1 , 𝑇 2 , … : Fence Types We could many fences of 𝑇 𝑗 𝐹𝑦𝑏𝑛𝑞𝑚𝑓: 𝑇1 = 𝑣 1 , 𝑣 2 , 𝑣 3 , 𝑇2 = {𝑣 2 , 𝑣 4 } 18

  19. Given Solution of Fence Insertion 𝑉 = 𝑣 1 , 𝑣 2 , 𝑣 3 , 𝑣 4 , … 𝑇 = {𝑇 1 , 𝑇 2 , … } 19

  20. Given Solution of Minimum Set Cover 𝑉 = 𝑉 1 , 𝑉 2 , 𝑉 3 , 𝑉 4 , … 𝑇 = {𝑇 1 , 𝑇 2 , … } 20

  21. Outline Problem Poly-time NP-Hardness Statement Algorithm 21

  22. P 22

  23. Algorithm Overview 1- Constraint Elimination 2- Finding Diamond 3- Decomposing into Paths 4- Solving for Paths 23

  24. Out of Order Execution! 4- Solving for Paths 1- Constraint Elimination 2- Finding Diamond 2- Finding Diamond 1- Constraint Elimination 3- Decomposing into Paths 3- Decomposing into Paths 4- Solving for Paths 24

  25. A Simple Path 25

  26. A Simple Path 26

  27. A Simple Path 27

  28. A Simple Path 28

  29. A Simple Path 29

  30. Structured 30

  31. A(C)FG 31

  32. Finding Diamonds 32

  33. Level 0 33

  34. Level 1 34

  35. Level 2 35

  36. Branch/Merge 36

  37. Algorithm 37

  38. Algorithm 38

  39. Fence Elimination 39

  40. Passing Constraints 40

  41. Spanning Constraints 41

  42. Control Dependency Preservation 42

  43. Decomposing into simple paths 43

  44. Absorption in a Path 44

  45. Emission in a Path 45

  46. Before 46

  47. After Level 0 47

  48. After Level 1 48

  49. The End! 49

  50. Complexity 1- 𝐹 ∈ 𝑃 𝑊 2-Elimination: 𝑃 𝐷 + 𝑊 3-Finding Diamonds: 𝑃 𝑊𝑚𝑝𝑕𝑊 4-Decompsiton and Insertion: σ |𝑞| |𝐷 𝑞 𝑗 |𝑚𝑝𝑕𝐷 𝑞 𝑗 + |𝑊 𝑞𝑗 | ⇒ Polynomial Time! 50

  51. What about loops? 51

  52. Elimination 52

  53. Transformation 53

  54. Thank you 54

  55. Probabilistic Smart Contracts: Secure Randomness on the Blockchain [ICBC 2019] Propose a novel game-theoretic approach for generating provably unmanipulatable pseudorandom numbers on the blockchain. Hybrid Mining: Exploiting Blockchain's Computational Power for Distributed Problem Solving [SAC 2019] A new mining protocol that combines solving real-world useful problems with Hashcash. 55

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