Code Monkey home page Code Monkey logo

d2's People

Contributors

ldionne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

blockspacer

d2's Issues

Add open modes in the Repository class

The Repository class should be usable under different modes (read/write at least).

Desirable behavior: Opening an inexistant repository in read only mode should be an error (a little bit like the standard streams).

Thread ids may be reused after a thread has joined

std::thread::ids may be reused after a thread has joined. This is probably the same for boost::thread::ids. We really need a way of handling this. For example, when loading events, if a thread with the same id has already been started and terminated, we could create a new artificial id and store the original one for diagnostic purposes. The analysis would use the artificial thread id (because they all need to be different) but the diagnostic could refer to the other one (and specify that the thread id was reused).

Reference system thread ids in the diagnostic.

While we use an artificial dyno::thread_id for logging purposes, we could store the system thread id for diagnostic purposes. Since system thread ids may be reused, we could also specify the number of times that thread id has been reused (that could help the programmer to locate the deadlock?).

Create a coordinate system to identify events

It should be possible to identify unique events using some kind of coordinate system. Every event would have different coordinates.

Possible coordinates:

  • Process
    To which process the event belongs
  • Thread
    Inside the process, to which thread the event belongs
  • Segment
    Inside the thread, in which segment is the event located
  • Some other id
    Inside a segment, an event is the nth event.

Use of rvalue references in cyclic_permutation

The cyclic_permutation.hpp header contains dubious use of rvalue references for perfect forwarding. This was initially required because template parameters would not deduce to the same type if two iterators were passed with different value categories, i.e. lvalue and rvalue.

I gotta see whether:

  1. My understanding of rvalue references is completely broken (plzplzplz no)
  2. I am just abusing the feature
  3. I am doing the right thing, and things ought to be ugly

Remove asserts from the API implementation

There are several BOOST_ASSERTs in the api implementation in src/api/api.cpp. They should not be assertions and we should decide of a way to handle these cases.

Possible solution: Generate special events such that the graph construction algorithms do not explode.

Underspecification of the happens-before relation?

Locking ABBA and then BAAB in the same thread does not yield a deadlock potential because both groups are in the same thread. However, the happens-before would return that both happen at the same time. Clearly, they can't happen at the same time because they are in the same thread, i.e. they are executed in serie. Is this a design flaw?

Add support for gatelocks in parent threads.

For an example of where the current analysis falls short, see the ABBA_gatelock_in_parent_thread scenario. Adding support for this might require non-trivial changes, but it is quite important since this pattern will probably appear frequently in real applications.

Improve the efficiency of the cycle-finding algorithm.

Since we're now using tiernan_all_cycles to detect cycles, the ABBA_noise scenario can't even finish in a reasonable amount of time. Some possibilities for improvement are:

  • Use an iterative approach to seek cycles of smaller length first. Fewer deadlocks should
    happen between large number of threads, anyway.
  • Split the analysis by spotting connected components in the graph. Obviously, deadlocks
    can't happen between objects in different connected components.
  • Use an approximative algorithm. For example, our previous algorithm can find some
    deadlocks very fast. We could maybe mix the two approaches.
  • Try using Johson's elementary circuits; the worst case has a better complexity.

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.