Skip to main content
Log in

Light-weight Synchronous Java (SJL): An approach for programming deterministic reactive systems with Java

  • Published:
Computing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

Notes

  1. http://www.informatik.uni-kiel.de/rtsys/kieler.

  2. http://mindstorms.lego.com.

  3. http://lejos.sourceforge.net.

  4. http://www.ptolemy.org.

References

  1. 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

  2. André C (1996) SyncCharts: a visual representation of reactive behaviors. Technical report RR 95–52, rev RR 96–56, I3S, Sophia-Antipolis, France

  3. 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)

  4. 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

  5. Bollella G, Gosling J, Brosgol BM, Dibble P (2000) The real-time specification for Java. Addison-Wesley Longman Publishing Co., Inc., Boston

    Google Scholar 

  6. Boussinot F (2006) Fairthreads: mixing cooperative and preemptive threads in C. Concur Comput Pract Exp 18(5):445–469

    Article  Google Scholar 

  7. 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

  8. Conway ME (1963) Design of a separable transition-diagram compiler. Commun ACM 6(7):396–408. doi:10.1145/366663.366704

    Article  MATH  Google Scholar 

  9. Boussinot F (1991) Reactive C: an extension of C to program reactive systems. Soft Pract Exp 21(4):401–428

    Article  Google Scholar 

  10. 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

  11. 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

  12. 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

  13. Heinold M (2010) Synchronous Java Bachelor thesis. Christian-Albrechts-Universität zu Kiel, Department of Computer Science

  14. 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)

  15. Köser N (2010) SyncCharts in C auf multicore dimploma thesis. Christian-Albrechts-Universität zu Kiel, Department of Computer Science

  16. Lee EA (2006) The problem with threads. IEEE Comput 39(5):33–42

    Article  Google Scholar 

  17. 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

  18. 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

  19. 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

  20. 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

  21. Nilsen K (1998) Adding real-time capabilities to Java. Commun ACM 41(6):49–56. doi:10.1145/276609.276619

    Article  Google Scholar 

  22. 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

  23. 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

  24. 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

  25. Schoeberl M (2008) A Java processor architecture for embedded real-time systems. J Syst Arch (JSA) 54(1–2):265–286

    Article  Google Scholar 

  26. 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

  27. 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

    Article  MATH  Google Scholar 

  28. 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

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christian Motika.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00607-014-0416-7

Keywords

Mathematics Subject Classification

Navigation