Hardware locks for a real‐time Java chip multiprocessor

A software locking mechanism commonly protects shared resources for multithreaded applications. This mechanism can, especially in chip‐multiprocessor systems, result in a large synchronization overhead. For real‐time systems in particular, this overhead increases the worst‐case execution time and may void a task set's schedulability. This paper presents 2 hardware locking mechanisms to reduce the worst‐case time required to acquire and release synchronization locks. These solutions are implemented for the chip‐multiprocessor version of the Java Optimized Processor. The 2 hardware locking mechanisms are compared with a software locking solution as well as the original locking system of the processor. The hardware cost and performance are evaluated for all presented locking mechanisms. The performance of the better‐performing hardware locks is comparable with that of the original single global lock when contending for the same lock. When several noncontending locks are used, the hardware locks enable true concurrency for critical sections. Benchmarks show that using the hardware locks yields performance ranging from no worse than the original locks to more than twice their best performance. This improvement can allow a larger number of real‐time tasks to be reliably scheduled on a multiprocessor real‐time platform. Copyright © 2016 John Wiley & Sons, Ltd.

[1]  Martin Schoeberl,et al.  Safety-critical Java on a Java processor , 2012, JTRES '12.

[2]  Lui Sha,et al.  Real-time synchronization protocols for multiprocessors , 1988, Proceedings. Real-Time Systems Symposium.

[3]  Martin Schoeberl,et al.  A real-time Java chip-multiprocessor , 2010, TECS.

[4]  James J. Hunt,et al.  Using global data flow analysis on bytecode to aid worst case execution time analysis for real-time Java programs , 2008, JTRES '08.

[5]  Reinhold Heckmann,et al.  Worst case execution time prediction by static program analysis , 2004, 18th International Parallel and Distributed Processing Symposium, 2004. Proceedings..

[6]  Andy J. Wellings,et al.  A profile for high-integrity real-time Java programs , 2001, Fourth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing. ISORC 2001.

[7]  Martin Schoeberl A Time-Predictable Object Cache , 2011, 2011 14th IEEE International Symposium on Object/Component/Service-Oriented Real-Time Distributed Computing.

[8]  James Gosling,et al.  The Real-Time Specification for Java , 2000, Computer.

[9]  Martin Schoeberl,et al.  A Hardware Abstraction Layer in Java , 2011, TECS.

[10]  Mark Klein,et al.  A practitioner's handbook for real-time analysis - guide to rate monotonic analysis for real-time systems , 1993, The Kluwer international series in engineering and computer science.

[11]  Alan Burns,et al.  Real-Time Systems and Programming Languages , 2009 .

[12]  Martin Schoeberl,et al.  Java for Safety-Critical Applications , 2009 .

[13]  Alan Burns,et al.  Resource sharing in RTSJ and SCJ systems , 2011, JTRES '11.

[14]  Alan Burns,et al.  The Ravenscar Tasking Profile for High Integrity Real-Time Programs , 1998, Ada-Europe.

[15]  C. Douglass Locke Safety critical Java™ technology , 2006, JTRES '06.

[16]  Martin Schoeberl,et al.  The embedded Java benchmark suite JemBench , 2010, JTRES '10.

[17]  Björn B. Brandenburg Improved analysis and evaluation of real-time semaphore protocols for P-FP scheduling , 2013, 2013 IEEE 19th Real-Time and Embedded Technology and Applications Symposium (RTAS).

[18]  Martin Schoeberl,et al.  A desktop 3D printer in safety-critical Java , 2012, JTRES '12.

[19]  Lui Sha,et al.  Priority Inheritance Protocols: An Approach to Real-Time Synchronization , 1990, IEEE Trans. Computers.

[20]  David F. Bacon,et al.  Space- and Time-Efficient Implementation of the Java Object Model , 2002, ECOOP.

[21]  Butler W. Lampson,et al.  Experience with processes and monitors in Mesa , 1980, CACM.

[22]  Hennadiy Leontyev,et al.  Real-Time Synchronization on Multiprocessors: To Block or Not to Block, to Suspend or Spin? , 2008, 2008 IEEE Real-Time and Embedded Technology and Applications Symposium.

[23]  Mauricio J. Serrano,et al.  Thin locks: featherweight synchronization for Java , 1998, PLDI '98.

[24]  Martin Schoeberl,et al.  Chip-multiprocessor hardware locks for safety-critical Java , 2013, JTRES '13.

[25]  Martin Schoeberl,et al.  A Time Predictable Instruction Cache for a Java Processor , 2004, OTM Workshops.

[26]  John B. Carter A comparison of software and hardware synchronization mechanisms for distributed shared memory multiprocessors , 1996 .

[27]  Hennadiy Leontyev,et al.  A Flexible Real-Time Locking Protocol for Multiprocessors , 2007, 13th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA 2007).

[28]  Benedikt Huber,et al.  T-CREST: Time-predictable multi-core architecture for embedded systems , 2015, J. Syst. Archit..

[29]  Benedikt Huber,et al.  Worst-Case Analysis of Heap Allocations , 2010, ISoLA.

[30]  Wolfgang Puffitsch,et al.  Design and analysis of a hard real‐time garbage collector for a Java chip multi‐processor , 2013, Concurr. Comput. Pract. Exp..

[31]  Theodore P. Baker,et al.  Stack-based scheduling of realtime processes , 1991, Real-Time Systems.

[32]  Martin Schoeberl,et al.  Towards a Time-predictable Dual-Issue Microprocessor: The Patmos Approach , 2011, PPES.

[33]  Martin Schoeberl,et al.  Design and implementation of an efficient stack machine , 2005, 19th IEEE International Parallel and Distributed Processing Symposium.

[34]  René Rydhof Hansen,et al.  Worst-case memory consumption analysis for SCJ , 2013, JTRES '13.

[35]  Alan Burns,et al.  A Schedulability Compatible Multiprocessor Resource Sharing Protocol -- MrsP , 2013, 2013 25th Euromicro Conference on Real-Time Systems.

[36]  Benedikt Huber,et al.  Worst‐case execution time analysis for a Java processor , 2010, Softw. Pract. Exp..

[37]  Giuseppe Lipari,et al.  Minimizing memory utilization of real-time task sets in single and multi-processor systems-on-a-chip , 2001, Proceedings 22nd IEEE Real-Time Systems Symposium (RTSS 2001) (Cat. No.01PR1420).

[38]  Martin Schoeberl,et al.  A Java processor architecture for embedded real-time systems , 2008, J. Syst. Archit..

[39]  Martin Schoeberl,et al.  Safety‐critical Java with cyclic executives on chip‐multiprocessors , 2012, Concurr. Comput. Pract. Exp..