Giter Site home page Giter Site logo

aquayi / distributed-algorithms Goto Github PK

View Code? Open in Web Editor NEW
55.0 55.0 7.0 4.7 MB

利用 Go 语言实现多种分布式算法

License: MIT License

Go 64.66% Shell 0.16% HTML 16.62% CSS 0.97% HTML 16.62% CSS 0.97%
demos distributed-algorithms distributed-systems go golang paxos raft

distributed-algorithms's People

Contributors

aquayi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

distributed-algorithms's Issues

process 的各个事件,不是 one by one 的。

$ git checkout 00c7877
$ go build -o me.exe
$ ./me.exe
...
14:25:49.227003  ## {确认收到, Time:3449, From:1, To:0, <T3446:P0>}
14:25:49.227015  ## {申请资源, Time:3445, From:1, To:-1, <T3444:P1>}
14:25:49.227018  ## {确认收到, Time:3451, From:0, To:1, <T3444:P1>}
14:25:49.227004 [3452]P1 准备占用资源 {request queue:<T3444:P1><T3446:P0>}
panic: 资源正在被 <T3446:P0> 占据,<T3444:P1> 却想获取资源。
...

从上图的 log 可以清除地看到,P1 先回复 P0 收到了 T3446:P0 消息,然后才发布了 T3444:P1 申请资源的消息。这导致了 T3446:P0 抢先占用资源,引发 panic。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.