Abstract
The thread synchronization mechanism employed by Java is derived from the Hoareās monitor concept. In order to minimize its implementation complexity, the monitor provided by Java is quite primitive. This design decision prefers simple concurrent objects and single-thread programs. However, we think the Java monitor is over simplified for developing more elaborated concurrent objects. Besides, several features of the Java monitor will bring extra overhead when thread contention gets higher. Currently, we have identified five drawbacks of the Java monitor. In this paper, we will first analyze these drawbacks in depth, and then propose a new monitor-based synchronization mechanism called EMonior. It has better expressive power, and introduces fewer overheads than the Java monitor when contention occurs. EMonior uses a preprocessor to translate the Java programs containing EMonitor syntax to regular Java programs that invoke EMonitor class libraries. It is very suitable to replace the Java monitor with the EMonitor when developing elaborate concurrent objects or high-contention concurrent systems.
This work was supported both by the National Science Council grant NSC88-2213-E-009-087 and the industry reaearch program 89-EC-2-A-17-0285-006 of the ROC Economic Bureau.
Chapter PDF
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
G. Andrews, Concurrent Programming-Principles and Practice, The Benjamin/Cummings Publishing Company, Inc., 1991.
P. Buhr, M. Fortier, and M. Coffin, āMonitor Classification,ā ACM Computing Surveys, vol. 27, no. 1, pp. 63ā107, March 1995.
D. Bacon, R. Konura, and C. Murthy, et al, āThin Locks: Featherweight Synchronization for Java,ā Proc. ACM SIGPLANā 98 Conf. on Programming Language Design and Implementation, pp. 258ā268, 1998.
B. Brosgol, āComparison of the Concurrency Features of Ada 95 and Java,ā Proc. of ACM SIGAda Annual IntÄŗ Conf. on Ada Technology,pp. 175ā192, 1998.
J. Gosling, B. Joy, and G. Steele, The Java Language Specification, Addison-Wesley, 1996.
Y. Gu, B. Lee, and W. Cai, āEvaluation of Java Thread Performance on Two Differenct Multithreaded Kernels,ā Operating Systems Review, vol. 33, no. 1, pp. 34ā46, Jan. 1999.
N. Gehani, āCapsules: A Shared Memory Access Mechanism for Concurrent C/C++,ā IEEE Transactions on Parallel and Distributed Systems, vol. 4, no. 7, pp. 795ā811, July 1993.
C. Hoare, āMonitor: An Operating System Constructing Concept,ā CACM, vol. 17, no. 10, pp. 549ā557, 1974.
L. Kotulski, āAbout the Semantic Nested Monitor Calls,ā SIGPLAN Notices, vol. 22, no. 4, pp. 80ā82, 1987.
D. Lea, Concurrent Programming in Java-Design Principles and Patterns, Addison-Wesley, 1997.
R. Olsson and C. McNamee, āExperience Using the C Preprocessor to Implement CCR, Monitor, and CSP Preprocessors for SR,ā Software-Practice and Experience, vol. 26, no. 2, pp. 125ā134. Feb. 1996.
S. Oaks and H. Wong, Java Threads, OÅeilly & Associates, Inc., 1997.
S. Stubbs, D. Carver, and A. Hoppe, āIPCC++: A Concurrent C++ Based on a Shared-Memory Model,ā Journal of Object-Oriented Programming, vol. 8, no. 2, pp. 45ā50, 66, May 1995.
S. Yuan and Y. Hsu, āDesign and Implementation of a Distributed Monitor Facility,ā Computer Systems Science and Engineering, vol. 12, no. 1, pp. 43ā51, Jan. 1997.
C. Varela and G. Agha, āWhat after Java? From Objects to Actors,ā Computer Networks and ISDN Systems, vol. 30, no. 1ā7, pp. 573ā577, 1998.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
Ā© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chiao, HT., Wu, CH., Yuan, SM. (2000). A More Expressive Monitor for Concurrent Java Programming. In: Bode, A., Ludwig, T., Karl, W., WismĆ¼ller, R. (eds) Euro-Par 2000 Parallel Processing. Euro-Par 2000. Lecture Notes in Computer Science, vol 1900. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44520-X_149
Download citation
DOI: https://doi.org/10.1007/3-540-44520-X_149
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67956-1
Online ISBN: 978-3-540-44520-3
eBook Packages: Springer Book Archive