सभी किताबें

पेशेवर

1 Markets I: The Ecosystem and Exchange-Traded Marketsबाज़ार ऑनलाइन 2 Markets II: Rates, FX and Creditबाज़ार ऑनलाइन 3 Markets III: Commodities, Energy and Cryptoबाज़ार ऑनलाइन 4 Quantitative Methodsविधियाँ ऑनलाइन 5 Derivatives and Volatilityडेरिवेटिव्स ऑनलाइन 6 Rates, Credit, XVA and Riskब्याज दरें, क्रेडिट और जोखिम ऑनलाइन 7 Research Craft: Predictors, Backtests, Measurement, Portfoliosअनुसंधान ऑनलाइन 8 Strategies I: Equities and Futuresरणनीतियाँ ऑनलाइन 9 Strategies II: Volatility, Relative Value, Macro and the Bank Desksरणनीतियाँ ऑनलाइन 10 Microstructure and Executionनिष्पादन ऑनलाइन 11 Market Making and High-Frequency Tradingमार्केट मेकिंग ऑनलाइन 12 Machine Learning for Marketsमशीन लर्निंग ऑनलाइन 13 Low-Latency Softwareतकनीक ऑनलाइन 14 Networks, Hardware and Trading Infrastructureतकनीक ऑनलाइन 15 Research, Data and Risk Platformsतकनीक ऑनलाइन 16 The Desk and the Firmफ़र्म ऑनलाइन 17 The Industry: Firms, Roles and Careersकरियर ऑनलाइन 18 Interviews I: Maths, Probability and Speedकरियर ऑनलाइन 19 Interviews II: Markets, Trading Games and the Final Roundकरियर ऑनलाइन 20 Interviews III: Codeकरियर ऑनलाइन
ऐप्स परिचय Coach लॉग इन पढ़ना शुरू करें

Computer Science · शब्दावली

Happened-before relation, concurrent events, Lamport clock, vector clock क्या है?

अन्य नाम: happened-before relation · concurrent events · Lamport clock · vector clock

Definition 25.6 University Computer Science — Year 3 · अध्याय 25 — Distributed Systems: Time, Failures and Remote Calls

The happened-before relation →\to on the events of a run is the smallest transitive relation such that e→fe \to f if ee comes before ff in the same process, or ee sends a message that ff receives. Two distinct events are concurrent events, written e∥fe \parallel f, if neither e→fe \to f nor f→ef \to e. A Lamport clock is a counter in each process: before each event the process adds 1 to it, a message carries the sender’s counter, and a receive first sets the counter to the larger of its own and the message’s. The value L(e)L(e) after the event is its timestamp. A vector clock keeps, in each of nn processes, a vector of nn counters: before each event, process ii adds 1 to entry ii; a message carries the sender’s vector, and a receive first takes the entrywise maximum of its own and the message’s. V(e)V(e) is the vector after the event. For vectors, u≤vu \le v means uk≤vku_k \le v_k for every kk, and u<vu < v means u≤vu \le v and u≠vu \ne v.

A space–time diagram of the run of lamport.py: time runs to the right on each process’s line, and each arrow is a message. Each event shows its Lamport timestamp. c1 has the smaller timestamp than a2, yet no chain of messages leads from one to the other.
A space–time diagram of the run of lamport.py: time runs to the right on each process’s line, and each arrow is a message. Each event shows its Lamport timestamp. c1 has the smaller timestamp than a2, yet no chain of messages leads from one to the other.
The same run with vector clocks, each vector written as its three entries, (220) for [2, 2, 0]. The circled events c2 = [2, 2, 2] and b3 = [2, 3, 0] are concurrent: each vector has an entry larger than the other’s.
The same run with vector clocks, each vector written as its three entries, (220) for [2,2,0][2, 2, 0]. The circled events c2 =[2,2,2]= [2, 2, 2] and b3 =[2,3,0]= [2, 3, 0] are concurrent: each vector has an entry larger than the other’s.
अध्याय में पढ़ें →