CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 46
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 47
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 48
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 49
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 50
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 51
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 52
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 53
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 54
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 55
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 56
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 57
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 58
CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 59
CISS Workshop on Java in Embedded Systems RTSJ with Classic Garbage Collection No heap threads can interrupt garbage collector: The application must be split into a realtime and a non-realtime part. 60
The JamaicaVM Solution Realtime Garbage Collection All Java-Threads must be realtime threads: ● GC work is performed at allocation time ● GC work must be sufficient to recycle enough memory before free memory is exhausted ● Execution time of all allocations must be bound 61
The JamaicaVM Solution Realtime Garbage Collection Root Scan Mark Sweep Compact 62
The JamaicaVM Solution Realtime Garbage Collection Root Scan Mark Sweep Compact 63
The JamaicaVM Solution Realtime Garbage Collection Root Scan Mark Sweep Compact 64
The JamaicaVM Solution Realtime Garbage Collection Root set held in heap instead of scanned Mark Sweep Compact 65
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep Compact 66
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep Compact Break objects into fixed sized blocks 67
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep Fixed sized blocks obviate compaction 68
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 69
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 70
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 71
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 72
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 73
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 74
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 75
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 76
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 77
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 78
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 79
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 80
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 81
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 82
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 83
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 84
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 85
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 86
The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 87
The JamaicaVM Solution RTSJ & Realtime Garbage Collection ● The RTSJ provides necessary features for realtime programming ● Memory area restrictions can be relaxed – Can use RealtimeThread instead of NoHeapRealtimeThread – Heap allocation possible in realtime code – Synchronization possible with non realtime tasks without GC interference – GC does not interrupt thread execution 88
Safety Critical Java Safety Critical Java (JSR 302) ● Java optimized for safety critical application, e.g. DO-178B levels A and B ● Based on a subset of the RTSJ ● Uses ScopedMemory for managing deallocation instead of garbage collection ● Uses extended typing through annotations to support static analysis ● Minimum set of supported classes 89
CISS Workshop on Java in Embedded Systems Advantage of Java over C and C++ ● Clean syntax and semantics w/o preprocessor ➔ wide ranging and better tool support ● Better support for separating of subtyping and reuse via limited inheritance and interfaces ● No explicit pointer manipulation ● Pointer safe deallocation ● Single dispatch style ● Strong, extendible type system ● With RTSJ, well defined tasking model 90
The JamaicaVM Solution Tools Support ● Eclipse ● Data Flow Analysis – Refactoring – Null pointer exceptions – Remote debugging – Type caste ● Java Modeling exceptions Language – Improper – Design by contract synchronization – Runtime assertion – Array store exceptions checking – Scope and – Formal verification assignment errors 91
The JamaicaVM Solution The JamaicaVM Toolset Overview 92
The JamaicaVM Solution Build Process class class class object JVM files class files class files file library files files stand-alone settings Builder application profiling data 93
The JamaicaVM Solution Debugging and Monitoring in Java JamaicaVM Application Eclipse Standard Classes JVMTI JVM Agent Debugging Client JVMTI JDWP Host Target 94
The JamaicaVM Solution Data Flow Analysis > jamaica -dfa test NEEDEDSYNCS : 29 ( 29 locations out of 78) DEADLOCKS : 101 ( 9 locations out of 79) SCOPE CYCLES : 0 ( 0 locations out of 0) ILLEGAL ASSIGNMENTS : 0 ( 0 locations out of 764) CLASSCAST EXCEPTIONS : 128 ( 17 locations out of 90) ARRAY STORE EXCEPTIONS : 3 ( 1 locations out of 310) NULL POINTER EXCEPTIONS: 503 (139 locations out of 11041) + test.dfa_results.summary + test.dfa_results # of Source Code Positions with this problem 95
The JamaicaVM Solution Detecting Runtime Errors ... if (device instanceof MyDevice) { MySensor s = (MySensor) device.sensor; int value = s.reading(); ... } ... 96
The JamaicaVM Solution Detecting Runtime Errors ... if (device instanceof MyDevice) NullPointerException { MySensor s = (MySensor) device.sensor; int value = s.reading(); ... } ... 97
The JamaicaVM Solution Detecting Runtime Errors ... if (device instanceof MyDevice) NullPointerException { MySensor s = (MySensor) device.sensor; ClassCastException int value = s.reading(); ... } ... 98
The JamaicaVM Solution Detecting Runtime Errors ... if (device instanceof MyDevice) NullPointerException { MySensor s = (MySensor) device.sensor; ClassCastException int value = s.reading(); NullPointerException ... } ... 99
CISS Workshop on Java in Embedded Systems Detecting Runtime Errors device != null ... if (device instanceof MyDevice) NullPointerException { MySensor s = (MySensor) device.sensor; ClassCastException int value = s.reading(); NullPointerException ... } ... 100
Recommend
More recommend