Safety-critical Java for embedded systems

Abstract

StringBuilder 447 / 237 2 / 6 52 (50) / 29 (26) 2 / 2 StringBuilder 189 / 119 1 / 1 38 (35) / 19 (18) 4 / 4 DataInputStream 212 / 108 4 / 5 18 (18) / 17 (17) 1 / 1 DataInputStream$ReadUtfHelper – / 77 – / 2 – / 1 – / 1 DataInputStream$1 – / 6 – / 0 – / 1 – / 0 Vector 322 / 228 4 / 7 48 (45) / 36 (35) 4 / 2 Vector$1 14 / 14 1 / 1 2 / 2 0 / 0 Vector$Itr 33 / 33 3 / 3 4 / 4 0 / 0 Vector$ListItr 43 / 43 0 / 0 6 / 6 1 / 1 HashMap 356 / 269 10 / 22 36 (13) / 24 (11) 4 / 2 HashMap$Entry 48 / 57 4 / 5 8 / 9 1 / 1 HashMap$EntryIterator 5 / 5 0 / 0 1 / 1 0 / 0 HashMap$EntrySet 21 / 24 0 / 0 5 / 5 0 / 0 HashMap$HashIterator 41 / 43 4 / 4 3 / 3 1 / 1 HashMap$KeyIterator 5 / 5 0 / 0 1 / 1 0 / 0 HashMap$KeySet 17 / 27 0 / 0 5 / 5 0 / 0 HashMap$ValueIterator 5 / 5 0 / 0 1 / 1 0 / 0 HashMap$Values 14 / 14 0 / 0 4 / 4 0 / 0 1 Zero means only the default implicit constructor. 2 Not in JDK6, encapsulates SCJ functionality. 3 Not in JDK6. Anonymous Runnable class. 4 Anonymous Enumeration class. 4.3 Reusable Libraries: Implementation 101 Table 4.3: Number of modified methods and additional methods in the modified classes. The number in parenthesis indicates how many of the modified methods belong to the public API. Class Name Modified Additional methods methods AbstractStringBuilder 11 (11) 1 StringBuilder 1 (0) 0StringBuilder 11 (11) 1 StringBuilder 1 (0) 0 DataInputStream 1 (1) 1 DataInputStream$ReadUtfHelper 0 1 DataInputStream$1 0 1 Vector 16 (15) 2 Vector$1 0 0 Vector$Itr 0 0 Vector$ListItr 0 0 HashMap 11 (5) 1 HashMap$Entry 0 1 HashMap$EntryIterator 0 0 HashMap$EntrySet 1 0 HashMap$HashIterator 1 0 HashMap$KeyIterator 0 0 HashMap$KeySet 1 0 HashMap$ValueIterator 0 0 HashMap$Values 0 0 102 Scoped Memory Use: Patterns and Reusable Libraries memory used by the different methods in the libraries. Memory measurements are only carried out on methods that have memory allocations identified by the analysis in Section 4.3.1. WCET is tested with JOP’s distribution WCET tool, WCA [116]. We check that loop bounds are correctly found. Our synthetic testbench for this part of the testing is a SCJ application with shared data structures in mission memory that are accessed from a set of PeriodicEventHandlers (PEH). As a final step, two additional, more complex applications were tested. First, the new java.util collection classes were used as drop-in replacements for the shared data structures in the parallel miniCDj benchmark [135]. The miniCDj benchmark is a SCJ version of the benchmark described in [65]. miniCDj implements an air traffic controller simulator that generates artificial radar frames containing airplane positions. The frames are processed to detect possible collisions. For the parallel version, one PEH generates the radar frames and a selectable number of AperiodicEventHandlers process them. The second test uses a SCJ version of a watchdog application running on top of the Cubesat space protocol (CSP) [14]. CSP is a network-layer protocol designed at Aalborg University that is used by small space-research satellites called Cubesats. The watchdog application has one PEH that sends packets to a set of nodes and one PEH functions as a router. An interrupt service routine adds incoming packets into the router’s queue. For our experiments, one of the CSP nodes was an on-board satellite computer used in commercial Cubesats. The application has three main data structures that handle packets, connections and sockets. We replaced the data structure used to handle packets with our Vector implementation. Functionality was not affected nor were any scope-related issues introduced. An interesting result was a reduction of almost 7% of the use in immortal memory; in the original implementation, the router PEH needs additional packet-managing structures.

DOI: 10.1002/cpe.3963

39 Figures and Tables

Cite this paper

@article{Schoeberl2017SafetycriticalJF, title={Safety-critical Java for embedded systems}, author={Martin Schoeberl and Andreas Engelbredt Dalsgaard and Ren{\'e} Rydhof Hansen and Stephan Korsholm and Anders P. Ravn and Juan Ricardo Rios and T{\'o}rur Biskopst\o Str\om and Hans S\ondergaard and Andy J. Wellings and Shuai Zhao}, journal={Concurrency and Computation: Practice and Experience}, year={2017}, volume={29} }