The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.

Principal Application Architect
May. 22, 2010
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.
1 of 168

More Related Content

Similar to The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.

Concur15slidesConcur15slides
Concur15slidesAndrea Cerone
CS221: HMM and Particle FiltersCS221: HMM and Particle Filters
CS221: HMM and Particle Filterszukun
Propositional logic(part 3)Propositional logic(part 3)
Propositional logic(part 3)SURBHI SAROHA
Chapter0Chapter0
Chapter0guest497e7c
Impossibility of Consensus with One Faulty Process - Papers We Love SFImpossibility of Consensus with One Faulty Process - Papers We Love SF
Impossibility of Consensus with One Faulty Process - Papers We Love SFHenryRobinson
Need for Async: Hot pursuit for scalable applicationsNeed for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsKonrad Malawski

Recently uploaded

Future of SkillsFuture of Skills
Future of SkillsAlison B. Lowndes
Privacy in the era of quantum computersPrivacy in the era of quantum computers
Privacy in the era of quantum computersSpeck&Tech
Need for Speed: Removing speed bumps in API ProjectsNeed for Speed: Removing speed bumps in API Projects
Need for Speed: Removing speed bumps in API ProjectsŁukasz Chruściel
Take Control of Podcasting thanks to Open Source and Podcasting 2.0Take Control of Podcasting thanks to Open Source and Podcasting 2.0
Take Control of Podcasting thanks to Open Source and Podcasting 2.0🎙 Benjamin Bellamy
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23NicolasVuillamy1
Product Listing Presentation_Cathy.pptxProduct Listing Presentation_Cathy.pptx
Product Listing Presentation_Cathy.pptxCatarinaTorrenuevaMa

The Art of Multiprocessor Programmin Chapter 05 with Japanese comment.

Editor's Notes

  1. We looked at shared memory computation and tried to understand what we could build using the weakest assumptions regarding our shared medium.
  2. We looked at wait-free implementations because they imply no mutual exclusion.
  3. We started with the weakest primitive we could think of.
  4. We built a collection of different synchronization objects all the way to an atomic snapshot. But what about constructing other objects like Queues. We know two thread queues can be implemented in a wait-free manner. What about queues with more than one enqueuer and dequeuer?
  5. Wait-free implementations imply that operatiosn of different threads interleave at the granularity of individual machine instructions accessing memory.
  6. As we will see later consensus can be formulated as a linearizable object in which threads in the sequential execution decide on the value of the first thread to complete.
  7. This is one of the most fundamental theorems of distributed computing, proved originally by Fischer, Lynch, and Paterson in the 1980’s. It says that there are problems that are easily solvable by reading and writing to memory on a single processor, a turing machine, but are not solvable on a multiprocessor. As we will see, this will have profound implications on multiprocessor hardware design. We will give here a proof of their theorem in the context of shared memory as proven by Herlihy.
  8. It suffices to prove the claim for two threads. Here is how we model computation histories.
  9. Imagine that all the executions still decide on one input or another…assume the claim is false and lets show the set of possible executions must then include two executions with different values.
  10. Since e
  11. A critical state is a bivalent state in which the next step by one thread will lead to a 0-valent state and the next step by the other will lead to a 1-valent state
  12. Why must there be such a critical state? Start from a bivalent state. If it is not critical, run A until about to make state 0-valent, if not a critical state, that is, if B’s step will not take the state to a 1-valent state, then run B until in is about to take system to a 1-valent state. If this state is not critical, run A again, then B, and so on. Since this is a wai-free execution, within a finite number of steps each will finish, so somewhere before they must reach a critical state.
  13. Tp prove that we cannot solve consensus using read-write registers, lets go over all the possible interactions among the threads and show that for each such execution they lead to a contradiction.
  14. This is the case in which some thread reads (and the other either reads or writes). Two possible executions, one in which A runs solo and decides 0 and another in which A runs after B takes its critical read step. Leads to a contradiction since A cannot tell that B has read…so two executions lead to the same state but the system is supposed to have two different valencies for it, a contradiction.
  15. Consensus can be formulated as a linearizable object in which threads in the sequential execution decide on the value of the first thread to complete.
  16. A linearizable object in which threads in the sequential execution decide on the value of the first thread to complete. The consensus objects we will consider will be one time objects, that is, each thread executes a method once.
  17. Note the use of a protected for proposed. A protected method is visible to inheriting classes, even not part of the same package. A package scope (default) method is not. That is the only difference between protected and package scope. method are restricted in accessing it. See example below: package one; public class A { protected int p; } //////////////////////////////// package two; import one. A; class B extends A { void myMethod() { p = 1; // ok A a = new A(); a.p = 1; // not ok, p would have to be public for this to work. } }
  18. The exceptions have to do with special non-deterministic objects or with how threads “bind” to the object or with the objects being “oblivious”. See chapter for details. The following is a summary from a paper on the subject by Hadzilacos et. al: Hadzilacos et al prove that if types can be nondeterministic and nonoblivious, and each process is required to bind permanently to at most one port of an object, then hrm is not robust. Concurrently with the rst appearance of our result [CHJT94], there appeared two papers proving the robustness of hrm in certain models [BGA94, PBN94]. Specically, Borowsky, Gafni, and Afek show that if types must be deterministic and oblivious, each process may bind to several ports of the same object, and the process-to-port binding is transient, then hrm is robust [BGA94]. Peterson, Bazzi, and Neiger show that if types must be deterministic, each process may bind to several ports of the same object, but the process-to-port binding is permanent, then hrm is robust [PBN94]. More nonrobustness results have appeared recently. Moran and Rappoport [MR96] strengthen our result by proving that hrm is not robust even if types must be deterministic, as long as each process must be permanently bound to at most one port of an object. Lo and Hadzilacos [LH97] prove that hrm is not robust if types can be nondeterministic, regardless of whether they are oblivious and of how processes may bind to ports. Schenk proves a result similar to the one in [LH97], but his result requires innite nondeterminism and applies only for a stronger denition of wait-free implementation [Sch96].
  19. To save space and make the code clearer we wrote that it extends consensus while it actually extends ConsensusProtocol and omitted that Decide sets j=i-1 and then proposes value. Assume this appears in all the code.
  20. NOTE: Lock-free is the same as wait-free if the execution is finite. “ Lock-free is to wait-free as deadlock-free is to lockout-free.” In other words, Lock-free and Deadlock-free are “stalinistic”, preferring group progress, while Wait-free and Lockout-free guarantee individual progress. Any wait-free implementation is lock-free.
  21. NOTE: Lock-free is the same as wait-free if the execution is finite. “ Lock-free is to wait-free as deadlock-free is to lockout-free.” In other words, Lock-free and Deadlock-free are “stalinistic”, preferring group progress, while Wait-free and Lockout-free guarantee individual progress. Any wait-free implementation is lock-free.
  22. NOTE: Lock-free is the same as wait-free if the execution is finite. “ Lock-free is to wait-free as deadlock-free is to lockout-free.” In other words, Lock-free and Deadlock-free are “stalinistic”, preferring group progress, while Wait-free and Lockout-free guarantee individual progress. Any wait-free implementation is lock-free.
  23. NOTE: Lock-free is the same as wait-free if the execution is finite. “ Lock-free is to wait-free as deadlock-free is to lockout-free.” In other words, Lock-free and Deadlock-free are “stalinistic”, preferring group progress, while Wait-free and Lockout-free guarantee individual progress. Any wait-free implementation is lock-free.
  24. Consensus can be formulated as a linearizable object in which threads in the sequential execution decide on the value of the first thread to complete.