Cargando…

Verifying Visibility-Based Weak Consistency

Multithreaded programs generally leverage efficient and thread-safe concurrent objects like sets, key-value maps, and queues. While some concurrent-object operations are designed to behave atomically, each witnessing the atomic effects of predecessors in a linearization order, others forego such str...

Descripción completa

Detalles Bibliográficos
Autores principales: Krishna, Siddharth, Emmi, Michael, Enea, Constantin, Jovanović, Dejan
Formato: Online Artículo Texto
Lenguaje:English
Publicado: 2020
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7702252/
http://dx.doi.org/10.1007/978-3-030-44914-8_11
_version_ 1783616577047887872
author Krishna, Siddharth
Emmi, Michael
Enea, Constantin
Jovanović, Dejan
author_facet Krishna, Siddharth
Emmi, Michael
Enea, Constantin
Jovanović, Dejan
author_sort Krishna, Siddharth
collection PubMed
description Multithreaded programs generally leverage efficient and thread-safe concurrent objects like sets, key-value maps, and queues. While some concurrent-object operations are designed to behave atomically, each witnessing the atomic effects of predecessors in a linearization order, others forego such strong consistency to avoid complex control and synchronization bottlenecks. For example, contains (value) methods of key-value maps may iterate through key-value entries without blocking concurrent updates, to avoid unwanted performance bottlenecks, and consequently overlook the effects of some linearization-order predecessors. While such weakly-consistent operations may not be atomic, they still offer guarantees, e.g., only observing values that have been present. In this work we develop a methodology for proving that concurrent object implementations adhere to weak-consistency specifications. In particular, we consider (forward) simulation-based proofs of implementations against relaxed-visibility specifications, which allow designated operations to overlook some of their linearization-order predecessors, i.e., behaving as if they never occurred. Besides annotating implementation code to identify linearization points, i.e., points at which operations’ logical effects occur, we also annotate code to identify visible operations, i.e., operations whose effects are observed; in practice this annotation can be done automatically by tracking the writers to each accessed memory location. We formalize our methodology over a general notion of transition systems, agnostic to any particular programming language or memory model, and demonstrate its application, using automated theorem provers, by verifying models of Java concurrent object implementations.
format Online
Article
Text
id pubmed-7702252
institution National Center for Biotechnology Information
language English
publishDate 2020
record_format MEDLINE/PubMed
spelling pubmed-77022522020-12-01 Verifying Visibility-Based Weak Consistency Krishna, Siddharth Emmi, Michael Enea, Constantin Jovanović, Dejan Programming Languages and Systems Article Multithreaded programs generally leverage efficient and thread-safe concurrent objects like sets, key-value maps, and queues. While some concurrent-object operations are designed to behave atomically, each witnessing the atomic effects of predecessors in a linearization order, others forego such strong consistency to avoid complex control and synchronization bottlenecks. For example, contains (value) methods of key-value maps may iterate through key-value entries without blocking concurrent updates, to avoid unwanted performance bottlenecks, and consequently overlook the effects of some linearization-order predecessors. While such weakly-consistent operations may not be atomic, they still offer guarantees, e.g., only observing values that have been present. In this work we develop a methodology for proving that concurrent object implementations adhere to weak-consistency specifications. In particular, we consider (forward) simulation-based proofs of implementations against relaxed-visibility specifications, which allow designated operations to overlook some of their linearization-order predecessors, i.e., behaving as if they never occurred. Besides annotating implementation code to identify linearization points, i.e., points at which operations’ logical effects occur, we also annotate code to identify visible operations, i.e., operations whose effects are observed; in practice this annotation can be done automatically by tracking the writers to each accessed memory location. We formalize our methodology over a general notion of transition systems, agnostic to any particular programming language or memory model, and demonstrate its application, using automated theorem provers, by verifying models of Java concurrent object implementations. 2020-04-18 /pmc/articles/PMC7702252/ http://dx.doi.org/10.1007/978-3-030-44914-8_11 Text en © The Author(s) 2020 Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
spellingShingle Article
Krishna, Siddharth
Emmi, Michael
Enea, Constantin
Jovanović, Dejan
Verifying Visibility-Based Weak Consistency
title Verifying Visibility-Based Weak Consistency
title_full Verifying Visibility-Based Weak Consistency
title_fullStr Verifying Visibility-Based Weak Consistency
title_full_unstemmed Verifying Visibility-Based Weak Consistency
title_short Verifying Visibility-Based Weak Consistency
title_sort verifying visibility-based weak consistency
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7702252/
http://dx.doi.org/10.1007/978-3-030-44914-8_11
work_keys_str_mv AT krishnasiddharth verifyingvisibilitybasedweakconsistency
AT emmimichael verifyingvisibilitybasedweakconsistency
AT eneaconstantin verifyingvisibilitybasedweakconsistency
AT jovanovicdejan verifyingvisibilitybasedweakconsistency