知识卡片

普通读书笔记卡 · 10408.a · 生成模型:未记录

领导者与分布式锁

理解等级:中级

分布式锁让某进程独占资源,等待者只需要锁最终可以释放和获取。同时,长期偏爱部分申请者会使其余进程饥饿。领导者要控制全组协调,因此它的身份要告诉同伴,而且只要可以执行,保留同一领导者通常更省成本。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Database Internals》Chapter 10. Leader Election(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch10.html#leader_election,段 8) - 结论依据:原文从身份通知与长期任期对比二者。 - 原始内容:Even though leader election and distributed locking (i.e., exclusive ownership over a shared resource) might look alike from a theoretical perspective, they are slightly different. If one process holds a lock for executing a critical section, it is unimportant