جميع الكتب

مهني

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المسارات المهنية عبر الإنترنت
التطبيقات حول المدرب تسجيل الدخول ابدأ القراءة

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.
اقرأ في الفصل →