Font Size: a A A

Research On Multithreading Deterministic Execution Technology Based On Weak Memory Consistency

Posted on:2019-06-26Degree:MasterType:Thesis
Country:ChinaCandidate:Y H ZhouFull Text:PDF
GTID:2428330599977705Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
In recent years,with the rapid development of multi-core processors,people have widely used parallel technologies to meet the need for program performance.As a result,many parallel programming problems have been brought up.This article is to study one of the problem deterministic issue.It brings inconvenience to the writing,debugging and testing of parallel programs,and at the same time reduces the reliability of the program.This paper proposes a deterministic execution technique for the shared memory multithreaded program on the domestic Phytium platform,and deterministic execution system DetRT is designed to replace the Pthread runtime library.First of all,this paper studies the source of deterministic problems and divides them into data race and synchronous competition.The use of TSO weak memory consistency is based on the demonstration of weak memory consistency on deterministic execution system performance enhancements.This paper proposes a deterministic execution technique based on weak memory consistency.This technique adopts a serial phase and a parallel phase to execute alternately,and synchronous operation is a basis for segmentation.Memory isolation between threads during parallel stages,and memory modification of threads during serial stages.This paper proposes two improvements to the application features of the Phytium platform.The first is to propose serialized partial parallelization technique.The threads that use different synchronization operations are divided into different related thread groups.The threads in the same thread groups are serialized and the threads in the different groups are parallelized.It solve the problem of performance degradation caused by synchronous execution.The second is to propose a performance-directed labeling technique that allows long parallel distance threads to skip the specified serial phase.It solves the load imbalance problem in the parallel phase,and brings a new method for performance optimizing in the programming.This paper uses the memory isolation and submission technology to achieve TSO weak memory consistency.This technology uses processes instead of threads technology and page protection mechanisms to achieve shared memory isolation in parallel phase and memory submission in the serial phase.At the same time,token queuing is used to provide a deterministic guarantee for the sequence execution of serial phase.Finally,this paper implements the deterministic execution system DetRT on the Phytium platform,which acts as a drop-in replacement for Pthread library.Functional testing shows that it can guarantee the determinism of multi-threaded program execution when synchronous competition and data competition occur.The performance test shows that DetRT has comparable performance with Dthreads under the common test sets;under the Phytium platform performance test sets,the average run time is 2.25 times that of Pthread,and it even reaches 1.79 times after performance tuning.It achieves better performance than Dthreads which average run times is 3.58 times of Pthread.
Keywords/Search Tags:Multi-threading, Deterministic Execution System, Synchronization Operation, Phytium Platform
PDF Full Text Request
Related items