DOC PREVIEW
UMD CMSC 714 - Eraser

This preview shows page 1-2-3-4-5 out of 14 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

EraserEraser: A Dynamic Data Race Detector for Multi-Threaded ProgramsS. Savage, M. Burrows, G. Nelson, P. Sobalvarro, T. AndersonSerge KorenCMSC714Outline➲Introduction➲Related approaches➲Eraser's approach➲Implementation/Experience➲Conclusion10/25/2005 2 of 14Introduction●Threaded programming is everywhere●Hard to debug, “Threads are a bad idea” (Osterhout 96)●Data Race●Two concurrent threads access shared variable●At least one access is a write●No mechanism to prevent accesses from being concurrent10/25/2005 3 of 14Related Approaches●Monitors – state and procedures together●Happens-before●Events ordered between threads based on synchronization objects they access●More general, more costly●Less thorough10/25/2005 4 of 14Happens-before10/25/2005 5 of 14Lockset Algorithm●Support only lock-based synchronization●Check all read/writes as program runs●Infer protection from execution history●On each access to variable, v, by thread, t●Set C(v) = C(v) ∩ locks_held(t)●If C(v) = {}, issue warning10/25/2005 6 of 14Example●Program Locks_held C(v) {} {mu1, mu2}lock(mu1);v = v + 1; {mu1} {mu1}unlock(mu1); {}lock(mu2);v = v + 1; {mu2}unlock(mu2); {}, WARNING10/25/2005 7 of 14Improving Lockset●Initialization – initialize a shared variable without holding lock●Read-shared data – written only at initialization and then read (no need for locks)●Read-write locks – read by multiple threads, written by only one at a time10/25/2005 8 of 14Improved Lockset ExampleVirginExclusiveSharedShared-Modified10/25/2005 9 of 14rd/wr,first threadwr, new threadrdwrwrrd, new threadRead-Write Locks●Lock m protects v if m held in write for writes and in read/write for read●On each read of variable, v, by thread, t●Set C(v) = C(v) ∩ locks_held(t)●If C(v) = {}, issue warning●On each write of variable, v, by thread, t●Set C(v) = C(v) ∩ write_locks_held(t)●If C(v) = {}, issue warning10/25/2005 10 of 14Implementation●Instrument program●Indexed table of lock sets (hashed and sorted)●Shadow word●Exists for every 32-bit data segment●State condition●Lockset index●10-30 times slower than without10/25/2005 11 of 14Annotations●Memory reuse – private allocators/free lists●EraserReuse●Private locks – private implementations of locks●EraserRead/WriteLock/Unlock●Benign races – race that does not affect correctness●EraserIgnoreOn/Off10/25/2005 12 of 14Experience●Tested on different code bases●Found true data races, found false alarms●Effectiveness/Sensitivity●Found data races that had existed before●Works the same on two or ten threads●Multiple locks●Many read locks, write takes all read locks●Deadlock detection using ordering of locks10/25/2005 13 of 14Conclusion●Little data on sensitivity●Only works for locks (pthreads)●Annotations needed●Slow/doubled memory usage●Multiple lock fix incorrect/unclear●http://valgrind.org (Helgrind: a data-race detector)10/25/2005 14 of


View Full Document

UMD CMSC 714 - Eraser

Documents in this Course
MTOOL

MTOOL

7 pages

BOINC

BOINC

21 pages

Load more
Download Eraser
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Eraser and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Eraser 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?