SlideShare a Scribd company logo
Leslie Lamport papers
• Time, Clocks,and the Ordering of Events in a Distributed
System
• How to Make a MultiprocessorComputer That Correctly
Executes Multiprocess Programs
• The Byzantine Generals'Problem
• Distributed Snapshots:DeterminingGlobalStates ofa
Distributed System
• The Part-Time Parliament
• Paxos algorithmforconsensus.
• Bakery algorithm for mutual exclusion ofmultiple threadsin
a computer system that require the same resources at the
same time.
• Chandy-Lamportalgorithm for the determinationof
consistent global states (snapshot).
• Lamport signature,one of the prototypes ofthe digital
signature.
Producer-Consumer Synchronization
An execution of the FIFO queue in standard model.
Producer-Consumer: specification ✓
BoundedFIFO queue: implementation ? (proveits correct)
A state predicateis an invariant iff it is true in every state of every execution.
Producer-Consumer Synchronization
Generalizing to marked graph synchronization.
Markedgraph: Directgraph with edge-marking w/ finite set of tokens.
Node fire: remove1 token fromeach input + add 1 to each output
Firing sequence: fire until no node can fire
An event history for the FIFO queue with N = 3.
32
0
FIFO queue as N process system.
event
Producer-Consumer: deterministic
Mutual exclusion: non-deterministic (racew/arbiter)
(arbiter decides which of 2 events happened first)
process 1:
process 2:
v0 v0
v2
v3 v3
v2
2
2 2 2 2 2
tokens on any cycle
remain constant
Event History
• No global shared clock.
• Communication delay unpredictable.
• p: async process (i)
• c: channel, unidirectional (ij)
• m: message(k)
• Causality: message must be sent before it was received.
• Within a process, allevents causally follow.
• Send & receive of a messagecausally follow.
• Concurrent events: thosenotcausally related.
• Process state: events in process
• Channel state: messagesentbut not yet received
• Global state: process states Uchannel states
• - consistent: a message not sent is neither in channel or recieved
• - transitless: all channels are empty (strong: consistent + transitless)
• past(e): all events that causally happen beforee
• max_past(e): events that happen justbeforee (each process)
• min_future(e): events thathappen justafter e
message
process 0
internal send
recieveevent 0
channel
Pictures of event histories were first used to describe distributed systems.
Standard Model
• Event history describes all sequences of states that
represent executions in the standard model.
• The executions are not inherently different, but artifacts
of the standard model. It requires concurrent executions
of two operations to be modeled as ocurring in an order.
• The problem of implementing a distributed system can
often be viewed as that of maintaining a global
invariant even though different processes may
have incompatible views of what the current state is.
• The standard model provides the most practical way to
reason about invariance.
Execution is represented as a sequence of atomic transitions states.
Mutual Exclusion
• Safety: no 2 ciritical section executed concurrently.
• Liveness: some process eventually executes its CS.
• Assumption: "process fairness" every process eventually takes a step.
• BAKERY ALGORITHM
• Firstto implement mut-ex without any lower level mut-ex.
• Customers taketickets, and lowestnumber ticket is served first.
• Each process computes its ticket number from others'tickets.
• Proof does not requireread/write of entire number be atomic.
Synchronizing N processes, each with a section of code called its critical section.
C
C
Two-arrow Model
• a • a
A B
AB
A B
AB
e e f f
e f
Two-arrow model for event history
A B C
A B
A B
A B D
For A4:
A: data = 10
B: sent= T
C: if (sent)
D: read data
CAB DSYNC fail
SYNC pass
A1
A2
A3
A4
memory barrier
interprocess communication
SYNC fail
Compiler Instruction Reordering
RULE: Thou shalt notmodify thebehaviorof asingle-threadedprogram.
ProblematicwithLock-freeprogramming.
Use C++11 atomics.
recvValue() canreadgarbage value.
Explicit Compiler Barrier
recvValue() nowworks.
Implied Compiler Barrier
CPUfence instructionsalsopreventcompilerreordering.
C++11 atomic instructionspreventcompilerreordering.
Implied Compiler Barrier
Except inline,pure functionsa call to an external functionisevenstrongerthanacompilerbarrier,since the compilerhasnoideawhatthe function’sside effectswillbe.
Register replacement
What if multipleincrementshappenonregitserbefore return? Overwrite.
C++11 doesn'tavoidsregisterreplacementonsharedmemorylocations.
Types of Memory Barrier
lwsync:
#LoadLoad, #StoreStore, #LoadStore
#StoreLoad is unique: a = b = 0
#StoreLoad acts as a full memory fence
DataDependency is a barrier too.
Weak vs. Strong Memory models
Temporal Logic
• It will always be the case that Prior invented TL.
• It is dark, it was light, and it will be light again.
• I will keep trying until I succeed.
• Ever since Mia left home, Joe has been unhappy and has
been drinking until losing consciousness.
• Every time when a message is sent, an acknowledgment
of receipt will eventually be returned, and the message
will not be marked ‘sent’ before an acknowledgment of
receipt is returned.
• If it is raining, then the home team wins.
• If the home team does not win, then it is not raining.
• If the home team wins, then it is raining.
• If it is not raining, then the home team does not win.
• p : You have the flu.
• q : You miss the final examination.
• r : You pass the course.
• p → q, ¬q ↔ r, q → ¬r, p ∨ q ∨ r
• (p → ¬r) ∨ (q → ¬r), (p ∧ q) ∨ (¬q ∧ r)
p → q
¬p ← ¬q
p ← q
¬p → ¬q
Propositional LogicA proposition is a declarative sentence that is either true or false, but not both.A logic for specifying properties over time.
GP(Prior invents TL)
dark ∧ P(light) ∧ F(light)
try U succeed
(Joe unhappy ∧ (Joe drinks U ¬(Joe conscious))) S (Mia leaves)
G(Sent → (¬MarkedSent U AckReturned))
Amir Pnueli in 1977
Goranko, Valentin and Antje Rumberg, "Temporal Logic", The Stanford Encyclopedia of Philosophy (Summer 2020
Edition),Edward N. Zalta (ed.), URL = <https://plato.stanford.edu/archives/sum2020/entries/logic-temporal/>.
DiscreteMathematics and Its Applications:With Combinatoricsand Graph Theory
Rosen, K.H.; Krithivasan,K.;(2012)
π-calculus Lambda CalculusExpress computation as function abstraction and application w/ binding & substitution.Formal foundation of concurrent programming.
https://www.simonholywell.com/post/the-lambda-calculus/

More Related Content

What's hot

Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Flink Forward
 
Assignment cn tl
Assignment cn tlAssignment cn tl
Assignment cn tlH K
 
Programmable PN Sequence Generators
Programmable PN Sequence GeneratorsProgrammable PN Sequence Generators
Programmable PN Sequence Generators
Rajesh Singh
 
ECE 467 Mini project 2
ECE 467 Mini project 2ECE 467 Mini project 2
ECE 467 Mini project 2
Lakshmi Yasaswi Kamireddy
 
IEEE1588 - Collision avoidance for Delay_Req messages in broadcast media
IEEE1588  - Collision avoidance for Delay_Req messages in broadcast mediaIEEE1588  - Collision avoidance for Delay_Req messages in broadcast media
IEEE1588 - Collision avoidance for Delay_Req messages in broadcast media
Augusto Ciuffoletti
 
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Igalia
 
Flink Forward Berlin 2017: Matt Zimmer - Custom, Complex Windows at Scale Usi...
Flink Forward Berlin 2017: Matt Zimmer - Custom, Complex Windows at Scale Usi...Flink Forward Berlin 2017: Matt Zimmer - Custom, Complex Windows at Scale Usi...
Flink Forward Berlin 2017: Matt Zimmer - Custom, Complex Windows at Scale Usi...
Flink Forward
 
Heroku's Ryan Smith at Waza 2013: Predictable Failure
Heroku's Ryan Smith at Waza 2013: Predictable FailureHeroku's Ryan Smith at Waza 2013: Predictable Failure
Heroku's Ryan Smith at Waza 2013: Predictable Failure
Heroku
 
Apache Flink Training: DataStream API Part 1 Basic
 Apache Flink Training: DataStream API Part 1 Basic Apache Flink Training: DataStream API Part 1 Basic
Apache Flink Training: DataStream API Part 1 Basic
Flink Forward
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink Meetup
Stephan Ewen
 
The paxos commit algorithm
The paxos commit algorithmThe paxos commit algorithm
The paxos commit algorithmahmed hamza
 
Identifying hosts with natfilterd
Identifying hosts with natfilterdIdentifying hosts with natfilterd
Identifying hosts with natfilterd
Georg Wicherski
 
Reactive Programming in Java by Mario Fusco - Codemotion Rome 2015
Reactive Programming in Java by Mario Fusco - Codemotion Rome 2015Reactive Programming in Java by Mario Fusco - Codemotion Rome 2015
Reactive Programming in Java by Mario Fusco - Codemotion Rome 2015
Codemotion
 
Internship - Final Presentation (26-08-2015)
Internship - Final Presentation (26-08-2015)Internship - Final Presentation (26-08-2015)
Internship - Final Presentation (26-08-2015)Sean Krail
 
Clk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold timeClk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold time
VLSI SYSTEM Design
 
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward
 
Streaming Data Flow with Apache Flink @ Paris Flink Meetup 2015
Streaming Data Flow with Apache Flink @ Paris Flink Meetup 2015Streaming Data Flow with Apache Flink @ Paris Flink Meetup 2015
Streaming Data Flow with Apache Flink @ Paris Flink Meetup 2015
Till Rohrmann
 
Collision prevention on computer architecture
Collision prevention on computer architectureCollision prevention on computer architecture
Collision prevention on computer architecture
Sarvesh Verma
 
Introduction to RxJS
Introduction to RxJSIntroduction to RxJS
Introduction to RxJS
Brainhub
 

What's hot (20)

Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
 
Assignment cn tl
Assignment cn tlAssignment cn tl
Assignment cn tl
 
Programmable PN Sequence Generators
Programmable PN Sequence GeneratorsProgrammable PN Sequence Generators
Programmable PN Sequence Generators
 
ECE 467 Mini project 2
ECE 467 Mini project 2ECE 467 Mini project 2
ECE 467 Mini project 2
 
IEEE1588 - Collision avoidance for Delay_Req messages in broadcast media
IEEE1588  - Collision avoidance for Delay_Req messages in broadcast mediaIEEE1588  - Collision avoidance for Delay_Req messages in broadcast media
IEEE1588 - Collision avoidance for Delay_Req messages in broadcast media
 
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
 
Flink Forward Berlin 2017: Matt Zimmer - Custom, Complex Windows at Scale Usi...
Flink Forward Berlin 2017: Matt Zimmer - Custom, Complex Windows at Scale Usi...Flink Forward Berlin 2017: Matt Zimmer - Custom, Complex Windows at Scale Usi...
Flink Forward Berlin 2017: Matt Zimmer - Custom, Complex Windows at Scale Usi...
 
Heroku's Ryan Smith at Waza 2013: Predictable Failure
Heroku's Ryan Smith at Waza 2013: Predictable FailureHeroku's Ryan Smith at Waza 2013: Predictable Failure
Heroku's Ryan Smith at Waza 2013: Predictable Failure
 
Apache Flink Training: DataStream API Part 1 Basic
 Apache Flink Training: DataStream API Part 1 Basic Apache Flink Training: DataStream API Part 1 Basic
Apache Flink Training: DataStream API Part 1 Basic
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink Meetup
 
The paxos commit algorithm
The paxos commit algorithmThe paxos commit algorithm
The paxos commit algorithm
 
Identifying hosts with natfilterd
Identifying hosts with natfilterdIdentifying hosts with natfilterd
Identifying hosts with natfilterd
 
Reactive Programming in Java by Mario Fusco - Codemotion Rome 2015
Reactive Programming in Java by Mario Fusco - Codemotion Rome 2015Reactive Programming in Java by Mario Fusco - Codemotion Rome 2015
Reactive Programming in Java by Mario Fusco - Codemotion Rome 2015
 
Internship - Final Presentation (26-08-2015)
Internship - Final Presentation (26-08-2015)Internship - Final Presentation (26-08-2015)
Internship - Final Presentation (26-08-2015)
 
Clk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold timeClk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold time
 
Storm
StormStorm
Storm
 
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
 
Streaming Data Flow with Apache Flink @ Paris Flink Meetup 2015
Streaming Data Flow with Apache Flink @ Paris Flink Meetup 2015Streaming Data Flow with Apache Flink @ Paris Flink Meetup 2015
Streaming Data Flow with Apache Flink @ Paris Flink Meetup 2015
 
Collision prevention on computer architecture
Collision prevention on computer architectureCollision prevention on computer architecture
Collision prevention on computer architecture
 
Introduction to RxJS
Introduction to RxJSIntroduction to RxJS
Introduction to RxJS
 

Similar to Concurrency in Distributed Systems : Leslie Lamport papers

Realtime Analytics
Realtime AnalyticsRealtime Analytics
Realtime Analytics
eXascale Infolab
 
Computer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docxComputer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docx
ladonnacamplin
 
Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...
Universität Rostock
 
Computer network (8)
Computer network (8)Computer network (8)
Computer network (8)
NYversity
 
Intelligent Handwriting Recognition_MIL_presentation_v3_final
Intelligent Handwriting Recognition_MIL_presentation_v3_finalIntelligent Handwriting Recognition_MIL_presentation_v3_final
Intelligent Handwriting Recognition_MIL_presentation_v3_finalSuhas Pillai
 
Distributed System
Distributed SystemDistributed System
Distributed System
Praveen Penumathsa
 
Distributed computing time
Distributed computing timeDistributed computing time
Distributed computing time
Deepak John
 
Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18
Aritra Sarkar
 
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
NoSQLmatters
 
Approximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming ApplicationsApproximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming Applications
Debasish Ghosh
 
Unit I_CDA-1 computer design and applications.
Unit I_CDA-1 computer design and applications.Unit I_CDA-1 computer design and applications.
Unit I_CDA-1 computer design and applications.
brijeshgolani77
 
Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)
Abdullah al Mamun
 
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
Peter Breuer
 
Asymptotics 140510003721-phpapp02
Asymptotics 140510003721-phpapp02Asymptotics 140510003721-phpapp02
Asymptotics 140510003721-phpapp02
mansab MIRZA
 
Runtimeenvironment
RuntimeenvironmentRuntimeenvironment
Runtimeenvironment
Anusuya123
 
2017 10 17_quantum_program_v2
2017 10 17_quantum_program_v22017 10 17_quantum_program_v2
2017 10 17_quantum_program_v2
Francisco J. Gálvez Ramírez
 
Verification with LoLA: 4 Using LoLA
Verification with LoLA: 4 Using LoLAVerification with LoLA: 4 Using LoLA
Verification with LoLA: 4 Using LoLAUniversität Rostock
 
Stream processing from single node to a cluster
Stream processing from single node to a clusterStream processing from single node to a cluster
Stream processing from single node to a cluster
Gal Marder
 
Realtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQRealtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQ
Xin Wang
 
Graph processing
Graph processingGraph processing
Graph processing
yeahjs
 

Similar to Concurrency in Distributed Systems : Leslie Lamport papers (20)

Realtime Analytics
Realtime AnalyticsRealtime Analytics
Realtime Analytics
 
Computer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docxComputer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docx
 
Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...
 
Computer network (8)
Computer network (8)Computer network (8)
Computer network (8)
 
Intelligent Handwriting Recognition_MIL_presentation_v3_final
Intelligent Handwriting Recognition_MIL_presentation_v3_finalIntelligent Handwriting Recognition_MIL_presentation_v3_final
Intelligent Handwriting Recognition_MIL_presentation_v3_final
 
Distributed System
Distributed SystemDistributed System
Distributed System
 
Distributed computing time
Distributed computing timeDistributed computing time
Distributed computing time
 
Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18
 
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
 
Approximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming ApplicationsApproximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming Applications
 
Unit I_CDA-1 computer design and applications.
Unit I_CDA-1 computer design and applications.Unit I_CDA-1 computer design and applications.
Unit I_CDA-1 computer design and applications.
 
Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)
 
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
 
Asymptotics 140510003721-phpapp02
Asymptotics 140510003721-phpapp02Asymptotics 140510003721-phpapp02
Asymptotics 140510003721-phpapp02
 
Runtimeenvironment
RuntimeenvironmentRuntimeenvironment
Runtimeenvironment
 
2017 10 17_quantum_program_v2
2017 10 17_quantum_program_v22017 10 17_quantum_program_v2
2017 10 17_quantum_program_v2
 
Verification with LoLA: 4 Using LoLA
Verification with LoLA: 4 Using LoLAVerification with LoLA: 4 Using LoLA
Verification with LoLA: 4 Using LoLA
 
Stream processing from single node to a cluster
Stream processing from single node to a clusterStream processing from single node to a cluster
Stream processing from single node to a cluster
 
Realtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQRealtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQ
 
Graph processing
Graph processingGraph processing
Graph processing
 

More from Subhajit Sahu

About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
Subhajit Sahu
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
Adjusting Bitset for graph : SHORT REPORT / NOTES
Adjusting Bitset for graph : SHORT REPORT / NOTESAdjusting Bitset for graph : SHORT REPORT / NOTES
Adjusting Bitset for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Experiments with Primitive operations : SHORT REPORT / NOTES
Experiments with Primitive operations : SHORT REPORT / NOTESExperiments with Primitive operations : SHORT REPORT / NOTES
Experiments with Primitive operations : SHORT REPORT / NOTES
Subhajit Sahu
 
PageRank Experiments : SHORT REPORT / NOTES
PageRank Experiments : SHORT REPORT / NOTESPageRank Experiments : SHORT REPORT / NOTES
PageRank Experiments : SHORT REPORT / NOTES
Subhajit Sahu
 
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Subhajit Sahu
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Subhajit Sahu
 
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
Subhajit Sahu
 
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTESDyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
Subhajit Sahu
 
Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)
Subhajit Sahu
 
A Dynamic Algorithm for Local Community Detection in Graphs : NOTES
A Dynamic Algorithm for Local Community Detection in Graphs : NOTESA Dynamic Algorithm for Local Community Detection in Graphs : NOTES
A Dynamic Algorithm for Local Community Detection in Graphs : NOTES
Subhajit Sahu
 
Scalable Static and Dynamic Community Detection Using Grappolo : NOTES
Scalable Static and Dynamic Community Detection Using Grappolo : NOTESScalable Static and Dynamic Community Detection Using Grappolo : NOTES
Scalable Static and Dynamic Community Detection Using Grappolo : NOTES
Subhajit Sahu
 
Application Areas of Community Detection: A Review : NOTES
Application Areas of Community Detection: A Review : NOTESApplication Areas of Community Detection: A Review : NOTES
Application Areas of Community Detection: A Review : NOTES
Subhajit Sahu
 
Community Detection on the GPU : NOTES
Community Detection on the GPU : NOTESCommunity Detection on the GPU : NOTES
Community Detection on the GPU : NOTES
Subhajit Sahu
 
Survey for extra-child-process package : NOTES
Survey for extra-child-process package : NOTESSurvey for extra-child-process package : NOTES
Survey for extra-child-process package : NOTES
Subhajit Sahu
 
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTER
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTERDynamic Batch Parallel Algorithms for Updating PageRank : POSTER
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTER
Subhajit Sahu
 
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
Subhajit Sahu
 
Fast Incremental Community Detection on Dynamic Graphs : NOTES
Fast Incremental Community Detection on Dynamic Graphs : NOTESFast Incremental Community Detection on Dynamic Graphs : NOTES
Fast Incremental Community Detection on Dynamic Graphs : NOTES
Subhajit Sahu
 

More from Subhajit Sahu (20)

About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
Adjusting Bitset for graph : SHORT REPORT / NOTES
Adjusting Bitset for graph : SHORT REPORT / NOTESAdjusting Bitset for graph : SHORT REPORT / NOTES
Adjusting Bitset for graph : SHORT REPORT / NOTES
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Experiments with Primitive operations : SHORT REPORT / NOTES
Experiments with Primitive operations : SHORT REPORT / NOTESExperiments with Primitive operations : SHORT REPORT / NOTES
Experiments with Primitive operations : SHORT REPORT / NOTES
 
PageRank Experiments : SHORT REPORT / NOTES
PageRank Experiments : SHORT REPORT / NOTESPageRank Experiments : SHORT REPORT / NOTES
PageRank Experiments : SHORT REPORT / NOTES
 
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
 
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
 
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTESDyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
 
Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)
 
A Dynamic Algorithm for Local Community Detection in Graphs : NOTES
A Dynamic Algorithm for Local Community Detection in Graphs : NOTESA Dynamic Algorithm for Local Community Detection in Graphs : NOTES
A Dynamic Algorithm for Local Community Detection in Graphs : NOTES
 
Scalable Static and Dynamic Community Detection Using Grappolo : NOTES
Scalable Static and Dynamic Community Detection Using Grappolo : NOTESScalable Static and Dynamic Community Detection Using Grappolo : NOTES
Scalable Static and Dynamic Community Detection Using Grappolo : NOTES
 
Application Areas of Community Detection: A Review : NOTES
Application Areas of Community Detection: A Review : NOTESApplication Areas of Community Detection: A Review : NOTES
Application Areas of Community Detection: A Review : NOTES
 
Community Detection on the GPU : NOTES
Community Detection on the GPU : NOTESCommunity Detection on the GPU : NOTES
Community Detection on the GPU : NOTES
 
Survey for extra-child-process package : NOTES
Survey for extra-child-process package : NOTESSurvey for extra-child-process package : NOTES
Survey for extra-child-process package : NOTES
 
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTER
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTERDynamic Batch Parallel Algorithms for Updating PageRank : POSTER
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTER
 
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
 
Fast Incremental Community Detection on Dynamic Graphs : NOTES
Fast Incremental Community Detection on Dynamic Graphs : NOTESFast Incremental Community Detection on Dynamic Graphs : NOTES
Fast Incremental Community Detection on Dynamic Graphs : NOTES
 

Recently uploaded

欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
andreassenrolf537
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
aozcue
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
peuce
 
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
aozcue
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
u0g33km
 
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Peter Gallagher
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
lorraineandreiamcidl
 
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdfSchematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
nikoloco007
 

Recently uploaded (8)

欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
 
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
 
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
 
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdfSchematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
 

Concurrency in Distributed Systems : Leslie Lamport papers

  • 1. Leslie Lamport papers • Time, Clocks,and the Ordering of Events in a Distributed System • How to Make a MultiprocessorComputer That Correctly Executes Multiprocess Programs • The Byzantine Generals'Problem • Distributed Snapshots:DeterminingGlobalStates ofa Distributed System • The Part-Time Parliament • Paxos algorithmforconsensus. • Bakery algorithm for mutual exclusion ofmultiple threadsin a computer system that require the same resources at the same time. • Chandy-Lamportalgorithm for the determinationof consistent global states (snapshot). • Lamport signature,one of the prototypes ofthe digital signature.
  • 2. Producer-Consumer Synchronization An execution of the FIFO queue in standard model. Producer-Consumer: specification ✓ BoundedFIFO queue: implementation ? (proveits correct) A state predicateis an invariant iff it is true in every state of every execution.
  • 3. Producer-Consumer Synchronization Generalizing to marked graph synchronization. Markedgraph: Directgraph with edge-marking w/ finite set of tokens. Node fire: remove1 token fromeach input + add 1 to each output Firing sequence: fire until no node can fire An event history for the FIFO queue with N = 3. 32 0 FIFO queue as N process system. event Producer-Consumer: deterministic Mutual exclusion: non-deterministic (racew/arbiter) (arbiter decides which of 2 events happened first) process 1: process 2: v0 v0 v2 v3 v3 v2 2 2 2 2 2 2 tokens on any cycle remain constant
  • 4. Event History • No global shared clock. • Communication delay unpredictable. • p: async process (i) • c: channel, unidirectional (ij) • m: message(k) • Causality: message must be sent before it was received. • Within a process, allevents causally follow. • Send & receive of a messagecausally follow. • Concurrent events: thosenotcausally related. • Process state: events in process • Channel state: messagesentbut not yet received • Global state: process states Uchannel states • - consistent: a message not sent is neither in channel or recieved • - transitless: all channels are empty (strong: consistent + transitless) • past(e): all events that causally happen beforee • max_past(e): events that happen justbeforee (each process) • min_future(e): events thathappen justafter e message process 0 internal send recieveevent 0 channel Pictures of event histories were first used to describe distributed systems.
  • 5. Standard Model • Event history describes all sequences of states that represent executions in the standard model. • The executions are not inherently different, but artifacts of the standard model. It requires concurrent executions of two operations to be modeled as ocurring in an order. • The problem of implementing a distributed system can often be viewed as that of maintaining a global invariant even though different processes may have incompatible views of what the current state is. • The standard model provides the most practical way to reason about invariance. Execution is represented as a sequence of atomic transitions states.
  • 6. Mutual Exclusion • Safety: no 2 ciritical section executed concurrently. • Liveness: some process eventually executes its CS. • Assumption: "process fairness" every process eventually takes a step. • BAKERY ALGORITHM • Firstto implement mut-ex without any lower level mut-ex. • Customers taketickets, and lowestnumber ticket is served first. • Each process computes its ticket number from others'tickets. • Proof does not requireread/write of entire number be atomic. Synchronizing N processes, each with a section of code called its critical section.
  • 7. C C Two-arrow Model • a • a A B AB A B AB e e f f e f Two-arrow model for event history A B C A B A B A B D For A4: A: data = 10 B: sent= T C: if (sent) D: read data CAB DSYNC fail SYNC pass A1 A2 A3 A4 memory barrier interprocess communication SYNC fail
  • 8. Compiler Instruction Reordering RULE: Thou shalt notmodify thebehaviorof asingle-threadedprogram. ProblematicwithLock-freeprogramming. Use C++11 atomics. recvValue() canreadgarbage value.
  • 10. Implied Compiler Barrier CPUfence instructionsalsopreventcompilerreordering. C++11 atomic instructionspreventcompilerreordering.
  • 11. Implied Compiler Barrier Except inline,pure functionsa call to an external functionisevenstrongerthanacompilerbarrier,since the compilerhasnoideawhatthe function’sside effectswillbe.
  • 12. Register replacement What if multipleincrementshappenonregitserbefore return? Overwrite. C++11 doesn'tavoidsregisterreplacementonsharedmemorylocations.
  • 13. Types of Memory Barrier lwsync: #LoadLoad, #StoreStore, #LoadStore #StoreLoad is unique: a = b = 0 #StoreLoad acts as a full memory fence DataDependency is a barrier too.
  • 14. Weak vs. Strong Memory models
  • 15. Temporal Logic • It will always be the case that Prior invented TL. • It is dark, it was light, and it will be light again. • I will keep trying until I succeed. • Ever since Mia left home, Joe has been unhappy and has been drinking until losing consciousness. • Every time when a message is sent, an acknowledgment of receipt will eventually be returned, and the message will not be marked ‘sent’ before an acknowledgment of receipt is returned. • If it is raining, then the home team wins. • If the home team does not win, then it is not raining. • If the home team wins, then it is raining. • If it is not raining, then the home team does not win. • p : You have the flu. • q : You miss the final examination. • r : You pass the course. • p → q, ¬q ↔ r, q → ¬r, p ∨ q ∨ r • (p → ¬r) ∨ (q → ¬r), (p ∧ q) ∨ (¬q ∧ r) p → q ¬p ← ¬q p ← q ¬p → ¬q Propositional LogicA proposition is a declarative sentence that is either true or false, but not both.A logic for specifying properties over time. GP(Prior invents TL) dark ∧ P(light) ∧ F(light) try U succeed (Joe unhappy ∧ (Joe drinks U ¬(Joe conscious))) S (Mia leaves) G(Sent → (¬MarkedSent U AckReturned)) Amir Pnueli in 1977 Goranko, Valentin and Antje Rumberg, "Temporal Logic", The Stanford Encyclopedia of Philosophy (Summer 2020 Edition),Edward N. Zalta (ed.), URL = <https://plato.stanford.edu/archives/sum2020/entries/logic-temporal/>. DiscreteMathematics and Its Applications:With Combinatoricsand Graph Theory Rosen, K.H.; Krithivasan,K.;(2012)
  • 16. π-calculus Lambda CalculusExpress computation as function abstraction and application w/ binding & substitution.Formal foundation of concurrent programming. https://www.simonholywell.com/post/the-lambda-calculus/