Finding shrink critical section refactoring opportunities for the evolution of concurrent code in trustworthy software  被引量:1

Finding shrink critical section refactoring opportunities for the evolution of concurrent code in trustworthy software

在线阅读下载全文

作  者:QIAN Ju CHEN Lin XU BaoWen 

机构地区:[1]College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics [2]State Key Laboratory for Novel Software Technology,Nanjing University

出  处:《Science China(Information Sciences)》2013年第1期74-93,共20页中国科学(信息科学)(英文版)

基  金:supported by National Natural Science Foundation of China (Grant Nos. 90818027,91018005,60903026,61003020)

摘  要:With the keyword synchronized, Java provides a simple but often over-used synchronization mech- anism. Many programmers tend to use a big synchronized section to protect a large block of statements even if many of them are unnecessarily synchronized. Such coarse-gained synchronizations may increase lock contention and thereby decrease the performance of a program, especially in a multi-core environment. The decrease in performance may affect the quality of service provided by the software and hence make the software less trust- worthy. To ensure trustworthiness, this paper proposes a source-code level refactoring approach to optimize coarse-gained synchronizations. It exploits dependence and escape information to search for shrinkable critical sections and can transform them into smaller ones automatically. The approach can be used to gradually evolve concurrent code for better quality. In the approach, to achieve more optimizations, we develop a new escape analysis, named escape state analysis, which can not only tell us whether an object finally escapes but also de- termine the escape states of objects at each program site. With such an analysis, more refactoring opportunities can be found. We build a tool and test our refactoring approach on several benchmark programs. The results show that the proposed approach does make effective refactoring suggestions for the users.With the keyword synchronized, Java provides a simple but often over-used synchronization mech- anism. Many programmers tend to use a big synchronized section to protect a large block of statements even if many of them are unnecessarily synchronized. Such coarse-gained synchronizations may increase lock contention and thereby decrease the performance of a program, especially in a multi-core environment. The decrease in performance may affect the quality of service provided by the software and hence make the software less trust- worthy. To ensure trustworthiness, this paper proposes a source-code level refactoring approach to optimize coarse-gained synchronizations. It exploits dependence and escape information to search for shrinkable critical sections and can transform them into smaller ones automatically. The approach can be used to gradually evolve concurrent code for better quality. In the approach, to achieve more optimizations, we develop a new escape analysis, named escape state analysis, which can not only tell us whether an object finally escapes but also de- termine the escape states of objects at each program site. With such an analysis, more refactoring opportunities can be found. We build a tool and test our refactoring approach on several benchmark programs. The results show that the proposed approach does make effective refactoring suggestions for the users.

关 键 词:CONCURRENT SYNCHRONIZATION REFACTORING DEPENDENCE escape analysis 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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