M. F. Dolz, David del Rio Astorga, Javier Fernández, José Daniel García Sánchez, Félix García Carballeira, M. Danelutto, M. Torquati
{"title":"Embedding Semantics of the Single-Producer/Single-Consumer Lock-Free Queue into a Race Detection Tool","authors":"M. F. Dolz, David del Rio Astorga, Javier Fernández, José Daniel García Sánchez, Félix García Carballeira, M. Danelutto, M. Torquati","doi":"10.1145/2883404.2883406","DOIUrl":null,"url":null,"abstract":"The rapid progress of multi-/many-core architectures has caused data-intensive parallel applications not yet be fully suited for getting the maximum performance. The advent of parallel programming frameworks offering structured patterns has alleviated developers' burden adapting such applications to parallel platforms. For example, the use of synchronization mechanisms in multithreaded applications is essential on shared-cache multi-core architectures. However, ensuring an appropriate use of their interfaces can be challenging, since different memory models plus instruction reordering at compiler/processor levels may influence the occurrence of data races. The benefits of race detectors are formidable in this sense, nevertheless if lock-free data structures with no high-level atomics are used, they may emit false positives. In this paper, we extend the ThreadSanitizer race detection tool in order to support semantics of the general Single-Producer/Single-Consumer (SPSC) lock-free parallel queue and to detect benign data races where it was correctly used. To perform our analysis, we leverage the FastFlow SPSC bounded lock-free queue implementation to test our extensions over a set of μ-benchmarks and real applications on a dual-socket Intel Xeon CPU E5-2695 platform. We demonstrate that this approach can reduce, on average, 30% the number of data race warning messages.","PeriodicalId":185841,"journal":{"name":"Proceedings of the 7th International Workshop on Programming Models and Applications for Multicores and Manycores","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-03-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 7th International Workshop on Programming Models and Applications for Multicores and Manycores","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2883404.2883406","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
The rapid progress of multi-/many-core architectures has caused data-intensive parallel applications not yet be fully suited for getting the maximum performance. The advent of parallel programming frameworks offering structured patterns has alleviated developers' burden adapting such applications to parallel platforms. For example, the use of synchronization mechanisms in multithreaded applications is essential on shared-cache multi-core architectures. However, ensuring an appropriate use of their interfaces can be challenging, since different memory models plus instruction reordering at compiler/processor levels may influence the occurrence of data races. The benefits of race detectors are formidable in this sense, nevertheless if lock-free data structures with no high-level atomics are used, they may emit false positives. In this paper, we extend the ThreadSanitizer race detection tool in order to support semantics of the general Single-Producer/Single-Consumer (SPSC) lock-free parallel queue and to detect benign data races where it was correctly used. To perform our analysis, we leverage the FastFlow SPSC bounded lock-free queue implementation to test our extensions over a set of μ-benchmarks and real applications on a dual-socket Intel Xeon CPU E5-2695 platform. We demonstrate that this approach can reduce, on average, 30% the number of data race warning messages.
多核/多核架构的快速发展导致数据密集型并行应用尚未完全适合获得最大性能。提供结构化模式的并行编程框架的出现减轻了开发人员将此类应用程序适应并行平台的负担。例如,在多线程应用程序中使用同步机制在共享缓存多核架构上是必不可少的。然而,确保适当地使用它们的接口可能具有挑战性,因为不同的内存模型加上编译器/处理器级别的指令重排序可能会影响数据争用的发生。从这个意义上讲,竞争检测器的好处是巨大的,然而,如果使用没有高级原子的无锁数据结构,它们可能会发出误报。在本文中,我们扩展了ThreadSanitizer争用检测工具,以支持一般的单生产者/单消费者(SPSC)无锁并行队列的语义,并在正确使用时检测良性数据争用。为了执行我们的分析,我们利用FastFlow SPSC有界无锁队列实现在一组μ基准测试和双插槽Intel Xeon CPU E5-2695平台上的实际应用程序上测试我们的扩展。我们证明,这种方法平均可以减少30%的数据竞争警告消息的数量。