Dynamic Data Race Detection In Concurrent Programs

Dynamic Data Race Detection In Concurrent Programs

Advisor: 

Alper Sen

Assigned to: 

Onder Kalaci

Type: 

Year: 

2014

Status: 

Summary:

Recent advances in hardware drive software to be more concurrent than ever. Concurrency in software is achieved by multithreading, which creates verification challenges. These challenges include problems such as deadlocks, race conditions and atomicity violations, all of which are notoriously difficult to detect due to the non-deterministic nature of concurrent software. Data races result from the concurrent access of shared data by multiple threads and can result in unexpected program behaviors. In this thesis, we describe techniques to detect data races in multithreaded applications. We developed a hybrid algorithm that is a combination of the state-of-the-art happens-before and lockset data race detection algorithms. We take advantage of lockset algorithm and happens-before algorithm for discarding false negatives and false positives, respectively. Our algorithm works on the binary of the program (without the need for the source code), hence makes it applicable to industrially-deployed software. Since it is a dynamic technique, it has execution time and memory overhead. We utilized the concept of segments to decrease these overheads, where a segment is formed by consecutive memory accesses of a single thread. We performed experiments to validate the effectiveness of our hybrid race detector by comparing it with a happens-before and lockset-based race detector. Our experiments on several benchmarks showed that our hybrid detector is 20\% faster than happens-before detector and produces 50\% less potential data races than the lockset detector. We proposed four different optimizations to further decrease the execution time and enhance the usability.

Özet:

Yakın zamanda donanım alanında yaşanan gelişmeler, yazılımı her zamankinden daha koşutzamanlı olmaya yöneltti. Yazılımda koşutzamanlılığa çoklu iş parçacığı ile erişilir, bu doğrulamada zorluklar yaratır. Bu zorluklar koşutzamanlılığın gerekirci olmayan doğası nedeniyle saptanması zor problemler olan kaynak bekleme, veri yarışları ve bölünmezlik ihlallerini içerir. Veri yarışları paylaşılmış verilerin çoklu iş parçacıkları tarafından koşutzamanlı erişilmesi sonucuda ortaya çıkar ve beklenmedik program davranışlarına neden olabilir. Bu tezde çoklu iş parçacıklı uygulamalarda veri yarışlarını saptama tekniklerini tanımlayacağız. Önce-gerçekleşen ve kilit kümesi algoritmalarının kombinasyonu olan melez veri yarışı algoritmasını geliştirdik. Kilit kümesi algoritmasından yaralanarak yanlış eksileri ve önce-gerçekleşen algoritmasindan yararlanarak ise yanlış artıları attık. Algoritmamız uygulamanın ikili kodu üzerinde çalışır (kaynak koda ihtiyaç duymadan), bundan dolayı endüstride konuşlanmış yazılımlara uygulanabir. Dinamik veri yarışı saptama teknikleri uzun yürütüm süresi ve yüksek hafıza gereksiniminden muzdariptir. Bahsi geçen ek yükleri azaltmak için kesit konseptinden yararlandık, bir kesit bir iş parçacığı tarafından arka arkaya yapılan hafıza erişimlerinden oluşur. Melez veri yarışı detektörümüzün etkinliğinin geçerliliğini denetlemek için bir önce-gerçekleşen ve bir kilit kümesi detektörü ile karşılaştırarak deneyler yaptık. Çeşitli sabit noktalarla gerçeklestirdiğimiz deneyler gösterdi ki melez detektörümüz önce-gerçekleşen detektöre kıyasla \%20 daha hızlıdır ve kilit kümesi detektöre kıyasla \%50 daha az veri yarışı üretir. Kullanılırlığı ve performansı artıracak 4 farklı optimizasyon uyguladık.

Contact us

Department of Computer Engineering, Boğaziçi University,
34342 Bebek, Istanbul, Turkey

  • Phone: +90 212 359 45 23/24
  • Fax: +90 212 2872461
 

Connect with us

We're on Social Networks. Follow us & get in touch.