The Art of Multiprocessor Programming Copyright 2007 Elsevier Inc

Total Page:16

File Type:pdf, Size:1020Kb

The Art of Multiprocessor Programming Copyright 2007 Elsevier Inc The Art of Multiprocessor Programming Copyright 2007 Elsevier Inc. All rights reserved Maurice Herlihy Nir Shavit October 3, 2007 DRAFT COPY 2 DRAFT COPY Contents 1 Introduction 13 1.1SharedObjectsandSynchronization.............. 16 1.2AFable.............................. 19 1.2.1 PropertiesofMutualExclusion............. 21 1.2.2 TheMoral......................... 22 1.3TheProducer-ConsumerProblem................ 23 1.4TheReaders/WritersProblem.................. 26 1.5TheHarshRealitiesofParallelization............. 27 1.6Missive.............................. 29 1.7ChapterNotes.......................... 30 1.8Exercises............................. 30 Principles 35 2 Mutual Exclusion 37 2.1Time................................ 37 2.2CriticalSections......................... 38 2.3Two-ThreadSolutions...................... 41 2.3.1 The LockOne Class.................... 41 2.3.2 The LockTwo Class.................... 43 2.3.3 ThePetersonLock.................... 44 2.4TheFilterLock..........................DRAFT COPY 46 2.5Fairness.............................. 49 2.6Lamport’sBakeryAlgorithm.................. 49 2.7 Bounded Timestamps . ................ 51 2.8 Lower Bounds on Number of Locations . ...... 56 2.9ChapterNotes.......................... 60 2.10Exercises............................. 60 3 4 CONTENTS 3 Concurrent Objects 67 3.1ConcurrencyandCorrectness.................. 67 3.2SequentialObjects........................ 71 3.3QuiescentConsistency...................... 72 3.3.1 Remarks.......................... 74 3.4SequentialConsistency...................... 75 3.4.1 Remarks.......................... 76 3.5 Linearizability . ......................... 79 3.5.1 LinearizationPoints................... 79 3.5.2 Remarks.......................... 79 3.6FormalDefinitions........................ 80 3.6.1 Linearizability . .................. 81 3.6.2 Linearizability is Compositional . ........ 82 3.6.3 TheNon-BlockingProperty............... 83 3.7ProgressConditions....................... 84 3.7.1 DependentProgressConditions............. 85 3.8TheJavaMemoryModel.................... 86 3.8.1 LocksandSynchronizedBlocks............. 88 3.8.2 VolatileFields...................... 88 3.8.3 FinalFields........................ 89 3.9Remarks.............................. 90 3.10ChapterNotes.......................... 91 3.11Exercises............................. 91 4 Foundations of Shared Memory 97 4.1TheSpaceofRegisters...................... 98 4.2RegisterConstructions......................104 4.2.1 MRSWSafeRegisters..................105 4.2.2 ARegularBooleanMRSWRegister..........105 4.2.3 A regular M-valuedMRSWregister...........106 4.2.4 AnAtomicSRSWRegister...............109 4.2.5 AnAtomicMRSWRegister...............112 DRAFT4.2.6 AnAtomicMRMWRegister..............115 COPY 4.3AtomicSnapshots........................117 4.3.1 AnObstruction-freeSnapshot..............117 4.3.2 AWait-FreeSnapshot..................119 4.3.3 CorrectnessArguments.................119 4.4ChapterNotes..........................121 4.5Exercises.............................122 CONTENTS 5 5 The Relative Power of Primitive Synchronization Opera- tions 133 5.1ConsensusNumbers.......................134 5.1.1 StatesandValence....................135 5.2AtomicRegisters.........................138 5.3ConsensusProtocols.......................140 5.4FIFOQueues...........................141 5.5MultipleAssignmentObjects..................145 5.6Read-Modify-WriteOperations.................148 5.7Common2RMWOperations..................150 5.8 The compareAndSet() Operation................152 5.9ChapterNotes..........................154 5.10Exercises.............................155 6 Universality of Consensus 163 6.1Introduction............................163 6.2Universality............................164 6.3ALock-freeUniversalConstruction...............165 6.4AWait-freeUniversalConstruction...............169 6.5ChapterNotes..........................176 6.6Exercises.............................176 Practice 179 7 Spin Locks and Contention 181 7.1WelcometotheRealWorld...................181 7.2Test-and-SetLocks........................185 7.3TAS-BasedSpinLocksRevisited................188 7.4ExponentialBackoff.......................190 7.5QueueLocks...........................192 7.5.1 Array-BasedLocks....................192 7.5.2 TheCLHQueueLock..................193 7.5.3 TheMCSQueueLock..................197 7.6AQueueLockwithTimeouts..................200DRAFT COPY 7.7ACompositeLock........................203 7.7.1 AFast-PathCompositeLock..............210 7.8HierarchicalLocks........................212 7.8.1 AHierarchicalBackoffLock...............213 7.8.2 AHierarchicalCLHQueueLock............214 7.9OneLockToRuleThemAll..................220 6 CONTENTS 7.10ChapterNotes..........................220 7.11Exercises.............................221 8 Monitors and Blocking Synchronization 223 8.1Introduction............................223 8.2MonitorLocksandConditions.................224 8.2.1 Conditions........................225 8.2.2 TheLost-WakeupProblem...............228 8.3Readers-WritersLocks......................231 8.3.1 SimpleReaders-WritersLock..............231 8.3.2 FairReaders-WritersLock................232 8.4AReentrantLock.........................234 8.5Semaphores............................237 8.6ChapterNotes..........................239 8.7Exercises.............................240 9 Linked Lists: the Role of Locking 245 9.1Introduction............................245 9.2List-basedSets..........................246 9.3ConcurrentReasoning......................248 9.4Coarse-GrainedSynchronization................250 9.5Fine-GrainedSynchronization..................252 9.6OptimisticSynchronization...................257 9.7LazySynchronization......................261 9.8ALock-FreeList.........................267 9.9Discussion.............................272 9.10ChapterNotes..........................274 9.11Exercises.............................274 10 Concurrent Queues and the ABA Problem 277 10.1Introduction............................277 10.2Queues...............................279 10.3 A Bounded Partial Queue . ..................279 DRAFT10.4 An Unbounded Total Queue . ..................285COPY 10.5 An Unbounded Lock-Free Queue . ........286 10.6MemoryreclamationandtheABAproblem..........290 10.6.1 A Na¨ıveSynchronousQueue..............294 10.7DualDataStructures......................296 10.8ChapterNotes..........................299 10.9Exercises.............................299 CONTENTS 7 11 Concurrent Stacks and Elimination 303 11.1Introduction............................303 11.2 An Unbounded Lock-free Stack . ................303 11.3Elimination............................304 11.4TheEliminationBackoffStack.................305 11.4.1ALock-freeExchanger..................308 11.4.2TheEliminationArray..................311 11.5ChapterNotes..........................314 11.6Exercises.............................315 12 Counting, Sorting, and Distributed Coordination 321 12.1Introduction............................321 12.2SharedCounting.........................321 12.3SoftwareCombining.......................322 12.3.1Overview.........................323 12.3.2AnExtendedExample..................330 12.3.3PerformanceandRobustness..............333 12.4Quiescently-ConsistentPoolsandCounters..........333 12.5CountingNetworks........................334 12.5.1Networksthatcount...................334 12.5.2TheBitonicCountingNetwork.............337 12.5.3PerformanceandPipelining...............345 12.6DiffractingTrees.........................348 12.7ParallelSorting..........................353 12.8SortingNetworks.........................354 12.8.1DesigningaSortingNetwork..............354 12.9SampleSorting..........................357 12.10DistributedCoordination....................360 12.11ChapterNotes..........................361 12.12Exercises.............................362 13 Concurrent Hashing and Natural Parallelism 367 13.1Introduction............................367 13.2Closed-AddressHashSets....................368DRAFT COPY 13.2.1ACoarse-GrainedHashSet...............371 13.2.2AStripedHashSet....................373 13.2.3ARefinableHashSet..................376 13.3ALock-freeHashSet.......................379 13.3.1RecursiveSplit-ordering.................379 13.3.2 The BucketListclass...................383 8 CONTENTS 13.3.3 The LockFreeHashSet<T> class.............385 13.4AnOpen-AddressedHashSet..................388 13.4.1CuckooHashing.....................389 13.4.2ConcurrentCuckooHashing...............390 13.4.3StripedConcurrentCuckooHashing..........395 13.4.4 A Refinable Concurrent Cuckoo Hash Set . 395 13.5ChapterNotes..........................396 13.6Exercises.............................396 14 Skiplists and Balanced Search 405 14.1Introduction............................405 14.2SequentialSkiplists........................406 14.3ALock-BasedConcurrentSkiplist...............407 14.3.1ABird’sEyeView....................407 14.3.2TheAlgorithm......................410 14.4ALock-FreeConcurrentSkiplist................417 14.4.1ABird’sEyeView....................417 14.4.2TheAlgorithminDetail.................420 14.5ConcurrentSkiplists.......................426 14.6ChapterNotes..........................428 14.7Exercises.............................429 15 Priority Queues 433 15.1Introduction............................433 15.1.1ConcurrentPriorityQueues...............434 15.2 An Array-Based Bounded Priority Queue . ........434 15.3 A Tree-Based Bounded Priority Queue . ........435 15.4 An Unbounded Heap-Based Priority Queue
Recommended publications
  • Fast and Correct Load-Link/Store-Conditional Instruction Handling in DBT Systems
    Fast and Correct Load-Link/Store-Conditional Instruction Handling in DBT Systems Abstract Atomic Read Memory Dynamic Binary Translation (DBT) requires the implemen- Operation tation of load-link/store-conditional (LL/SC) primitives for guest systems that rely on this form of synchronization. When Equals targeting e.g. x86 host systems, LL/SC guest instructions are YES NO typically emulated using atomic Compare-and-Swap (CAS) expected value? instructions on the host. Whilst this direct mapping is efficient, this approach is problematic due to subtle differences between Write new value LL/SC and CAS semantics. In this paper, we demonstrate that to memory this is a real problem, and we provide code examples that fail to execute correctly on QEMU and a commercial DBT system, Exchanged = true Exchanged = false which both use the CAS approach to LL/SC emulation. We then develop two novel and provably correct LL/SC emula- tion schemes: (1) A purely software based scheme, which uses the DBT system’s page translation cache for correctly se- Figure 1: The compare-and-swap instruction atomically reads lecting between fast, but unsynchronized, and slow, but fully from a memory address, and compares the current value synchronized memory accesses, and (2) a hardware acceler- with an expected value. If these values are equal, then a new ated scheme that leverages hardware transactional memory value is written to memory. The instruction indicates (usually (HTM) provided by the host. We have implemented these two through a return register or flag) whether or not the value was schemes in the Synopsys DesignWare® ARC® nSIM DBT successfully written.
    [Show full text]
  • Dagrep-V007-I011-Complete.Pdf
    Volume 7, Issue 11, November 2017 New Challenges in Parallelism (Dagstuhl Seminar 17451) Annette Bieniusa, Hans-J. Boehm, Maurice Herlihy, and Erez Petrank ........... 1 Algorithmic Cheminformatics (Dagstuhl Seminar 17452) Jakob L. Andersen, Christoph Flamm, Daniel Merkle, and Peter F. Stadler . 28 Connecting Visualization and Data Management Research (Dagstuhl Seminar 17461) Remco Chang, Jean-Daniel Fekete, Juliana Freire, and Carlos E. Scheidegger . 46 A Shared Challenge in Behavioural Specification (Dagstuhl Seminar 17462) Klaus Havelund, Martin Leucker, Giles Reger, and Volker Stolz . 59 Artificial and Computational Intelligence in Games: AI-Driven Game Design (Dagstuhl Seminar 17471) Pieter Spronck, Elisabeth André, Michael Cook, and Mike Preuß . 86 Addressing the Computational Challenges of Personalized Medicine (Dagstuhl Seminar 17472) Niko Beerenwinkel, Holger Fröhlich, and Susan A. Murphy . 130 Reliable Computation and Complexity on the Reals (Dagstuhl Seminar 17481) Norbert T. Müller, Siegfried M. Rump, Klaus Weihrauch, and Martin Ziegler . 142 DagstuhlReports,Vol. 7,Issue11 ISSN2192-5283 ISSN 2192-5283 Published online and open access by Aims and Scope Schloss Dagstuhl – Leibniz-Zentrum für Informatik The periodical Dagstuhl Reports documents the GmbH, Dagstuhl Publishing, Saarbrücken/Wadern, program and the results of Dagstuhl Seminars and Germany. Online available at Dagstuhl Perspectives Workshops. http://www.dagstuhl.de/dagpub/2192-5283 In principal, for each Dagstuhl Seminar or Dagstuhl Perspectives Workshop a report is published that Publication date contains the following: March, 2018 an executive summary of the seminar program and the fundamental results, Bibliographic information published by the Deutsche an overview of the talks given during the seminar Nationalbibliothek (summarized as talk abstracts), and The Deutsche Nationalbibliothek lists this publica- summaries from working groups (if applicable).
    [Show full text]
  • FOCS 2005 Program SUNDAY October 23, 2005
    FOCS 2005 Program SUNDAY October 23, 2005 Talks in Grand Ballroom, 17th floor Session 1: 8:50am – 10:10am Chair: Eva´ Tardos 8:50 Agnostically Learning Halfspaces Adam Kalai, Adam Klivans, Yishay Mansour and Rocco Servedio 9:10 Noise stability of functions with low influences: invari- ance and optimality The 46th Annual IEEE Symposium on Elchanan Mossel, Ryan O’Donnell and Krzysztof Foundations of Computer Science Oleszkiewicz October 22-25, 2005 Omni William Penn Hotel, 9:30 Every decision tree has an influential variable Pittsburgh, PA Ryan O’Donnell, Michael Saks, Oded Schramm and Rocco Servedio Sponsored by the IEEE Computer Society Technical Committee on Mathematical Foundations of Computing 9:50 Lower Bounds for the Noisy Broadcast Problem In cooperation with ACM SIGACT Navin Goyal, Guy Kindler and Michael Saks Break 10:10am – 10:30am FOCS ’05 gratefully acknowledges financial support from Microsoft Research, Yahoo! Research, and the CMU Aladdin center Session 2: 10:30am – 12:10pm Chair: Satish Rao SATURDAY October 22, 2005 10:30 The Unique Games Conjecture, Integrality Gap for Cut Problems and Embeddability of Negative Type Metrics Tutorials held at CMU University Center into `1 [Best paper award] Reception at Omni William Penn Hotel, Monongahela Room, Subhash Khot and Nisheeth Vishnoi 17th floor 10:50 The Closest Substring problem with small distances Tutorial 1: 1:30pm – 3:30pm Daniel Marx (McConomy Auditorium) Chair: Irit Dinur 11:10 Fitting tree metrics: Hierarchical clustering and Phy- logeny Subhash Khot Nir Ailon and Moses Charikar On the Unique Games Conjecture 11:30 Metric Embeddings with Relaxed Guarantees Break 3:30pm – 4:00pm Ittai Abraham, Yair Bartal, T-H.
    [Show full text]
  • Chicago Journal of Theoretical Computer Science the MIT Press
    Chicago Journal of Theoretical Computer Science The MIT Press Volume 1997, Article 1 12 March 1997 ISSN 1073–0486. MIT Press Journals, 55 Hayward St., Cambridge, MA 02142 USA; (617)253-2889; [email protected], [email protected]. Published one article at a time in LATEX source form on the Internet. Pag- ination varies from copy to copy. For more information and other articles see: http://www-mitpress.mit.edu/jrnls-catalog/chicago.html • http://www.cs.uchicago.edu/publications/cjtcs/ • ftp://mitpress.mit.edu/pub/CJTCS • ftp://cs.uchicago.edu/pub/publications/cjtcs • Feige and Kilian Limited vs. Polynomial Nondeterminism (Info) The Chicago Journal of Theoretical Computer Science is abstracted or in- R R R dexed in Research Alert, SciSearch, Current Contents /Engineering Com- R puting & Technology, and CompuMath Citation Index. c 1997 The Massachusetts Institute of Technology. Subscribers are licensed to use journal articles in a variety of ways, limited only as required to insure fair attribution to authors and the journal, and to prohibit use in a competing commercial product. See the journal’s World Wide Web site for further details. Address inquiries to the Subsidiary Rights Manager, MIT Press Journals; (617)253-2864; [email protected]. The Chicago Journal of Theoretical Computer Science is a peer-reviewed scholarly journal in theoretical computer science. The journal is committed to providing a forum for significant results on theoretical aspects of all topics in computer science. Editor in chief: Janos Simon Consulting
    [Show full text]
  • Mastering Concurrent Computing Through Sequential Thinking
    review articles DOI:10.1145/3363823 we do not have good tools to build ef- A 50-year history of concurrency. ficient, scalable, and reliable concur- rent systems. BY SERGIO RAJSBAUM AND MICHEL RAYNAL Concurrency was once a specialized discipline for experts, but today the chal- lenge is for the entire information tech- nology community because of two dis- ruptive phenomena: the development of Mastering networking communications, and the end of the ability to increase processors speed at an exponential rate. Increases in performance come through concur- Concurrent rency, as in multicore architectures. Concurrency is also critical to achieve fault-tolerant, distributed services, as in global databases, cloud computing, and Computing blockchain applications. Concurrent computing through sequen- tial thinking. Right from the start in the 1960s, the main way of dealing with con- through currency has been by reduction to se- quential reasoning. Transforming problems in the concurrent domain into simpler problems in the sequential Sequential domain, yields benefits for specifying, implementing, and verifying concur- rent programs. It is a two-sided strategy, together with a bridge connecting the Thinking two sides. First, a sequential specificationof an object (or service) that can be ac- key insights ˽ A main way of dealing with the enormous challenges of building concurrent systems is by reduction to sequential I must appeal to the patience of the wondering readers, thinking. Over more than 50 years, more sophisticated techniques have been suffering as I am from the sequential nature of human developed to build complex systems in communication. this way. 12 ˽ The strategy starts by designing —E.W.
    [Show full text]
  • A Separation Logic for Refining Concurrent Objects
    A Separation Logic for Refining Concurrent Objects Aaron Turon ∗ Mitchell Wand Northeastern University {turon, wand}@ccs.neu.edu Abstract do { tmp = *C; } until CAS(C, tmp, tmp+1); Fine-grained concurrent data structures are crucial for gaining per- implements inc using an optimistic approach: it takes a snapshot formance from multiprocessing, but their design is a subtle art. Re- of the counter without acquiring a lock, computes the new value cent literature has made large strides in verifying these data struc- of the counter, and uses compare-and-set (CAS) to safely install the tures, using either atomicity refinement or separation logic with new value. The key is that CAS compares *C with the value of tmp, rely-guarantee reasoning. In this paper we show how the owner- atomically updating *C with tmp + 1 and returning true if they ship discipline of separation logic can be used to enable atomicity are the same, and just returning false otherwise. refinement, and we develop a new rely-guarantee method that is lo- Even for this simple data structure, the fine-grained imple- calized to the definition of a data structure. We present the first se- mentation significantly outperforms the lock-based implementa- mantics of separation logic that is sensitive to atomicity, and show tion [17]. Likewise, even for this simple example, we would prefer how to control this sensitivity through ownership. The result is a to think of the counter in a more abstract way when reasoning about logic that enables compositional reasoning about atomicity and in- its clients, giving it the following specification: terference, even for programs that use fine-grained synchronization and dynamic memory allocation.
    [Show full text]
  • Lock-Free Programming
    Lock-Free Programming Geoff Langdale L31_Lockfree 1 Desynchronization ● This is an interesting topic ● This will (may?) become even more relevant with near ubiquitous multi-processing ● Still: please don’t rewrite any Project 3s! L31_Lockfree 2 Synchronization ● We received notification via the web form that one group has passed the P3/P4 test suite. Congratulations! ● We will be releasing a version of the fork-wait bomb which doesn't make as many assumptions about task id's. – Please look for it today and let us know right away if it causes any trouble for you. ● Personal and group disk quotas have been grown in order to reduce the number of people running out over the weekend – if you try hard enough you'll still be able to do it. L31_Lockfree 3 Outline ● Problems with locking ● Definition of Lock-free programming ● Examples of Lock-free programming ● Linux OS uses of Lock-free data structures ● Miscellanea (higher-level constructs, ‘wait-freedom’) ● Conclusion L31_Lockfree 4 Problems with Locking ● This list is more or less contentious, not equally relevant to all locking situations: – Deadlock – Priority Inversion – Convoying – “Async-signal-safety” – Kill-tolerant availability – Pre-emption tolerance – Overall performance L31_Lockfree 5 Problems with Locking 2 ● Deadlock – Processes that cannot proceed because they are waiting for resources that are held by processes that are waiting for… ● Priority inversion – Low-priority processes hold a lock required by a higher- priority process – Priority inheritance a possible solution L31_Lockfree
    [Show full text]
  • Multithreading for Gamedev Students
    Multithreading for Gamedev Students Keith O’Conor 3D Technical Lead Ubisoft Montreal @keithoconor - Who I am - PhD (Trinity College Dublin), Radical Entertainment (shipped Prototype 1 & 2), Ubisoft Montreal (shipped Watch_Dogs & Far Cry 4) - Who this is aimed at - Game programming students who don’t necessarily come from a strict computer science background - Some points might be basic for CS students, but all are relevant to gamedev - Slides available online at fragmentbuffer.com Overview • Hardware support • Common game engine threading models • Race conditions • Synchronization primitives • Atomics & lock-free • Hazards - Start at high level, finish in the basement - Will also talk about potential hazards and give an idea of why multithreading is hard Overview • Only an introduction ◦ Giving a vocabulary ◦ See references for further reading ◦ Learn by doing, hair-pulling - Way too big a topic for a single talk, each section could be its own series of talks Why multithreading? - Hitting power & heat walls when going for increased frequency alone - Go wide instead of fast - Use available resources more efficiently - Taken from http://www.karlrupp.net/2015/06/40-years-of-microprocessor- trend-data/ Hardware multithreading Hardware support - Before we use multithreading in games, we need to understand the various levels of hardware support that allow multiple instructions to be executed in parallel - There are many more aspects to hardware multithreading than we’ll look at here (processor pipelining, cache coherency protocols etc.) - Again,
    [Show full text]
  • CS 241 Honors Concurrent Data Structures
    CS 241 Honors Concurrent Data Structures Bhuvan Venkatesh University of Illinois Urbana{Champaign March 7, 2017 CS 241 Course Staff (UIUC) Lock Free Data Structures March 7, 2017 1 / 37 What to go over Terminology What is lock free Example of Lock Free Transactions and Linerazability The ABA problem Drawbacks Use Cases CS 241 Course Staff (UIUC) Lock Free Data Structures March 7, 2017 2 / 37 Atomic instructions - Instructions that happen in one step to the CPU or not at all. Some examples are atomic add, atomic compare and swap. Terminology Transaction - Like atomic operations, either the entire transaction goes through or doesn't. This could be a series of operations (like push or pop for a stack) CS 241 Course Staff (UIUC) Lock Free Data Structures March 7, 2017 3 / 37 Terminology Transaction - Like atomic operations, either the entire transaction goes through or doesn't. This could be a series of operations (like push or pop for a stack) Atomic instructions - Instructions that happen in one step to the CPU or not at all. Some examples are atomic add, atomic compare and swap. CS 241 Course Staff (UIUC) Lock Free Data Structures March 7, 2017 3 / 37 int atomic_cas(int *addr, int *expected, int value){ if(*addr == *expected){ *addr = value; return 1;//swap success }else{ *expected = *addr; return 0;//swap failed } } But this all happens atomically! Atomic Compare and Swap? CS 241 Course Staff (UIUC) Lock Free Data Structures March 7, 2017 4 / 37 But this all happens atomically! Atomic Compare and Swap? int atomic_cas(int *addr, int *expected,
    [Show full text]
  • Self-Sorting SSD: Producing Sorted Data Inside Active Ssds
    Foreword This volume contains the papers presentedat the Third Israel Symposium on the Theory of Computing and Systems (ISTCS), held in Tel Aviv, Israel, on January 4-6, 1995. Fifty five papers were submitted in response to the Call for Papers, and twenty seven of them were selected for presentation. The selection was based on originality, quality and relevance to the field. The program committee is pleased with the overall quality of the acceptedpapers and, furthermore, feels that many of the papers not used were also of fine quality. The papers included in this proceedings are preliminary reports on recent research and it is expected that most of these papers will appear in a more complete and polished form in scientific journals. The proceedings also contains one invited paper by Pave1Pevzner and Michael Waterman. The program committee thanks our invited speakers,Robert J. Aumann, Wolfgang Paul, Abe Peled, and Avi Wigderson, for contributing their time and knowledge. We also wish to thank all who submitted papers for consideration, as well as the many colleagues who contributed to the evaluation of the submitted papers. The latter include: Noga Alon Alon Itai Eric Schenk Hagit Attiya Roni Kay Baruch Schieber Yossi Azar Evsey Kosman Assaf Schuster Ayal Bar-David Ami Litman Nir Shavit Reuven Bar-Yehuda Johan Makowsky Richard Statman Shai Ben-David Yishay Mansour Ray Strong Allan Borodin Alain Mayer Eli Upfal Dorit Dor Mike Molloy Moshe Vardi Alon Efrat Yoram Moses Orli Waarts Jack Feldman Dalit Naor Ed Wimmers Nissim Francez Seffl Naor Shmuel Zaks Nita Goyal Noam Nisan Uri Zwick Vassos Hadzilacos Yuri Rabinovich Johan Hastad Giinter Rote The work of the program committee has been facilitated thanks to software developed by Rob Schapire and FOCS/STOC program chairs.
    [Show full text]
  • Combinatorial Topology and Distributed Computing Copyright 2010 Herlihy, Kozlov, and Rajsbaum All Rights Reserved
    Combinatorial Topology and Distributed Computing Copyright 2010 Herlihy, Kozlov, and Rajsbaum All rights reserved Maurice Herlihy Dmitry Kozlov Sergio Rajsbaum February 22, 2011 DRAFT 2 DRAFT Contents 1 Introduction 9 1.1 DecisionTasks .......................... 10 1.2 Communication.......................... 11 1.3 Failures .............................. 11 1.4 Timing............................... 12 1.4.1 ProcessesandProtocols . 12 1.5 ChapterNotes .......................... 14 2 Elements of Combinatorial Topology 15 2.1 Theobjectsandthemaps . 15 2.1.1 The Combinatorial View . 15 2.1.2 The Geometric View . 17 2.1.3 The Topological View . 18 2.2 Standardconstructions. 18 2.3 Chromaticcomplexes. 21 2.4 Simplicial models in Distributed Computing . 22 2.5 ChapterNotes .......................... 23 2.6 Exercises ............................. 23 3 Manifolds, Impossibility,DRAFT and Separation 25 3.1 ManifoldComplexes ....................... 25 3.2 ImmediateSnapshots. 28 3.3 ManifoldProtocols .. .. .. .. .. .. .. 34 3.4 SetAgreement .......................... 34 3.5 AnonymousProtocols . .. .. .. .. .. .. 38 3.6 WeakSymmetry-Breaking . 39 3.7 Anonymous Set Agreement versus Weak Symmetry Breaking 40 3.8 ChapterNotes .......................... 44 3.9 Exercises ............................. 44 3 4 CONTENTS 4 Connectivity 47 4.1 Consensus and Path-Connectivity . 47 4.2 Consensus in Asynchronous Read-Write Memory . 49 4.3 Set Agreement and Connectivity in Higher Dimensions . 53 4.4 Set Agreement and Read-Write memory . 59 4.4.1 Critical States . 63 4.5 ChapterNotes .......................... 64 4.6 Exercises ............................. 64 5 Colorless Tasks 67 5.1 Pseudospheres .......................... 68 5.2 ColorlessTasks .......................... 72 5.3 Wait-Free Read-Write Memory . 73 5.3.1 Read-Write Protocols and Pseudospheres . 73 5.3.2 Necessary and Sufficient Conditions . 75 5.4 Read-Write Memory with k-Set Agreement .
    [Show full text]
  • Verifying Invariants of Lock-Free Data Structures with Rely-Guarantee and Refinement Types 11 COLIN S
    Verifying Invariants of Lock-Free Data Structures with Rely-Guarantee and Refinement Types 11 COLIN S. GORDON, Drexel University MICHAEL D. ERNST and DAN GROSSMAN, University of Washington MATTHEW J. PARKINSON, Microsoft Research Verifying invariants of fine-grained concurrent data structures is challenging, because interference from other threads may occur at any time. We propose a new way of proving invariants of fine-grained concurrent data structures: applying rely-guarantee reasoning to references in the concurrent setting. Rely-guarantee applied to references can verify bounds on thread interference without requiring a whole program to be verified. This article provides three new results. First, it provides a new approach to preserving invariants and restricting usage of concurrent data structures. Our approach targets a space between simple type systems and modern concurrent program logics, offering an intermediate point between unverified code and full verification. Furthermore, it avoids sealing concurrent data structure implementations and can interact safely with unverified imperative code. Second, we demonstrate the approach’s broad applicability through a series of case studies, using two implementations: an axiomatic COQ domain-specific language and a library for Liquid Haskell. Third, these two implementations allow us to compare and contrast verifications by interactive proof (COQ) and a weaker form that can be expressed using automatically-discharged dependent refinement typesr (Liquid Haskell). r CCS Concepts: Theory of computation → Type structures; Invariants; Program verification; Computing methodologies → Concurrent programming languages; Additional Key Words and Phrases: Type systems, rely-guarantee, refinement types, concurrency,verification ACM Reference Format: Colin S. Gordon, Michael D. Ernst, Dan Grossman, and Matthew J.
    [Show full text]