Certifying Concurrent Porgrams Using Transactional Memory
- Author
- LiLong
- Advisor
- ChenYiYun
- School
- University of Science and Technology of China
- Major
- Computer Software and Theory
- Classification
- TP311.11 Programming method
- Degree
- Doctoral dissertation
- Year
- 2008
- Downloads
- 169
- Citations
- 1
- software safety
- concurrency verification
- assembly language
- Trusted Computing Base
- proof-carrying code
- Transactional Memory
Abstract
The multicore architecture, which has provided infrastructures of better performance, has become popular. To benefit from this growth in performance, programmers are required to develop multi-threaded programs. Whereas it is difficult to ensure correctness for sequential programs, it is even more so for concurrent programs due to the interaction between multiple threads. Traditionally, programmers use locks to achieve mutual exclusion on concurrent access to shared resources. But lock-based programming is difficult to reason about and may lead to problems such as deadlock. Transactional memory (TM) is proposed as an alternate concurrency-control mechanism to avoid many of the pitfalls of the lock-based one. TM systems manage data races between threads automatically so that programmers do not have to reason about the interaction of threads manually. TM provides a programming model that may make the development of multi-threaded programs easier. Much work has been done to explore the various implementation strategies of TM systems and to achieve better performance, but little has been done on how to formally reason about programs using TM and how to make sure that such reasoning is sound.This dissertation presents a reasoning method for programs using TM and formalizes it into a Hoare-style verification framework. The reasoning method is based on invariance proof and Hoare-style reasoning and supports modular verification. The proof-carrying code (PCC) style framework is proved sound with respect to the TM semantics. And a comparison between lock-based reasoning and TM-based reasoning is presented and shows the convenience of the latter. This dissertation makes the following contributions:It presents a Hoare-style reasoning method to reason about source-level programs using TM. Even though programming using transactions is supposed to reason about easily, there are subtle properties expected by multithreaded programs. To ensure such properties are correctly enforced in a concurrent program, programmers must reason about the behaviors of their programs thoroughly. This dissertation presents a method to perform such TM-based reasoning. And the presented reasoning is based on the same intended semantics of different TM systems: to provide a programming structure that executes atomically and in isolation. This makes the presented reasoning compatible with various TM systems that respect the same intended semantics.It also presents a proof-carrying code style framework to certify the properties of assembly level programs using TM. The presented framework brings PCC into the brand-new TM area. The inference rules of the framework are proved sound with respect to the TM semantics. And examples are also given to illustrate the construction of the proofs for programs in the framework, demonstrating the effectiveness of the framework.The presented framework addresses safety issues at assembly-level directly as PCC systems do. So the complicated and error-prone compilation and optimization do not need to be trusted. And the presented reasoning method is formalize into framework and is sound due to the soundness of the framework. All the work on the framework, including its soundness proof and examples, is mechanized in proof assistant Coq. This makes our work more reliable.Through thorough comparison, it shows the convenience of TM-based reasoning over lock-based reasoning.
Table of contents
Abstract 5-7
Abstract 7-12
Chapter 1 Introduction 12-25
1.1 Background 12-16
1.1.1 procedures and security 12-13
1.1.2 formality procedures to verify 13-14
1.1.3 trusted calculated on the basis 14
1.1.4 parallel program security 14-16
1.2 proof-carrying code (PCC) 16-18
1.3 transactional memory synchronization mechanism 18-22
1.3.1 transactional memory system to achieve research 20-21
1.3.2 transactional memory system semantic description of related research 21-22
1.4 exist 22-23
1.5 This article outlined 23-25
1.5.1 research 23
1.5.2 main innovation and contribution 23-24
1.5.3 chapters arranged 24-25
Chapter 2 transactional memory program reasoning method 25-41
2.1 transactional memory synchronization mechanism 25-28
2.1.1 the semantic and programming structure 25-26
2.1.2 Strategy 26-27
2.1.3 Technical difficulties 27-28
2.2 transactional memory program reasoning method of background research 28-30
2.2.1 Hoare style reasoning 28-29
2.2.2 invariant proof 29-30
2.3 transactional memory program reasoning 30-32
2.3.1 reasoning method 30-31
2.3.2 reasoning method reliability 31-32
2.4 reasoning method instance 32-40
2.4.1 Dining Philosophers problem 32-37
2.4.2 producer - consumer problem 37-40
2.5 This chapter Summary 40-41
Chapter 3 transactional memory program verification framework 41-84
3.1 abstract machine 42-46
3.2 program specification 46-47
3.3 Separation logic 47-48
3.4 inference rules 48-52
3.5 validation framework reliability 52-59
3.6 validation framework applications 59-71
3.6.1 Dining Philosophers problem 59-67
3.6.2 producer - consumer problem 67-71
3.7 Coq achieve . 71-83
3.7.1 abstract machine 72-74
3.7.2 Procedure Specification 74
3.7.3 Separation logic 74-75
the
the 3.7.4 reasoning rule 75-78
3.7.5 framework reliability 78-79
3.7.6 validation examples 79-83
3.8 This chapter Summary 83-84
reasoning advantages of Chapter 4 of transactional memory synchronization mechanism 84-90
4.1 lock synchronization mode of reasoning 84-85
the 4.2 locks and transactional memory synchronization mechanism of reasoning 85-89
4.2.1 Non-preemptive threading model AG reasoning 86-88
4.2.2 preemptive thread control AG reasoning 88-89
4.3 This chapter Summary 89-90
Chapter 5 Conclusion 90-92
5.1 thesis work summarizes 90-91
5.2 further work 91-92
the
References 92-100
Acknowledgements 100-101
the
papers published during reading the research achievements 101
Related dissertations
- A Modular Approach on Building Certified Software System
- Certifying Compilation in an Infrastructure for Developing Trustable Software
- Research on Conflict Management Strategies in Multicore-oriented Software Transactional Memory
- The Research and Optimization of Digital Speech Codec Based on C55DSP
- Design and Implementation for the Signal Detecting System in Railway Terminal Subsystem
- Researchand Implementatrusted Management System Based on Domestic Trusted Chip
- A Distributed Programming Framework Based on Transactional Memory
- Cache Coherence Techniques for Chip Multiprocessor Architecture
- H.264 Encoder Optimization Based on TMS320DM642
- Study on Parallel Programming Models
- Authentication method based on the logical procedure in the development of High Confidence Software
- Research on Testing and Evaluating Theory of Reliability and Safety for High Dependability Software
- Study on Multi-Kernel Component-Based Embedded Operating System
- Study on Transactional Memory Programming and Software Library Optimization of Tera-Flops Computer KD-50-I
- A Pointer Logic for Safety Verification of Pointer Programs
- Certifying the Safety of Assembly Pointer Programs
- Research on Relationship and Transition between the Software Reliability and Safety
- Verifying Parallel Programs Using Software Transactional Memory
- Verification of Low-level Concurrent Code with Several Synchronization Mechanisms
- Research on Key Techniques for NUMA-aware Transactional Memory