Refactoring Java Concurrent Programs Based on Synchronization Requirement Analysis
Authors:
- Binxian TaoBTBinxian Tao
- Ju QianJQJu Qian
- 1 September 2014
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- No. 10636773,p. 361-370
Abstract
Writing high quality concurrent programs is challenging. A concurrent program that is not well-written may suffer from coarse synchronization problems, e.g., overly-large critical sections, overly-coarse locks, and etc. These coarse synchronizations may introduce unnecessary lock contention and thereby affect the parallel execution of running threads. To optimize them, people suggest use refactorings, e.g., Split Lock refactoring and Split Critical Section refactoring, to gradually evolve the synchronization code for better parallelism. However, manually identifying the refactoring opportunities is difficult and by-hand code transformations are error-prone. To reduce the manual efforts, this paper proposes an automated refactoring approach for Java concurrent programs based on synchronization requirement analysis. It can automatically analyze the existing synchronization code to identify synchronization requirements. Bases on these requirements, we can find Split Lock, Split Critical Section, and Convert to Atomic refactoring opportunities and then make proper code transformation for each of them. Our experiment shows that the approach does find effective refactoring opportunities in real projects and can transform the refactorable code correctly. This indicates the approach could be helpful for concurrent program evolution.Keywords
This publication has 16 references indexed in Scilit:
- Finding shrink critical section refactoring opportunities for the evolution of concurrent code in trustworthy softwareScience China Information Sciences, 2013
- Towards concurrency refactoring for x102009
- MUVI2007
- Observations on the assured evolution of concurrent Java programsScience of Computer Programming, 2005
- Automatically Reducing Repetitive Synchronization with a Just-in-Time Compiler for Java2005
- Pointer analysis2001
- Removing unnecessary synchronization in Java1999
- Static Analyses for Eliminating Unnecessary Synchronization from Java Programs1999
- Lock Coarsening: Eliminating Lock Overhead in Automatically Parallelized Object-Based ProgramsJournal of Parallel and Distributed Computing, 1998
- Synchronization transformations for parallel computing1997