Research of Software Speculative Parallelization Based on Transactions

Author
ZhangXiaoQiang
Advisor
XieLunGuo
School
National University of Defense Science and Technology
Major
Computer Science and Technology
Classification
TP311.11 Programming method
Degree
Doctoral dissertation
Year
2009
Downloads
86
Citations
1

Request the full text

Abstract

The peak performance of a Multi-core computer doubles each time as the number of cores doubles. The past few years mark the start of a historic transition from sequential to parallel computation in the processors used in most personal, server and mobile computers. Few programs today are written to exploit parallelism effectively. Achieving the peak performance of a mutli-core computer requires a program execute in parallel and scale as the number of processors increase, and it is very difficult for a real-world application to achieve such performance. Because mainstream programming was sequential programming, most existing programming languages, libraries and design patterns do not address the challenges of parallel programming. A primary challenge is to find better abstractions for expressing parallel computation and writing parallel programs to exploit the computing power of the many-core system effectively.One of the challenges is how to ease the process of parallel program development. Lock-based synchronization which has been used by programmers to synchronize concurrent access to shared data, however, has well-known pitfalls:using locks for fine-grain synchronization and composing code that already uses locks are both difficult and prone to deadlock. Transactional Memory provides a high-level abstraction that can greatly simplifies conceptual understanding of parallel programs and provides an optimistic concurrency control mechanism which avoids these pitfalls and significantly eases concurrent programming without the hard problem of coordinating interactions between concurrently executing tasks, and thus was considered as a promising method of parallel programming.The second challenge is how to extract parallelism from single-threaded programs without programmer intervention and improve the efficiency as much as possible. As the natural extension of existing automatic parallelization techniques, Speculative Parallel Threading (SPT) can provide significant sources of additional thread-level parallelism, especially for irregular applications that are hard to parallelize by conventional approaches.Focusing on how to exploit computing power of many-core processor effectively, this thesis studies some key technologies in implementing Software Transactional Memory and Speculative Parallel Threading, and at last we presents TRANSPECT, a parallel programming environment for parallel programming with TM and SPT. TRANSPECT extends OpenMP, a widely used API for shared-memory parallel programming, with a set of compiler directives to express non-blocking synchronization and speculative parallelization.This paper presents a data dependency set based model of transactional memory that shows all modifications to shared data by a STM are linearizable. Based on the model, a new lightweight algorithm named LDSTM is presented here that the version information of shared data is kept in a Directory buffer which can be used to verify whether the view observed by a transaction is consistent at each data item access quickly. The new algorithm can greatly reduce the cost of conflict detection and validation. Experimental results show that LDSTM is simple, and substantially reduce the cost of conflict detection and validation. Comparison tests show that LDSTM is up to 1.53 times faster than RSTM.In a typical STM system, a basic assumption is that all data shared by concurrent threads must be encapsulated within transactions, but it is not practical in real-world application. As researchers are coming to discover, the actual semantics offered by current implementations are often counterintuitive-programs that look "obviously correct" may behave in unexpected ways. The crux of the problem is that implementations do not detect conflicts between a transaction running in one thread and non-transactional steps of another thread. In this thesis we examines this problem, and investigate the use of Causal Consistency with weaker semantics and present a new algorithm named CCSTM based on Causal Consistency that provides a good trade-off between semantic simplicity, good practical performance, and the flexibility of language memory model. The results from STMBench7 tests show that CCSTM can reduce the abort rate of transactions from 89.4% to 81.3% with 4 concurrent threads running.In this thesis we present a Loop level Speculative Multithreading (LLSM) algorithm which partitions loops into speculative threads, with special emphasis on loops for which conventional parallelizing approaches fail in. Inter-iteration dependences in the loop, which become inter-thread dependences at run time, must to be respected to enforce the correctness. To achieve good performance, the management of inter-thread dependences is crucial. In LLSM, W-W and R-W dependency are maintained by buffering, managing and committing multi-version speculative memory state. W-R dependence violation is detected at commit time by checking read-data version. LLSM has obvious advantages over LRPD, which is a well known Speculative algorithm. Experimental results show that LLSM is simple, and can substantially speedup the sequential program. The kernel test of 183.equake and177.mesa in SPEC shows that the minim speedup is 1.57.Speculation allows for maximum parallel overlap when it succeeds in LLSM, but becomes costly when it fails. Inter-thread value communication, on the other hand, introduces a fixed cost regardless of whether the dependency actually occurs or not. In this thesis, we purpose an inter-thread value communication mechanism between the source thread and target thread for inter-thread data-dependency. If inter-thread value communication is necessary in case of W-R dependence, the compiler inserts the corresponding signal and wait instructions, creating a point-to-point path to forward the values involved in the dependency, thus reduced the overhead in case of inter-thread dependencies detected.Data locality is one of the key factors in affecting the performance of parallel programs. In this thesis we present TRANSPECT, an extension of OpenMP for the Cell architecture that can exploit memory hierarchies with data locality at a high abstract level. The Cell processor is a heterogeneous multi-core processor with one Power Processing Engine (PPE) core and eight Synergistic Processing Engine (SPE) cores. Each SPE has a directly accessible small local memory, and it can access the system memory through DMA operations. The time to access local memory is much less than the time to access system memory. The experimental results on Cell show that TRANSPECT is effective.

Table of contents

Abstract 11-13 ABSTRACT 13-16 first chapter 16-30 110 all the nuclear era of software challenges 16-19 the arrival of the 1.1.1 many-core CPU era 16-18 1.1.2 all core CPU era facing software challenges 18-19 1.2 for multi-core parallel programming model 19-23 1.2.1 existing parallel program design models 19-22 1.2.2 lock mechanism and transactional memory 22 The 1.2.3 speculation is parallel 22-23 1.3 transactional memory Overview 23-26 1.3.1 affairs memory status quo 23-24 1.3.2 transactional memory research 24-26 1.4 speculative parallel mechanism 26-27 1.5 In this paper, innovation 27-28 160 full text organization 28-30 Chapter II software transactional memory, semantic models and algorithms 30-50 2.1 serial consistency and linear consistency 30-32 2.1.1 Serial Compliance (the Sequential Consistency).; 31 2.1.2 Linear consistency (Linearizability) 31-32 2.2 transactional memory semantic model 32-36 2.2.1 transactional memory operations 32-34 2.2.2 read (TM Read) semantic 34 2.2.3 transaction commits (TM Commit), and transactional conflict 34-35 2.2.4 affairs memory is linear consistency 35-36 2.3 transactional memory design considerations 36-40 2.3.1 hardware transactional memory implementation 36-37 2.3.2 software transactional memory implementation 37-39 2.3.3 software transactional memory implementation design considerations 39-40 2.4 LDSTM algorithm 40-49 2.4.1 Service application features 40-41 2.4.2 associated data modification algorithms 41-42 2.4.3 LDSTM algorithm 42-44 2.4.4 LDSTM correctness proof 44 2.4.5 LDSTM algorithm overhead analysis 44-45 2.4.6 related work comparison 45 2.4.7 LDSTM test results 45-49 2.5 Summary 49-50 the third chapter of causal consistency-based software transactional memory research 50-76 3.1 for high-level language, memory, semantic models and causal consistency 51-58 3.1.1 existing thread-parallel program development problems faced by 51-53 3.1.2 for thread parallel semantic memory model 53-57 3.1.3 Summary 57-58 3.2 transactional memory mechanisms and high-level language 58-67 3.2.1 existing software transactional memory implementation problems in 58-61 3.2.2 transaction mechanism \ 3.2.3-oriented high-level language transaction implementation mechanism 61-64 3.2.4 affairs serial order relation 64 3.2.5 affairs causal ordering relation 64-67 3.3 based on causal consistency of transactional memory implementation 67-74 the 3.3.1 affairs serial order relation is to achieve 67 3.3.2 to determine the causal transaction 67-72 3.3.3 CCSTM test 72-74 3.4 Summary 74-76 loop-oriented software speculative parallelism 76-94 4.1 thread speculation Parallel Research 77-80 4.1.1 software cycle speculative parallel implementation mechanism 78-80 4.2 LLSM cycle speculative parallel algorithm 80-86 4.2.1 thread speculative parallel concepts and definitions 80-82 4.2.2 cycle speculative parallelization algorithm LLSM 82-85 4.2.3 LLSM correctness proof 85 4.2.4 LLSM algorithm analysis 85-86 4.3 for the little bit synchronization algorithm for speculative parallel 86-89 4.3.1 little synchronous correctness conditions 87 4.3.2 synchronization selection algorithm IsSignalSynPos 87-89 4.3.3 IsSignalSynPos algorithm correctness proof of 89 4.4 LLSM algorithm testing 89-91 4.4.1 bucket sorting algorithm 89-90 4.4.2 SPECfp2000 parallel analysis 90-91 4.5 Summary 91-94 Chapter of TRANSPECT parallel mechanism 94-110 5.1 for the OpenMP heterogeneous multicore achieve 94-99 5.1.1 Cell heterogeneous multi-core processors and OpenMP Introduction 94-97 5.1.2 OpenMP parallel programming model on heterogeneous multi-core 97-99 5.2 the OpenMP TRANSPECT extension 99-101 5.2.1 cycle speculative parallel work-sharing construct 99-101 5.2.2 atomic work-sharing construct 101 5.3 TRANSPECT achieve 101-105 5.3.1 based on space polyhedron cycle access to the range of data to identify 102-103 5.3.2 front-end compiler support 103-104 5.3.3 code generation mechanism 104-105 5.4 test 105-108 5.4.1 alias data buffer mechanism performance testing 105-107 5.4.2 speculation is parallel testing 107-108 5.5 Summary 108-110 Chapter VI Conclusion 110-114 6.1 thesis work, innovation and summary 110-111 6.2 research prospects 111-114 thank 114-116 References 116-126 author academic achievements obtained during the study period, 126-128 to participate during the PhD research work 128

Related dissertations

  1. The Study of Real Estate Cycle Fluctuation in Shanghai
  2. Study on Method of Dual-Robot Coordination
    OuYangFan ·South China University of Technology ·2013 ·Doctoral dissertation
  3. Security Interaction Strategy of RBAC Based on Reconcile Domain
    DaiJia ·Harbin Institute of Technology ·2012 ·Master's thesis
  4. Research and Application of Multi-Processing Load Balancing Technology Based on Multi-Core in Cloud Computing
    WuHeSheng ·Nanjing University ·2013 ·Doctoral dissertation
  5. Optical Capture Based Development of Virtual Interaction System
    ZhouXiaoYang ·Harbin Institute of Technology ·2012 ·Master's thesis
  6. A Professional Technology Institute Virtual Design and Realization of the System
  7. Research and Develop on the Simulating System for Binocular Stereo Measurement
  8. Research on Model and Roam Technology of3D Scene Based on WEB
    HeYingYing ·Harbin Engineering University ·2013 ·Master's thesis
  9. Motion Simulation of Guide Wire in Virtual Intravascular
    JieChengKai ·Beijing University of Technology ·2013 ·Master's thesis
  10. Natural Landscape Simulation Research Based on Particle System
  11. The Research of Path Planning and Collision Detection Method in Virtual Battlefield
    LiTeng ·Nanchang University of Aeronautics and ·2013 ·Master's thesis
  12. Design and Implementation of Virtual Campus Roaming System
  13. Design and Realization of Virtual3D Scene Roaming System
  14. Research of Collison Detection Algorithm Based on Spatial Domain
    LiZhen ·Hunan Normal University ·2013 ·Master's thesis
  15. Research and Realization of Haptic Rendering Virtual Assembly System Based on Force Feed-back
  16. Research on Parallel Collision Detection Based on Delta3D
    KouZhaoKun ·Harbin Engineering University ·2013 ·Master's thesis
  17. The 3D dynamic simulation of cloth
    Jia ·Liaoning Normal University ·2013 ·Master's thesis
  18. Visualization Technology of Wheat Growth
    SongWeiGuo ·Nanjing Agricultural College ·2013 ·Master's thesis
  19. Research on the Visual Simulation of Tree Motion in Wind and Rain
  20. Real time simulation of CUDA fluid and solid interaction based on complex shape