Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3339186.3339191acmotherconferencesArticle/Chapter ViewAbstractPublication PagesicppConference Proceedingsconference-collections
research-article

(Dis)Advantages of Lock-free Synchronization Mechanisms for Multicore Embedded Systems

Published: 05 August 2019 Publication History
  • Get Citation Alerts
  • Abstract

    Embedded systems show a tendency of migrating to multicore processors. However, to fully use the potential of multicore processors, it is necessary to partition software into threads that execute concurrently and communicate using shared memory. In order to ensure the correctness and validity of shared data, threads need to synchronize their accesses. Currently prevailing lock-based synchronization introduces new challenges, as the hard-to-predict effect on the worst-case execution time seems to be most severe for embedded systems. Synchronization without locks (mainly lock-free) potentially offers many advantages over lock-based synchronization. In this paper, we investigate relevant aspects of embedded software systems affected by synchronization, including the testing process. We present conclusions in favor of and against migration to lock-free synchronization, including guidelines to help quantify the risks, and the results of applying testing tools to find concurrency bugs in software with lock-free synchronization. We look at the migration from the architectural point of view.

    References

    [1]
    Khuram Ali. Last version: 2019-04-19. JAM Benchmark. https://github.com/KhuramAli/JAM-Benchmark.
    [2]
    Gene M. Amdahl. 1967. Validity of the Single Processor Approach to Achieving Large Scale Computing Capabilities. In Proceedings of the April 18-20, 1967, Spring Joint Computer Conference (AFIPS '67 (Spring)). ACM, New York, NY, USA, 483--485.
    [3]
    Gregory R. Andrews and Fred B. Schneider. 2013. A few notes on Amdahl's law. Computer 46, 12 (Dec. 2013), 45.
    [4]
    N. Barrow-Williams, C. Fensch, and S. Moore. 2009. A communication characterisation of Splash-2 and Parsec. In 2009 IEEE International Symposium on Workload Characterization (IISWC). 86--97.
    [5]
    Rene Rivera Boost Software License Beman Dawes, David Abrahams. Last version: December 12th, 2018. boost C++ libraries. https://www.boost.org/.
    [6]
    Gabriela Breaban, Sander Stuijk, and Kees Goossens. 2017. Efficient Synchronization Methods for LET-based Applications on a Multi-processor System on Chip. In Proceedings of the Conference on Design, Automation & Test in Europe (DATE '17). European Design and Automation Association, 3001 Leuven, Belgium, Belgium, 1725--1730. http://dl.acm.org/citation.cfm?id=3130379.3130781
    [7]
    Dai Bui, Edward Lee, Isaac Liu, Hiren Patel, and Jan Reineke. 2011. Temporal Isolation on Multiprocessing Architectures. In Proceedings of the 48th Design Automation Conference (DAC '11). ACM, New York, NY, USA, 274--279.
    [8]
    G. Chennupati, R. M. A. Azad, and C. Ryan. 2016. Automatic lock-free parallel programming on multi-core processors. In 2016 IEEE Congress on Evolutionary Computation (CEC). 4143--4150.
    [9]
    Hyeonjoong Cho, Binoy Ravindran, and E. Douglas Jensen. 2006. Lock-free Synchronization for Dynamic Embedded Real-time Systems. In Proceedings of the Conference on Design, Automation and Test in Europe: Proceedings (DATE '06). European Design and Automation Association, 3001 Leuven, Belgium, Belgium, 438--443. http://dl.acm.org/citation.cfm?id=1131481.1131601
    [10]
    D. Dechev, P. Laborde, and S. D. Feldman. 2013. LC/DC: Lockless Containers and Data Concurrency a Novel Nonblocking Container Library for Multicore Applications. IEEE Access 1 (2013), 625--645.
    [11]
    D. Dechev and B. Stroustrup. 2009. Reliable and Efficient Concurrent Synchronization for Embedded Real-Time Software. In 2009 Third IEEE International Conference on Space Mission Challenges for Information Technology. 323--330.
    [12]
    David del Rio Astorga, Manuel F. Dolz, Luis Miguel Sanchez, and J. Daniel García. 2016. Discovering Pipeline Parallel Patterns in Sequential Legacy C++ Codes. In Proceedings of the 7th International Workshop on Programming Models and Applications for Multicores and Manycores (PMAM'16). ACM, New York, NY, USA, 11--19.
    [13]
    Etem Deniz and Alper Sen. 2016. Using Machine Learning Techniques to Detect Parallel Patterns of Multi-threaded Applications. Int. J. Parallel Program. 44, 4 (Aug. 2016), 867--900.
    [14]
    D. Dice and N. Shavit. 2007. Understanding Tradeoffs in Software Transactional Memory. In International Symposium on Code Generation and Optimization (CGO'07). 21--33.
    [15]
    Edsger W. Dijkstra. 2002. The Origin of Concurrent Programming, Per Brinch Hansen (Ed.). Springer-Verlag New York, Inc., New York, NY, USA, 65--138. http://dl.acm.org/citation.cfm?id=762971.762974
    [16]
    DRD. 2019. DRD: a thread error detector. http://valgrind.org/docs/manual/drd-manual.html.
    [17]
    ISO: International Organization for Standardization. 2009. ISO 26262: Functional safety road vehicles, draft. Technical Report.
    [18]
    U.S.-Canada Power System Outage Task Force. 2004. Final Report on the August 14, 2003 Blackout in the United States and Canada: Causes and Recommendations. https://www.energy.gov/sites/prod/files/oeprod/DocumentsandMedia/BlackoutFinal-Web.pdf, the HAL Open Archive, hal-01207156. Accessed January 13, 2016.
    [19]
    Keir Fraser. 2004. Practical Lock-Freedom. PhD thesis, University of Cambridge Computer Laboratory (01 2004).
    [20]
    Martin Frieb, Ralf Jahr, Haluk Ozaktas, Andreas Hugl, Hans Regler, and Theo Ungerer. 2016. A Parallelization Approach for Hard Real-Time Systems and Its Application on Two Industrial Programs. Int. J. Parallel Program. 44, 6 (Dec. 2016), 1296--1336.
    [21]
    Carlos H. González and Basilio B. Fraguela. 2014. An Algorithm Template for Domain-Based Parallel Irregular Algorithms. Int. J. Parallel Program. 42, 6 (Dec. 2014), 948--967.
    [22]
    Carlos H. González and Basilio B. Fraguela. 2017. A General and Efficient Divide-and-conquer Algorithm Framework for Multi-core Clusters. Cluster Computing 20, 3 (Sept. 2017), 2605--2626.
    [23]
    Helgrind. 2019. Valgrind-project., Helgrind: a data-race detector. http://valgrind.org/docs/manual/hg-manual.html.
    [24]
    Maurice Herlihy, Victor Luchangco, and Mark Moir. 2003. Obstruction-Free Synchronization: Double-Ended Queues As an Example. In Proceedings of the 23rd International Conference on Distributed Computing Systems (ICDCS '03). IEEE Computer Society, Washington, DC, USA, 522--.
    [25]
    Maurice Herlihy and J. Eliot B. Moss. 1993. Transactional Memory: Architectural Support for Lock-free Data Structures. SIGARCH Comput. Archit. News 21, 2 (May 1993), 289--300.
    [26]
    Maurice P. Herlihy. 1988. Impossibility and Universality Results for Wait-free Synchronization. In Proceedings of the Seventh Annual ACM Symposium on Principles of Distributed Computing (PODC '88). ACM, New York, NY, USA, 276--290.
    [27]
    C. A. R. Hoare. 1974. Monitors: An Operating System Structuring Concept. Commun. ACM 17, 10 (Oct. 1974), 549--557.
    [28]
    Zia Ul Huda, Ali Jannesari, and Felix Wolf. 2015. Using Template Matching to Infer Parallel Design Patterns. ACM Trans. Archit. Code Optim. 11, 4, Article 64 (Jan. 2015), 21 pages.
    [29]
    Amos Israeli and Lihu Rappoport. 1994. Disjoint-access-parallel Implementations of Strong Shared Memory Primitives. In Proceedings of the Thirteenth Annual ACM Symposium on Principles of Distributed Computing (PODC '94). ACM, New York, NY, USA, 151--160.
    [30]
    Jasmin Jahic, Varun Kumar, Pablo Oliveira Antonino, and Gerhard Wirrer. 2019. Testing the Implementation of Concurrent AUTOSAR Drivers against Architecture Decisions. In International conference on software architecture (ICSA). IEEE.
    [31]
    Ralf Jahr, Mike Gerdes, and Theo Ungerer. 2013. A Pattern-supported Parallelization Approach. In Proceedings of the 2013 International Workshop on Programming Models and Applications for Multicores and Manycores (PMAM '13). ACM, New York, NY, USA, 53--62.
    [32]
    Hayhurst Kelly J., Veerhusen Dan S., Chilenski John J., and Rierson Leanna K. 2001. A Practical Tutorial on Modified Condition/Decision Coverage. Technical Report.
    [33]
    Kurt Keutzer, Berna L. Massingill, Timothy G. Mattson, and Beverly A. Sanders. 2010. A Design Pattern Language for Engineering (Parallel) Software: Merging the PLPP and OPL Projects. In Proceedings of the 2010 Workshop on Parallel Programming Patterns (ParaPLoP '10). ACM, New York, NY, USA, Article 9, 8 pages.
    [34]
    Christoph M. Kirsch and Ana Sokolova. 2012. The Logical Execution Time Paradigm. In Advances in Real-Time Systems, Samarjit Chakraborty and Jörg Eberspächer (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 103--120.
    [35]
    R. Kumar and G. Agrawal and. 2002. Compiling several classes of communication patterns on a multithreaded architecture. In Proceedings 16th International Parallel and Distributed Processing Symposium. 6 pp--.
    [36]
    Shouwen Lai, Binoy Ravindran, and Hyeonjoong Cho. 2009. On Scheduling Soft Real-time Tasks with Lock-free Synchronization for Embedded Devices. In Proceedings of the 2009 ACM Symposium on Applied Computing (SAC '09). ACM, New York, NY, USA, 1685--1686.
    [37]
    Mikolaj Izdebski Laszlo Ersek. Last version: 2011-07-26. Parallel bzip2 utility. https://github.com/kjn/lbzip2/.
    [38]
    D. Lee, J. Kim, U. Kim, Y. I. Eom, H. K. Jun, and W. T. Kim. 2011. A Fast Lock-Free User Memory Space Allocator for Embedded Systems. In 2011 International Conference on Computational Science and Its Applications. 227--230.
    [39]
    N. G. Leveson and C. S. Turner. 1993. An Investigation of the Therac-25 Accidents. Computer 26, 7 (July 1993), 18--41.
    [40]
    Timothy Mattson, Beverly Sanders, and Berna Massingill. 2004. Patterns for Parallel Programming (first ed.). Addison-Wesley Professional.
    [41]
    Nicholas Nethercote and Julian Seward. 2007. Valgrind: A Framework for Heavy-weight Dynamic Binary Instrumentation. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '07). ACM, New York, NY, USA, 89--100.
    [42]
    Simon Peyton Jones. 2007. Beautiful concurrency (beautiful code ed.). O'Reilly. https://www.microsoft.com/en-us/research/publication/beautiful-concurrency/
    [43]
    Yoav Raz. 1994. Serializability by commitment ordering. Inform. Process. Lett. 51, 5 (1994), 257--264.
    [44]
    Tobias Schule. 2019. Embedded Multicore Building Blocks (EMB2): Library for parallel programming of embedded systems. https://github.com/siemens/embb.
    [45]
    Konstantin Serebryany and Timur Iskhodzhanov. 2009. ThreadSanitizer: Data Race Detection in Practice. In Proceedings of the Workshop on Binary Instrumentation and Applications (WBIA '09). ACM, New York, NY, USA, 62--71.
    [46]
    Nir Shavit and Dan Touitou. 1997. Software transactional memory. Distributed Computing 10, 2 (01 Feb 1997), 99--116.
    [47]
    Jaswinder Pal Singh, Edward Rothberg, and Anoop Gupta. 1994. Modeling Communication in Parallel Algorithms: A Fruitful Interaction Between Theory and Systems?. In Proceedings of the Sixth Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA '94). ACM, New York, NY, USA, 189--199.
    [48]
    H. S. Bjarne Stroustrup. 2019. CP.free: Lock-free programming. https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SScp-free.
    [49]
    John Turek, Dennis Shasha, and Sundeep Prakash. 1992. Locking Without Blocking: Making Lock Based Concurrent Data Structure Algorithms Nonblocking. In Proceedings of the Eleventh ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS '92). ACM, New York, NY, USA, 212--222.
    [50]
    Theo Ungerer, Christian Bradatsch, Martin Frieb, Florian Kluge, Jörg Mische, Alexander Stegmeier, Ralf Jahr, Mike Gerdes, Pavel Zaykov, Lucie Matusova, Zai Jian Jia Li, Zlatko Petrov, Bert Böddeker, Sebastian Kehr, Hans Regler, Andreas Hugl, Christine Rochange, Haluk Ozaktas, Hugues Cassé, Armelle Bonenfant, Pascal Sainrat, Nick Lay, David George, Ian Broster, Eduardo Quiñones, Milos Panic, Jaume Abella, Carles Hernandez, Francisco Cazorla, Sascha Uhrig, Mathias Rohde, and Arthur Pyka. 2016. Parallelizing Industrial Hard Real-Time Applications for the parMERASA Multicore. ACM Trans. Embed. Comput. Syst. 15, 3, Article 53 (May 2016), 27 pages.
    [51]
    S. C. Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta. 1995. The SPLASH-2 programs: characterization and methodological considerations. In Proceedings 22nd Annual International Symposium on Computer Architecture. 24--36.
    [52]
    D. Wu, L. Chen, Y. Zhou, and B. Xu. 2015. An Empirical Study on C++ Concurrency Constructs. In 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). 1--10.

    Cited By

    View all
    • (2022)CASA: An Approach for Exposing and Documenting Concurrency-Related Software PropertiesEmbedded Computer Systems: Architectures, Modeling, and Simulation10.1007/978-3-031-15074-6_9(139-154)Online publication date: 3-Jul-2022
    • (2021)ArchViMP – a Framework for Automatic Extraction of Concurrency-related Software Architectural Properties50th International Conference on Parallel Processing Workshop10.1145/3458744.3473349(1-10)Online publication date: 9-Aug-2021

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    ICPP Workshops '19: Workshop Proceedings of the 48th International Conference on Parallel Processing
    August 2019
    241 pages
    ISBN:9781450371964
    DOI:10.1145/3339186
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    In-Cooperation

    • University of Tsukuba: University of Tsukuba

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 05 August 2019

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. data race
    2. embedded
    3. lock-free
    4. multithreading
    5. synchronization

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Funding Sources

    • German Federal Ministry of Education and Research (BMBF)

    Conference

    ICPP 2019
    ICPP 2019: Workshops
    August 5 - 8, 2019
    Kyoto, Japan

    Acceptance Rates

    Overall Acceptance Rate 91 of 313 submissions, 29%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)8
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2022)CASA: An Approach for Exposing and Documenting Concurrency-Related Software PropertiesEmbedded Computer Systems: Architectures, Modeling, and Simulation10.1007/978-3-031-15074-6_9(139-154)Online publication date: 3-Jul-2022
    • (2021)ArchViMP – a Framework for Automatic Extraction of Concurrency-related Software Architectural Properties50th International Conference on Parallel Processing Workshop10.1145/3458744.3473349(1-10)Online publication date: 9-Aug-2021

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media