Abstract
A key issue in the development of reliable embedded software is the proper handling of reactive control-flow, which typically involves concurrency. Java and its thread concept have only limited provisions for implementing deterministic concurrency. Thus, as has been observed in the past, it is challenging to develop concurrent Java programs without any deadlocks or race conditions. To alleviate this situation, the Light-weight Synchronous Java (SJL) approach presented here adopts the key concepts that have been established in the world of synchronous programming for handling reactive control-flow. Thus SJL not only provides deterministic concurrency, but also different variants of deterministic preemption. Furthermore SJL allows concurrent threads to communicate with Esterel-style signals. As a case study for an embedded system usage, we also report on how the SJL concepts have been ported to the ARM-based Lego Mindstorms NXT system. We evaluated the SJL approach to be efficient and provide experimental results comparing it to Java threads.













Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Andalam S, Roop PS, Girault A (2010) Deterministic, predictable and light-weight multithreading using pret-c. In: Proceedings of the conference on design, automation and test in Europe (DATE’10). Dresden, Germany, pp 1653–1656
André C (1996) SyncCharts: a visual representation of reactive behaviors. Technical report RR 95–52, rev RR 96–56, I3S, Sophia-Antipolis, France
Axer P, Ernst R, Falk H, Girault A, Grund D, Guan N, Jonsson B, Marwedel P, Reineke J, Rochange C, Sebastian M, von Hanxleden R, Wilhelm R, Yi W (2013) Building timing predictable embedded systems. In: Proceedings of ACM transactions on embedded computing systems, (accepted)
Berry G (2000) The foundations of Esterel. In: Plotkin G, Stirling C, Tofte M (eds) Proof, language and interaction: essays in honour of Robin Milner. MIT Press, Cambridge
Bollella G, Gosling J, Brosgol BM, Dibble P (2000) The real-time specification for Java. Addison-Wesley Longman Publishing Co., Inc., Boston
Boussinot F (2006) Fairthreads: mixing cooperative and preemptive threads in C. Concur Comput Pract Exp 18(5):445–469
Caspi P, Pilaud D, Halbwachs N, Plaice JA (1987) Lustre: a declarative language for real-time programming. In: Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on principles of programming languages (POPL’87), ACM, Munich, Germany, pp 178–188. doi:10.1145/41625.41641
Conway ME (1963) Design of a separable transition-diagram compiler. Commun ACM 6(7):396–408. doi:10.1145/366663.366704
Boussinot F (1991) Reactive C: an extension of C to program reactive systems. Soft Pract Exp 21(4):401–428
Fuhrmann H, von Hanxleden R (2010) Taming graphical modeling. In: Proceedings of the ACM/IEEE 13th international conference on model driven engineering languages and systems (MoDELS’10), LNCS, vol 6394. Springer, Berlin, Heidelberg, pp 196–210. doi:10.1007/978-3-642-16145-2_14
von Hanxleden R (2099) SyncCharts in C-A proposal for light-weight, deterministic concurrency. In: Proceedings of the international conference on embedded software (EMSOFT’09), ACM, Grenoble, France, pp 225–234
von Hanxleden R, Mendler M, Aguado J, Duderstadt B, Fuhrmann I, Motika C, Mercer S, O’Brien O (2013) Sequentially constructive concurrency: a conservative extension of the synchronous model of computation. In: Proceedings of the design, automation and test in Europe conference (DATE’13), IEEE, Grenoble, France
Heinold M (2010) Synchronous Java Bachelor thesis. Christian-Albrechts-Universität zu Kiel, Department of Computer Science
Henties T, Hunt JJ, Locke D, Nilsen K, Schoeberl M, Vitek J (2009) Java for safety-critical applications. In: 2nd international workshop on the certification of safety-critical software controlled systems (SafeCert 2009)
Köser N (2010) SyncCharts in C auf multicore dimploma thesis. Christian-Albrechts-Universität zu Kiel, Department of Computer Science
Lee EA (2006) The problem with threads. IEEE Comput 39(5):33–42
Lickly B, Liu I, Kim S, Patel HD, Edwards SA, Lee EA (2008) Predictable programming on a precision timed architecture. In: Proceedings of compilers, architectures, and synthesis of embedded systems (CASES’08), Atlanta, GA, USA
Miyoshi A, Kitayama T, Tokuda H (1997) Implementation and evaluation of real-time Java threads. In: Proceedings of the 18th IEEE real-time systems symposium (RTSS’97), San Francisco, CA, USA, pp 166–175. doi:10.1109/REAL.1997.641279
Motika C, von Hanxleden R, Heinold M (2013) Programming deterministice reactive systems with synchronous Java (invited paper). In: Proceedings of the 9th workshop on software technologies for future embedded and ubiquitous systems (SEUS 2013), IEEE Proceedings, Paderborn, Germany
Nadeem M, Biglari-Abhari M, Salcic Z (2011) RJOP: a customized Java processor for reactive embedded systems. In: Proceedings of the 48th design automation conference (DAC’11), ACM, New York, NY, USA, pp 1038–1043. doi:10.1145/2024724.2024952
Nilsen K (1998) Adding real-time capabilities to Java. Commun ACM 41(6):49–56. doi:10.1145/276609.276619
Plsek A, Zhao L, Sahin VH, Tang D, Kalibera T, Vitek J (2010) Developing safety critical Java applications with oSCJ/L0. In: Proceedings of the 8th international workshop on Java technologies for real-time and embedded systems (JTRES’10), ACM, Prague, Czech Republic, pp 95–101. doi:10.1145/1850771.1850786
Schoeberl M (2006) A time predictable Java processor. In: Proceedings of the design, automation and test in Europe conference (DATE’06). Munich, Germany, pp 800–805
Schoeberl M (2007) Mission modes for safety critical java. In: Proceedings of the 5th IFIP WG 10.2 international conference on software technologies for embedded and ubiquitous systems (SEUS’07), Springer, Santorini Island, Greece, pp 105–113. http://dl.acm.org/citation.cfm?id=1778978.1778991
Schoeberl M (2008) A Java processor architecture for embedded real-time systems. J Syst Arch (JSA) 54(1–2):265–286
Stadler L, Würthinger T, Wimmer C (2010) Efficient coroutines for the Java platform. In: Proceedings of the 8th international conference on the principles and practice of programming in Java (PPPJ’10). ACM, Vienna, Austria, pp 20–28
Sung M, Kim S, Park S, Chang N, Shin H (2002) Comparative performance evaluation of java threads for embedded applications: Linux thread vs. green thread. Inf Process Lett 84(4):221–225. doi:10.1016/S0020-0190(02)00286-7
Traulsen C, Amende T, von Hanxleden R (2011) Compiling SyncCharts to Synchronous C. In: Proceedings of the design, automation and test in Europe conference (DATE’11), IEEE, Grenoble, France, pp 563–566
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Motika, C., von Hanxleden, R. Light-weight Synchronous Java (SJL): An approach for programming deterministic reactive systems with Java. Computing 97, 281–307 (2015). https://doi.org/10.1007/s00607-014-0416-7
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00607-014-0416-7
Keywords
- Reactive systems
- Deterministic concurrency
- Deterministic preemption
- Synchronous programming
- Light-weight scheduling
- Java