Font Size: a A A

Research And Implementation Of Software Automatic Refactoring Method For Synchronization Mechanism In Parallel Program

Posted on:2019-04-19Degree:MasterType:Thesis
Country:ChinaCandidate:Y J ZhengFull Text:PDF
GTID:2348330542463955Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the popularization and completion of the Java Multi-Threading technology,the Concurrent Program technology is going to maturely apply little by little in every aspects of multi-core and many-core processor.However,in the designing of programming pattern by the Concurrent Program,the Thread-Safe problem prompted programming personnel to face austere challenges.The Non Thread-Safe problem would generate the program bugs which are made by data race in Multi-Treading exploitation,in order that would lead the overall program to collapse.For dealing with the Non Thread-Safe problem,the Java provides Multi-Thread Synchronous Mechanism which include Lock Synchronization and Atomic Block Synchronization Mechanisms.Meanwhile,the Java provides Thread-Safe Collection's Internal Synchronous,such as Hashtable and ConcurrentHashMap in the Hash Mechanism,and these internal synchronizations would provide safeguard of Thread-Safe for the Multi-Threading Mechanism.Which Multi-Threading Synchronous Mechanism should be used to reduce program bugs preferably,and this become to the important problem in programming personnel's study.This essay focused on Multi Thread Synchronization Mechanism to expand the study.Based on the Thread-safe problem as the entry point,used two Built-in Synchronization Hash Mechanisms as objects of study to explore the Thread-safe problem.By testing the comparison between these two Built-in Synchronization Hash Mechanisms to explore the Hashtable and Concurrent HashMap's merits in different situation,and then provide the theoretical basis for the Built-in Synchronization Hash Mechanisms' Automatic Reconfiguration.Under the background of Hash Mechanisms,utilizing the comparison test between Avoiding Non Thread-Safe Problem's Concurrent Flow Method and Traditional Multi Thread Mechanism to make further exploration for the solution about the Thread-safe problem.Based on the in-depth study about the Thread-safe problem,to expand the study and reflection about dealing with Multi Thread-safe Synchronization Mechanism.Using usual Synchrolock Mechanism and Atomic Block Mechanism to work out the Thread-safe problem.Using the testing result between these two Synchronization Mechanisms by different program situation to explore the performance variation about Synchronization Mechanisms,and to analyze Synchronization Mechanisms' merit in various kinds of scenes,and then provide the theoretical basis for Synchronization Mechanisms' Automatic Reconfiguration.This essay provides a kind of JAVA Multi Thread Synchronization Mechanism's Software Automatic Reconfiguration Method.It accomplished two Reconfiguring Tools of Thread-safe Synchronization Mechanisms – Rehasher and Resynchronizer.Rehasher achieved the Built-in Synchronization Hash Mechanism's Automatic Reconfiguration from Hashtable to Concurrent HashMap,and Resynchronizer achieved the Automatic Reconfiguration from Synchrolock to Atomic Blcok.Using Abstract Syntax Tree to assisted clear the Syntactic Structure up.It have achieved two Reconfiguring Tools of Thread-safe Synchronization Mechanisms in the Eclipse JDT.These Reconfiguring Tools have achieved design by the theoretical basis of in-depth research about Thread-safe Synchronization Mechanism,and have used comparison testing program to test,then the result have indicated the Rehasher and Resynchronizer can achieve the expectant reconstruction work efficiently.
Keywords/Search Tags:Software refactoring, multithreading synchronization mechanism, software analysis, abstract syntax tree, automatic refactoring tool
PDF Full Text Request
Related items