Summary
We have constructed a mutex that is optimized for the case where only one thread uses it. We achieved this by allowing only a designated thread to access the mutex until another thread displaces it through the use of thread suspend and resume operations. This technique provides a modest, but possibly valuable, gain in performance in situations where code is written to work with multiple threads, but often is used by just one. It also provides a gratifying increase in complexity that will entertain programmers for many happy hours.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aldrich, J., Chambers, C., Sirer, E.G., and Eggers, S., ‘Eliminating unnecessary synchronization from Java programs,’ in Proc. of the Static Analyses Symposium, Venice, Italy, September 1999, pp. 19–38.
Moss, J., and Kohler, W., ‘Concurrency features for the Trellis/Owl language,’ Proc. European Conference on Object-Oriented Programming, LNCS, vol. 276, Springer, pp.171–180.
Bershad, B.N., Redell, D.D., and Ellis, J.R., ‘Fast mutual exclusion for uniprocessors,’ 5th Symp. on Architectural Support for Programming Languages and Operating Systems (ASPLOS V), October 1992, pp. 223–233.
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag New York, Inc.
About this chapter
Cite this chapter
Burrows, M. (2004). How to Implement Unnecessary Mutexes. In: Herbert, A., Jones, K.S. (eds) Computer Systems. Monographs in Computer Science. Springer, New York, NY. https://doi.org/10.1007/0-387-21821-1_7
Download citation
DOI: https://doi.org/10.1007/0-387-21821-1_7
Publisher Name: Springer, New York, NY
Print ISBN: 978-0-387-20170-2
Online ISBN: 978-0-387-21821-2
eBook Packages: Springer Book Archive