What are the drawbacks of Lamport's happens-before algorithm?
I have been reading about Lamport's happens-before technique to detect race conditions in multi-threaded programs. I do not understand its drawbacks correctly. Can someone please explain ? I have been reading the paper - Erasor - A dynamic race detector for mult开发者_运维技巧i-threaded programs.
Thanks.
Eraser lists two drawbacks of detectors based on happens-before:
- They are slow. This is less true these days than when Eraser was published. Look at FastTrack.
- Their results depend on the actual order of synchronization operations in a particular execution. That is, the bug must actually exhibit itself to be detected. This is more a fundamental property of happens-before.
I can't think of any other drawbacks offhand.
精彩评论