Comparative Modeling and Verification of Pthreads and Dthreads

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

4 Scopus citations

Abstract

The POSIX threads (Pthreads) library is a thread API for C/C++ to control parallel threads and spawn concurrent process flows. Programming in Pthreads usually suffers from undesirable deadlock and data race problems due to the potential non-deterministic execution behaviors between parallel threads. Dthreads is another multithreading model re-implementing Pthreads, which was proposed by Liu et al. for efficient deterministic multithreading. Under specific test cases, they found out that Dthreads can effectively prevent data races. But they have not made comparison test with Pthreads. In order to formally compare Pthreads with Dthreads over deadlocks and data races, in this paper, we apply CSP (Communicating Sequential Processes) to model part of APIs in Pthreads and Dthreads, as well as two classical example programs. By using the model checker PAT (Process Analysis Toolkit), for our considered examples, we verify that deadlocks and data races exist in Pthreads, but do not exist in Dthreads. Our comparative modeling and verification of Pthreads and Dthreads show that Dthreads is better than Pthreads on eliminating data races and preventing deadlocks.

Original languageEnglish
Title of host publicationProceedings - 17th IEEE International Symposium on High Assurance Systems Engineering, HASE 2016
EditorsRadu Babiceanu, Helene Waeselynck, Jie Xu, Raymond A. Paul, Bojan Cukic
PublisherIEEE Computer Society
Pages132-140
Number of pages9
ISBN (Electronic)9781467399128
DOIs
StatePublished - 1 Mar 2016
Event17th IEEE International Symposium on High Assurance Systems Engineering, HASE 2016 - Orlando, United States
Duration: 7 Jan 20169 Jan 2016

Publication series

NameProceedings of IEEE International Symposium on High Assurance Systems Engineering
Volume2016-March
ISSN (Print)1530-2059

Conference

Conference17th IEEE International Symposium on High Assurance Systems Engineering, HASE 2016
Country/TerritoryUnited States
CityOrlando
Period7/01/169/01/16

Keywords

  • Dthreads
  • Modeling
  • Pthreads
  • Verification

Fingerprint

Dive into the research topics of 'Comparative Modeling and Verification of Pthreads and Dthreads'. Together they form a unique fingerprint.

Cite this