Proposals

Ad Hoc Synchronization Considered Harmful

Session information has not yet been published for this event.

*

One Line Summary

A characteristic study on ad hoc synchronization in software systems and a tool called SyncFinder to automatically identify and annotate them.

Abstract

Many synchronizations in existing multi-threaded programs are implemented in an ad hoc way. The first part is a comprehensive characteristic study of ad hoc synchronizations in concurrent programs. By studying 229 ad hoc synchronizations in 12 programs of various types (server, desktop and scientific), including Apache, MySQL, Mozilla, etc., I find several interesting and perhaps alarming characteristics: (1) Every studied application uses ad hoc synchronizations. Specifically, there are 6–83 ad hoc synchronizations in each program. (2) Ad hoc synchronizations are error-prone. Significant percentages (22–67%) of these ad hoc synchronizations introduced bugs or severe performance issues. (3) Ad hoc synchronization implementations are diverse and many of them cannot be easily recognized as synchronizations, i.e. have poor readability and maintainability.

The second part is about a tool called SyncFinder to automatically identify and annotate ad hoc synchronizations in concurrent programswritten in C/C++ to assist programmers in porting their code to better structured implementations, while also enabling other tools to recognize them as synchronizations. Evaluation using 25 concurrent programs shows that, on average, SyncFinder can automatically identify 96% of ad hoc synchronizations with 6% false positives.

I have two use cases to leverage SyncFinder’s auto-annotation. The first one uses annotation to detect 5 deadlocks (including 2 new ones) and 16 potential issues missed by previous analysis tools in Apache, MySQL and Mozilla. The second use case reduces Valgrind data race checker’s false positive rates by 43–86%.

Tags

Synchronization, System Reliability, Concurrent Programming

Presentation Materials

slides

Speaker

  • Weiwei Xiong

    UCSD/UIUC

    Biography

    Weiwei Xiong is currently a 4th year PhD student at UCSD/UIUC. Since Aug 2007, he has been working in OPERA Group with professor Yuanyuan Zhou on improving systems reliability with support from operating systems, programming language, architecture and any other useful techniques.

    Weiwei Xiong had several research papers about systems reliability at OSDI, SOSP, ASPLOS, etc.