Comments (4)
lamport timestamp 第二步不是很理解,「P2 先接收到了此事件,本地更新逻辑时间戳,这个事件在 P2 中为m1@(2,P2)。」,为啥p2的time一定是2
from bmpi.dev.
lamport timestamp 第二步不是很理解,「P2 先接收到了此事件,本地更新逻辑时间戳,这个事件在 P2 中为m1@(2,P2)。」,为啥p2的time一定是2
因为P2中并没有m1的版本,当它接受到P1发送的m1后会自动加1,这样时间戳就变成2了。你看算法中就是选择本地或接受事件中更大的值,在这个例子就是1,然后再给它自增1,变成2了。
from bmpi.dev.
@madawei2699 明白了,一开始我理解成 m1 、m2 、... 、mn 共享一个 P2_local_time 了
from bmpi.dev.
@madawei2699 明白了,一开始我理解成 m1 、m2 、... 、mn 共享一个 P2_local_time 了
可以把本地时间戳理解为数据的版本号,每个数据(变量)都有自己的版本号
from bmpi.dev.
Related Issues (20)
- 云端 IDE · 构建我的被动收入 HOT 4
- 如何学习一门技术 · 构建我的被动收入 HOT 8
- 分布式系统下的认证与授权 · 构建我的被动收入 HOT 4
- 我的2021 · 构建我的被动收入 HOT 6
- 复盘2021 # 组合季报(2021Q4) · 构建我的被动收入 HOT 3
- 走进 Web3 · 构建我的被动收入 HOT 14
- 一款产品的从0到1之旅 · 构建我的被动收入 HOT 2
- 写在第二十五万字 · 构建我的被动收入 HOT 8
- 写在第二十五万字 · 构建我的被动收入 HOT 2
- 编程语言是如何实现泛型的 · 构建我的被动收入 HOT 12
- 编程语言是如何实现并发的之操作系统篇 · 构建我的被动收入 HOT 3
- 疫情与战争 # 组合季报(2022Q1) · 构建我的被动收入 HOT 5
- 失败驱动开发 · 构建我的被动收入 HOT 1
- 慢慢变富 # 组合月报(202105) · 构建我的被动收入 HOT 1
- 零成本搭建现代博客之SEO优化篇 · 构建我的被动收入 HOT 3
- 编程语言是如何实现并发的之并发模型篇 · 构建我的被动收入 HOT 10
- 从技术难题中学习 · 构建我的被动收入 HOT 2
- 构建你的交易系统 · 构建我的被动收入 HOT 1
- Google软件工程之文化篇 · 构建我的被动收入 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bmpi.dev.