面向并发程序中锁机制的智能化推荐方法  被引量:2

Intelligent recommendation method for lock mechanism in concurrent program

在线阅读下载全文

作  者:张杨[1] 董士程 ZHANG Yang;DONG Shicheng(School of Information Science and Engineering,Hebei University of Science and Technology,Shijiazhuang Hebei 050018,China)

机构地区:[1]河北科技大学信息科学与工程学院,石家庄050018

出  处:《计算机应用》2021年第6期1597-1603,共7页journal of Computer Applications

基  金:国家自然科学基金资助项目(61440012);河北省教育厅科学研究计划重点项目(ZD2019093);河北省基础研究计划重点基础专项(18960106D)。

摘  要:软件开发人员在并发编程中面临着各种Java锁的选择。针对如何选择合适的锁机制进而提高程序性能的问题,提出了一种帮助并发程序开发人员选择锁机制的推荐方法 Lock Rec。首先,采用程序静态分析技术,对并发程序中锁机制的使用进行分析并确定影响程序性能的程序特征属性;然后,使用改进的随机森林算法构建锁机制推荐模型,以帮助开发人员在同步锁、可重入锁、读写锁、邮戳锁这四种锁之中进行选择。分别选取了四种现有的机器学习数据集对Lock Rec进行了实验,所提方法的推荐准确率均值可达95.1%;此外使用真实并发程序对Lock Rec的推荐结果进行分析。实验结果表明Lock Rec可以有效提高并发程序的执行效率。The choices of Java locks are faced by the developers during parallel programming.To solve the problem of how to choose the appropriate lock mechanism to improve the program performance,a recommendation method named LockRec for developers of concurrent program to choose lock mechanism was proposed.Firstly,the program static analysis technology was used to analyze the use of lock mechanism in concurrent programs and determine the program feature attributes that affect the program performance.Then,the improved random forest algorithm was used to build a recommendation model of lock mechanism,so as to help the developers to choose the lock among synchronization lock,re-entrant lock,read-write lock,and stamped lock.Four existing machine learning datasets were selected to experiment with LockRec.The average accuracy of the proposed LockRec is 95.1%.In addition,the real-world concurrent programs were used to analyze the recommendation results of LockRec.The experimental results show that LockRec can effectively improve the execution efficiency of concurrent programs.

关 键 词:并发程序 锁机制 随机森林 推荐模型 程序性能 

分 类 号:TP311.53[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象