Font Size: a A A

Intelligent Recommendation Method For Lock Mechanism In Concurrent Programs

Posted on:2022-07-12Degree:MasterType:Thesis
Country:ChinaCandidate:S C DongFull Text:PDF
GTID:2518306527494364Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
As an important way to ensure the correctness of concurrent program state and program data,the use and research of synchronization mechanism have been widely concerned.Many synchronization control mechanisms have been applied.As a widely used synchronization mechanism,the lock mechanism is not only simple for developers,but also provides different types of lock mechanisms as a tool to ensure data consistency,which makes the development process more diversified.Developers of parallel programming are faced with choices of using various Java locks.Concern the problem that how to choose the appropriate lock mechanism to improve program performance,a recommend method was proposed.Firstly,this method uses program static analysis technology to analyze the use of lock mechanisms in concurrent programs and studies the performance differences brought by different lock mechanisms.Then the influence factor analysis method is used to determine the program characteristic attributes that affect the program performance.Next,it analyzes different types of lock mechanism programs and constructs the lock mechanism information database.Finally,the random forest algorithm in machine learning is improved by using pruning and weighting operations,and a lock mechanism recommendation model is constructed,which can help developers choose from four kinds of locks: synchronized,reentrantlock,readwritelock,and stampedlock.A recommendation tool LockRec is implemented on the Eclipse platform based on this approach.LockRec is a plug-in tool that can automatically analyze concurrent programs and recommend the use of lock mechanism.For analyzing the validity and rationality of lockrec by selecting iris,breast,wine and glass data sets,and the average accuracy is95.1%.The performance of Xalan and FOP is compared before and after using the lock mechanism recommended by LockRec.The average speedup ratio of the two programs is1.35 and 1.29 respectively.The experimental results show that LockRec can effectively improve the execution efficiency of concurrent programs.Different types of lock mechanism can deal with different business scenarios,each lock has its own characteristics and scope of use.
Keywords/Search Tags:Concurrent programs, Lock mechanism, Random forest, Recommendation model, Program performance
PDF Full Text Request
Related items