Skip to main content

2018 | OriginalPaper | Buchkapitel

Teaching Software Transactional Memory in Concurrency Courses with Clojure and Java

verfasst von : Antonio J. Tomeu, Alberto G. Salguero, Manuel I. Capel

Erschienen in: Euro-Par 2017: Parallel Processing Workshops

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

In the field of concurrency and parallelism, it is known that the use of lock-based synchronization mechanisms limits the programming efficiency of concurrent applications and reveals problems in thread synchronization. Software Transactional Memory (STM) is a consolidated concurrency control mechanism that may be considered as an alternative to lock-based constructs for programming critical software, although STM is still not fully accepted as a programming model for the industry. It is our opinion that STM programming must be more emphasized in undergraduate courses on concurrency and parallelism. In this paper we propose an academic experience regarding the introduction of STM programming in concurrency courses by using the Clojure language as the common vehicle for teaching Concurrent Programming. Java, the most popular and extended programming language for teaching concurrency, becomes a second language in our course, and thus our students can take advantage of Clojure API which is defined in Java in order to simplify the development of programming, lectures and assignments.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
The transactional memory was introduced by us in this section during the academic year 2016–2017 to carry out the study.
 
2
Students were asked, within the corresponding assignment, to do just that.
 
3
All code shown in the rest of the document is available at the following URL: https://​antoniotomeu.​wixsite.​com/​atomeu/​stmjavaonclojure​.
 
4
Time were measured using the nanoTime() method of Java System class. This implies that it is a time that only and exclusively makes sense in the realm of the virtual machine, and has no relation whatsoever was the time provided by the system clock. However, Clojure, like Java itself, executes bytecodes on the JVM, which gives consistency to the results.
 
Literatur
1.
Zurück zum Zitat Brevnov, E., Dolgov, Y., Kuznetsov, B., Yhershov, D., Shakin, V., Chen, D., Menon, V., Srinivas, S.: Practical experiences with Java software transactional memory. In: The 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (2008) Brevnov, E., Dolgov, Y., Kuznetsov, B., Yhershov, D., Shakin, V., Chen, D., Menon, V., Srinivas, S.: Practical experiences with Java software transactional memory. In: The 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (2008)
2.
Zurück zum Zitat Carlstrom, B., Chung, J., Chafi, H., McDonald, A., Minh, C., Hammond, L., Kozyrakis, K., Olukotun, K.: Executing Java programs with transactional memory. Sci. Comput. Program. 63, 111–129 (2006)MathSciNetCrossRefMATH Carlstrom, B., Chung, J., Chafi, H., McDonald, A., Minh, C., Hammond, L., Kozyrakis, K., Olukotun, K.: Executing Java programs with transactional memory. Sci. Comput. Program. 63, 111–129 (2006)MathSciNetCrossRefMATH
4.
Zurück zum Zitat Clarke, F., Ekeland, I., Pedrero, M., Gutierrez, E., Romero, S., Plata, O.: Improving transactional memory performance for irregular applications. Procedia Comput. Sci. 51, 2714–2718 (2015)CrossRef Clarke, F., Ekeland, I., Pedrero, M., Gutierrez, E., Romero, S., Plata, O.: Improving transactional memory performance for irregular applications. Procedia Comput. Sci. 51, 2714–2718 (2015)CrossRef
8.
Zurück zum Zitat Fernández, J.: Java 7 Concurrency CookBook. Packt Publishing, Birmingham (2012) Fernández, J.: Java 7 Concurrency CookBook. Packt Publishing, Birmingham (2012)
18.
Zurück zum Zitat Subramanian, V.: Programming Concurrency on the JVM: Masterig Synchronization, STMA, and Actors. The Pragmatic Bookshelf, Dallas (2011) Subramanian, V.: Programming Concurrency on the JVM: Masterig Synchronization, STMA, and Actors. The Pragmatic Bookshelf, Dallas (2011)
19.
Zurück zum Zitat Yamada, Y., Iwasaki, H., Ugawa, T.: SAW: Java synchronization selection from lock or software transactional memory. In: Proceeding of IEEE 17th International Conference on Parallel and Distributed Systems, pp. 104–111 (2011) Yamada, Y., Iwasaki, H., Ugawa, T.: SAW: Java synchronization selection from lock or software transactional memory. In: Proceeding of IEEE 17th International Conference on Parallel and Distributed Systems, pp. 104–111 (2011)
Metadaten
Titel
Teaching Software Transactional Memory in Concurrency Courses with Clojure and Java
verfasst von
Antonio J. Tomeu
Alberto G. Salguero
Manuel I. Capel
Copyright-Jahr
2018
DOI
https://doi.org/10.1007/978-3-319-75178-8_22

Neuer Inhalt