argosy verifying layered storage systems with recovery
play

Argosy: Verifying layered storage systems with recovery refinement - PowerPoint PPT Presentation

Argosy: Verifying layered storage systems with recovery refinement Tej Chajed , Joseph Tassarotti, Frans Kaashoek, Nickolai Zeldovich MIT logical disk disk 1 disk 2 Bob writes a replication system 2 logical disk write 1 write 2 disk 1 disk


  1. Argosy: Verifying layered storage systems with recovery refinement Tej Chajed , Joseph Tassarotti, Frans Kaashoek, Nickolai Zeldovich MIT

  2. logical disk disk 1 disk 2 Bob writes a replication system � 2

  3. logical disk write 1 write 2 disk 1 disk 2 Bob writes a replication system � 2

  4. logical disk write 1 disk 1 disk 2 Bob writes a replication system � 3

  5. ? logical disk write 1 disk 1 disk 2 Bob writes a replication system � 3

  6. ? logical disk write 1 rep_recover disk 1 disk 2 Bob writes a replication system and implements its recovery procedure � 3

  7. ? logical disk write 1 rep_recover recovery restores invariants disk 1 disk 2 Bob writes a replication system and implements its recovery procedure � 3

  8. Bob is careful and writes a 
 machine-checked proof of correctness Disk interface replication read and write are atomic if you run rep_recover after every crash read rep_recover write Two-disk interface � 4

  9. Transactions write-ahead logging … log_recover Disk interface � 5

  10. Transactions write-ahead logging ops are atomic if you run log _recover after every crash … log_recover Disk interface � 5

  11. Transactions write-ahead log logging + ? replication Disk interface replication Two-disk interface � 6

  12. Transactions write-ahead log logging + ? replication Disk interface rep_recover ; log_recover replication Two-disk interface � 6

  13. Challenge: crashes during composed recovery rep_recover under crashes under crashes log_recover how do we prove correctness rep_recover ; log_recover ? under crashes using the existing proofs? � 7

  14. Prior work cannot handle multiple recovery procedures CHL [SOSP ’15] not modular write-ahead log Yggdrasil [OSDI ’16] single recovery replication restricted recovery Flashix [SCP ’16] procedures � 8

  15. Argosy supports modular recovery proofs Transactions developer proves write-ahead log Disk interface replication developer proves Two-disk interface � 9

  16. Argosy supports modular recovery proofs Transactions Argosy write-ahead log proves logging + Disk interface replication replication Two-disk interface � 9

  17. Contributions Recovery refinement for modular proofs � 10

  18. Contributions Recovery refinement for modular proofs CHL for proving recovery refinement see paper Verified example: logging + replication see paper � 10

  19. Contributions Recovery refinement for modular proofs CHL for proving recovery refinement see paper Verified example: logging + replication see paper Machine-checked proofs in Coq see code � 10

  20. Preview: recovery refinement Disk interface 1. Normal execution correctness 
 using refinement replication 2. Crash and recovery correctness 
 using recovery refinement Two-disk interface � 11

  21. Background Refinement � 12

  22. Background Disk interface replication Two-disk interface � 13

  23. Background Disk interface write replication write_impl Two-disk interface write 1 write 2 � 13

  24. Background Disk interface write replication write_impl Two-disk interface write 1 write 2 � 13

  25. Background Disk interface read write replication read_impl write_impl Two-disk interface write 1 write 2 read 1 read 2 � 13

  26. Background Disk interface read write correctness is based on how we use replication : run code using Disk interface on top of two disks replication code read read_impl read_impl write write_impl code_impl write_impl Two-disk interface write 1 write 2 read 1 read 2 � 13

  27. Background Correctness: trace inclusion Disk interface spec’s 
 code behaviors replication ⊇ running code’s code_impl behaviors Two-disk interface � 14

  28. Background Proving correctness with an abstraction relation spec state logical disk 1. developer provides 
 abstraction relation R R disk 1 disk 2 � 15

  29. Background Proving correctness with an abstraction relation spec state logical disk 1. developer provides 
 abstraction relation R R disk 1 write 1 write 2 disk 2 � 15

  30. Background Proving correctness with an abstraction relation spec state write logical disk 1. developer provides 
 abstraction relation R R 2. prove spec execution exists disk 1 write 1 write 2 disk 2 � 15

  31. Background Proving correctness with an abstraction relation spec state write logical disk 1. developer provides 
 abstraction relation R R R 2. prove spec execution exists 3. and abstraction relation is preserved disk 1 write 1 write 2 disk 2 � 15

  32. Recovery refinement � 16

  33. Disk interface read write replication read_impl write_impl Two-disk interface write 1 write 2 read 1 read 2 � 17

  34. Disk interface read write replication read_impl rep_recover write_impl Two-disk interface write 1 write 2 read 1 read 2 � 17

  35. Disk interface read write replication read_impl rep_recover write_impl Two-disk interface write 1 write 2 read 1 read 2 � 17

  36. Extending trace inclusion with recovery code ⊇ Disk interface code_impl replication specification for crash behavior Two-disk interface ⊇ crash & recovery behavior � 18

  37. Extending trace inclusion with recovery code ⊇ Disk interface code_impl replication crash semantics ? specification for crash behavior Two-disk interface ⊇ recovery semantics ? recover crash & recovery behavior � 18

  38. code ⊇ Disk interface one of these code_impl replication | | | := op 1 op 1 op 2 code … Two-disk interface ⊇ recovery semantics ? recover crash & recovery behavior � 19

  39. code ⊇ Disk interface code_impl replication | | | := op 1 op 1 op 2 code … Two-disk interface ⊇ recovery semantics ? recover crash & recovery behavior � 19

  40. code ⊇ Disk interface code_impl replication code Two-disk interface ⊇ code_impl recover � 20

  41. code ⊇ Disk interface code_impl replication code Two-disk interface ⊇ ⋆ code_impl recover recover zero-or-more iterations � 21

  42. code ⊇ Disk interface code_impl replication code Two-disk interface ⊇ ⋆ code_impl recover recover � 21

  43. Trace inclusion, with recovery code ⊇ Disk interface code_impl replication code Two-disk interface ⊇ ⋆ code_impl recover recover � 22

  44. Proving trace inclusion, with recovery ⋆ op1_impl op2_impl recover recover � 23

  45. Proving trace inclusion, with recovery ⋆ op1_impl op2_impl recover recover crash must occur during some operation � 23

  46. Proving trace inclusion, with recovery ⋆ op1_impl op2_impl recover recover � 23

  47. Proving trace inclusion, with recovery op 1 R R ⋆ op1_impl op2_impl recover recover � 23

  48. Proving trace inclusion, with recovery R ⋆ op2_impl recover recover � 23

  49. Proving trace inclusion, with recovery op 2 | R R ⋆ op2_impl recover recover � 23

  50. Recovery refinement non-crash execution crash and recovery execution | op op R R R R ⋆ op_impl recover recover op_impl � 24

  51. Recovery refinement non-crash execution crash and recovery execution | op op R R R R ⋆ op_impl recover recover op_impl Trace inclusion implies specification behavior ⊇ running code behavior � 24

  52. Composition theorem � 25

  53. Kleene algebra for transition relations expression op 1 op 2 op | ⋆ r � 26

  54. Kleene algebra for transition relations expression matching transitions op 1 op 2 op 1 op 2 op | op ⋆ r r r r … � 26

  55. Theorem: recovery refinements compose Transactions write-ahead log … log_recover If Disk interface replication … rep_recover Two-disk interface � 27

  56. Theorem: recovery refinements compose Transactions Transactions write-ahead log … log_recover logging + replication If then Disk interface … rep_recover; log_recover replication … rep_recover Two-disk interface Two-disk interface � 27

  57. Goal: prove composed recovery correct rep_recover under crashes under crashes log_recover rep_recover ; log_recover ? � 28

  58. Goal: prove composed recovery correct rep_recover rep under crashes log_recover under crashes log rep log ; ? � 29

  59. ⋆ rep rep ⋆ log log � 30

  60. ⋆ rep rep ⋆ log log ( ) ⋆ rep rep log rep log | � 30

  61. ⋆ rep rep ⋆ log log ( ) ⋆ rep rep log rep log | how to re-use recovery proofs here? � 30

  62. Using Kleene algebra for reasoning ( ) ⋆ rep rep log rep log | � 31

  63. Using Kleene algebra for reasoning ( ) ⋆ rep rep log rep log | after de-nesting ( p ∣ q ) ⋆ = p ⋆ ( qp ⋆ ) ⋆ � 31

  64. Using Kleene algebra for reasoning ( ) ⋆ rep rep log rep log | after de-nesting ( p ∣ q ) ⋆ = p ⋆ ( qp ⋆ ) ⋆ ⋆ ⋆ ⋆ ( ) = rep log rep rep log rep � 31

  65. Using Kleene algebra for reasoning ( ) ⋆ rep rep log rep log | after de-nesting ( p ∣ q ) ⋆ = p ⋆ ( qp ⋆ ) ⋆ ⋆ ⋆ ⋆ ( ) = rep log rep rep log rep ( pq ) ⋆ p = p ( qp ) ⋆ after sliding rep ( ⋆ ⋆ ) ⋆ = log rep rep rep log � 31

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