Thin locks: Featherweight synchronization for Java']Java

被引:37
作者
Bacon, DF [1 ]
Konuru, R [1 ]
Murthy, C [1 ]
Serrano, M [1 ]
机构
[1] IBM, TJ Watson Res Ctr, Yorktown Heights, NY 10598 USA
关键词
D O I
10.1145/277652.277734
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Language-supported synchronization is a source of serious performance problems in many Java programs. Even single-threaded applications may spend up to half their time performing useless synchronization due to the thread-safe nature of the Java libraries. We solve this performance problem with a new algorithm that allows lock and unlock operations to be performed with only a few machine instructions in the most common cases. Our locks only require a partial word per object, and were implemented without increasing object size. We present measurements from our implementation in the JDK 1.1.2 for AIX, demonstrating speedups of up to a factor of 5 in micro-benchmarks and up to a factor of 1.7 in real programs.
引用
收藏
页码:258 / 268
页数:11
相关论文
共 14 条
[1]  
Anderson T. E., 1990, IEEE Transactions on Parallel and Distributed Systems, V1, P6, DOI 10.1109/71.80120
[2]   SOLUTION OF A PROBLEM IN CONCURRENT PROGRAMMING CONTROL [J].
DIJKSTRA, EW .
COMMUNICATIONS OF THE ACM, 1965, 8 (09) :569-&
[3]  
GOSLING J, 1996, JAVA LANGUAGE SPECIF
[4]   BASIC TECHNIQUES FOR THE EFFICIENT COORDINATION OF VERY LARGE NUMBERS OF COOPERATING SEQUENTIAL PROCESSORS [J].
GOTTLIEB, A ;
LUBACHEVSKY, BD ;
RUDOLPH, L .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1983, 5 (02) :164-189
[5]   MONITORS - OPERATING SYSTEM STRUCTURING CONCEPT [J].
HOARE, CAR .
COMMUNICATIONS OF THE ACM, 1974, 17 (10) :549-557
[6]  
*IBM CORP, IBM 370 PRINC OP
[7]  
KRALL A, 1988, ACM WORKSH JAV HIGH
[8]  
Kruskal C. P., 1986, P 5 ANN ACM S PRINC, P218
[9]   A FAST MUTUAL EXCLUSION ALGORITHM [J].
LAMPORT, L .
ACM TRANSACTIONS ON COMPUTER SYSTEMS, 1987, 5 (01) :1-11
[10]   THE MUTUAL EXCLUSION PROBLEM .1. A THEORY OF INTERPROCESS COMMUNICATION [J].
LAMPORT, L .
JOURNAL OF THE ACM, 1986, 33 (02) :313-326