The University of Southampton
University of Southampton Institutional Repository

Separating computation from communication:: a design approach for concurrent bug finding

Separating computation from communication:: a design approach for concurrent bug finding
Separating computation from communication:: a design approach for concurrent bug finding
With the spread of multi-core systems, the need to write concurrent programs in order to take advantage of their multi-core processors continues to grow. Developing concurrent programs free of errors is very difficult, due to their often non-deterministic nature. Further, weak memory models (WMMs) implemented in modern multi-core hardware architectures introduce additional executions that can lead to seemingly counter-intuitive results which confound the developers' reasoning. Although testing is a widely used approach to finding program errors, testing-only approaches, such as stress testing, remain highly ineffective for concurrency errors that rarely manifest themselves and are difficult to reproduce. Despite the substantial advancements in the field of analysis and verification of concurrent programs assuming the classical Sequential Consistency (SC) memory model, the stateof- the-art technology for other WMMs is quite unsatisfactory. The main goal of this thesis is to extend existing successful techniques that have been implemented for SC to more general WMMs. This work describes a general approach that allows to combine different verification techniques with different memory models in the style of a plug-and-play architecture. Its main idea is to introduce an abstraction that allows us to separate the computation and communication concerns of concurrent programs, without loosing the efficiency of existing approaches. We start by introducing an abstract data type, called shared memory abstraction (SMA), that encapsulates the semantics of the underlying memory model and implements it under the simpler SC and assume that all the standard concurrency operations in multi-threaded programs are performed by invoking the corresponding calls to API operations over the SMA. Furthermore, we implement efficient SMAs for Total Store Ordering (TSO) and Partial Store Ordering (PSO) semantics in our tool LazySMA and we experimentally demonstrate that it is very effective in finding bugs on a large set of benchmarks from the literature. iv Then, we formally characterize the concept of thread-asynchronous transition systems that allows us to optimize intra-thread analysis by rearranging the operations of the threads. this thesis also shows that several concurrent verification techniques from the literature can easily be recast in our setting and thus be extended to weak memory models. We give thread-asynchronous SMA implementations for the SC, TSO, and PSO memory models that are based on the idea of individual memory unwinding. Finally, we instantiate our approach by developing a new, efficient BMC-based bug finding tool for multi-threaded C programs under SC, TSO, or PSO memory models, and experimentally demonstrate on the same set of benchmarks used for LazySMA that it is competitive with existing tools.
University of Southampton
Tomasco, Ermenegildo
7b944585-0193-4dab-861b-8d5cdccf82cd
Tomasco, Ermenegildo
7b944585-0193-4dab-861b-8d5cdccf82cd
Parlato, Gennaro
c28428a0-d3f3-4551-a4b5-b79e410f4923

Tomasco, Ermenegildo (2017) Separating computation from communication:: a design approach for concurrent bug finding. University of Southampton, Doctoral Thesis, 128pp.

Record type: Thesis (Doctoral)

Abstract

With the spread of multi-core systems, the need to write concurrent programs in order to take advantage of their multi-core processors continues to grow. Developing concurrent programs free of errors is very difficult, due to their often non-deterministic nature. Further, weak memory models (WMMs) implemented in modern multi-core hardware architectures introduce additional executions that can lead to seemingly counter-intuitive results which confound the developers' reasoning. Although testing is a widely used approach to finding program errors, testing-only approaches, such as stress testing, remain highly ineffective for concurrency errors that rarely manifest themselves and are difficult to reproduce. Despite the substantial advancements in the field of analysis and verification of concurrent programs assuming the classical Sequential Consistency (SC) memory model, the stateof- the-art technology for other WMMs is quite unsatisfactory. The main goal of this thesis is to extend existing successful techniques that have been implemented for SC to more general WMMs. This work describes a general approach that allows to combine different verification techniques with different memory models in the style of a plug-and-play architecture. Its main idea is to introduce an abstraction that allows us to separate the computation and communication concerns of concurrent programs, without loosing the efficiency of existing approaches. We start by introducing an abstract data type, called shared memory abstraction (SMA), that encapsulates the semantics of the underlying memory model and implements it under the simpler SC and assume that all the standard concurrency operations in multi-threaded programs are performed by invoking the corresponding calls to API operations over the SMA. Furthermore, we implement efficient SMAs for Total Store Ordering (TSO) and Partial Store Ordering (PSO) semantics in our tool LazySMA and we experimentally demonstrate that it is very effective in finding bugs on a large set of benchmarks from the literature. iv Then, we formally characterize the concept of thread-asynchronous transition systems that allows us to optimize intra-thread analysis by rearranging the operations of the threads. this thesis also shows that several concurrent verification techniques from the literature can easily be recast in our setting and thus be extended to weak memory models. We give thread-asynchronous SMA implementations for the SC, TSO, and PSO memory models that are based on the idea of individual memory unwinding. Finally, we instantiate our approach by developing a new, efficient BMC-based bug finding tool for multi-threaded C programs under SC, TSO, or PSO memory models, and experimentally demonstrate on the same set of benchmarks used for LazySMA that it is competitive with existing tools.

Text
Final Thesis - Version of Record
Available under License University of Southampton Thesis Licence.
Download (1MB)

More information

Published date: October 2017

Identifiers

Local EPrints ID: 418976
URI: http://eprints.soton.ac.uk/id/eprint/418976
PURE UUID: 2f7e94cd-f35c-4459-870b-cda03869eaaf

Catalogue record

Date deposited: 27 Mar 2018 16:30
Last modified: 15 Mar 2024 19:04

Export record

Contributors

Author: Ermenegildo Tomasco
Thesis advisor: Gennaro Parlato

Download statistics

Downloads from ePrints over the past year. Other digital versions may also be available to download e.g. from the publisher's website.

View more statistics

Atom RSS 1.0 RSS 2.0

Contact ePrints Soton: eprints@soton.ac.uk

ePrints Soton supports OAI 2.0 with a base URL of http://eprints.soton.ac.uk/cgi/oai2

This repository has been built using EPrints software, developed at the University of Southampton, but available to everyone to use.

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we will assume that you are happy to receive cookies on the University of Southampton website.

×