ABSTRACT
Concurrency control in Smalltalk is based on locks and is therefore notoriously difficult to use. Even though some implementations provide high-level constructs, these add complexity and potentially hard-to-detect bugs to the application. Transactional memory is an attractive mechanism that does not have the drawbacks of locks, however the underlying implementation is often difficult to integrate into an existing language. In this paper we show how we have introduced transactional semantics in Smalltalk by using the reflective facilities of the language. Our approach is based on method annotations, incremental parse tree transformations and an optimistic commit protocol. We report on a practical case study, benchmarks and further and on-going work.
- Goldberg, A., Robson, D.: Smalltalk 80: the Language and its Implementation. Addison Wesley, Reading, Mass. (May 1983) Google ScholarDigital Library
- American National Standards Institute, Inc.: Draft American National Standard for Information Systems --- Programming Languages --- Smalltalk. American National Standards Institute (1997)Google Scholar
- Harris, T., Fraser, K.: Language support for lightweight transactions. In: Object-Oriented Programming, Systems, Languages, and Applications. ACM Press, New York, NY, USA (October 2003) 388--402 Google ScholarDigital Library
- Ingalls, D., Kaehler, T., Maloney, J., Wallace, S., Kay, A.: Back to the future: The story of Squeak, A practical Smalltalk written in itself. In: Proceedings OOPSLA '97, ACM SIGPLAN Notices, ACM Press (November 1997) 318--326 Google ScholarDigital Library
- Hansen, P. B.: Monitors and Concurrent Pascal: a personal history. ACM Press, New York, NY, USA (1996)Google Scholar
- Herlihy, M. P.: Wait-free synchronization. ACM Transactions on Programming Languages and Systems 13(1) (January 1991) 124--149 Google ScholarDigital Library
- Herlihy, M. P., Moss, J. E. B.: Transactional memory: Architectural support for lock-free data structures. In: Proceedings of the 20. Annual International Symposium on Computer Architecture. (1993) Google ScholarDigital Library
- Butterworth, P., Otis, A., Stein, J.: The GemStone object database management system. Commun. ACM 34(10) (1991) 64--77 Google ScholarDigital Library
- Guerraoui, R., Garbinato, B., Mazouni, K. R.: The garf library of dsm consistency models. In: EW 6: Proceedings of the 6th workshop on ACM SIGOPS European workshop, New York, NY, USA, ACM Press (1994) 51--56 Google ScholarDigital Library
- Guerraoui, R., Felber, P., Garbinato, B., Mazouni, K.: System support for object groups. In: OOPSLA '98: Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, New York, NY, USA, ACM Press (1998) 244--258 Google ScholarDigital Library
- Briot, J. P.: Actalk: A testbed for classifying and designing actor languages in the Smalltalk-80 environment. In Cook, S., ed.: Proceedings ECOOP '89, Nottingham, Cambridge University Press (July 1989) 109--129Google Scholar
- Hindman, B., Grossman, D.: Atomicity via source-to-source translation. In: MSPC '06: Proceedings of the 2006 workshop on Memory system performance and correctness, New York, NY, USA, ACM Press (2006) 82--91 Google ScholarDigital Library
- Adl-Tabatabai, A. R., Lewis, B. T., Menon, V., Murphy, B. R., Saha, B., Shpeisman, T.: Compiler and runtime support for efficient software transactional memory. In: PLDI '06: Proceedings of the 2006 ACM SIGPLAN conference on Programming language design and implementation, New York, NY, USA, ACM Press (2006) 26--37 Google ScholarDigital Library
- Röthlisberger, D., Denker, M., Tanter, É.: Unanticipated partial behavioral reflection: Adapting applications at runtime. Journal of Computer Languages, Systems and Structures (2007) To appear. Google ScholarDigital Library
- Denker, M., Ducasse, S., Lienhard, A., Marschall, P.: Sub-method reflection. Journal of Object Technology 6(9) (September 2007) To appear.Google ScholarCross Ref
- Lie, S.: Hardware support for unbounded transactional memory. Master's thesis, Massachusetts Institute of Technology (May 2004)Google Scholar
- Moore, K. E., Bobba, J., Moravan, M. J., Hill, M. D., Wood, D. A.: LogTM: Log-based transactional memory. In: Proceedings of the 12th International Symposium on High-Performance Computer Architecture. IEEE Computer Society (February 2006) 254--265Google Scholar
- Lea, D.: Concurrent Programming in Java, Second Edition: Design principles and Patterns. 2nd edn. The Java Series. Addison Wesley (1999) Google ScholarDigital Library
- Bobba, J., Moore, K. E., Yen, L., Volos, H., Hill, M. D., Swift, M. M., Wood, D. A.: Performance pathologies in hardware transactional memory. In: Proceedings of the 34rd Annual International Symposium on Computer Architecture. International Symposium on Computer Architecture (June 2007) Google ScholarDigital Library
- Kung, H. T., Robinson, J. T.: On optimistic methods for concurrency control. ACM TODS 6(2) (June 1981) Google ScholarDigital Library
- Renggli, L.: Magritte -- meta-described web application development. Master's thesis, University of Bern (June 2006)Google Scholar
- Costanza, P., Hirschfeld, R.: Language constructs for context-oriented programming: An overview of ContextL. In: Proceedings of the Dynamic Languages Symposium (DLS) '05, co-organized with OOPSLA'05, New York, NY, USA, ACM Press (October 2005) Google ScholarDigital Library
- Nierstrasz, O., Denker, M., Gîrba, T., Lienhard, A.: Analyzing, capturing and taming software change. In: Proceedings of the Workshop on Revival of Dynamic Languages (co-located with ECOOP'06). (July 2006)Google Scholar
Recommendations
Safe privatization in transactional memory
PPoPP '18: Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingTransactional memory (TM) facilitates the development of concurrent applications by letting the programmer designate certain code blocks as atomic. Programmers using a TM often would like to access the same data both inside and outside transactions, ...
Safe privatization in transactional memory
PPoPP '18Transactional memory (TM) facilitates the development of concurrent applications by letting the programmer designate certain code blocks as atomic. Programmers using a TM often would like to access the same data both inside and outside transactions, ...
Transactional memory: from semantics to silicon
IWMSE '08: Proceedings of the 1st international workshop on Multicore software engineeringMulti-core architectures bring parallel programming into the mainstream. Parallel programming poses many new challenges to the developer, one of which is synchronizing concurrent access to shared memory by multiple threads. Programmers have ...
Comments