ciss workshop on java in embedded systems
play

CISS Workshop on Java in Embedded Systems Realtime Java and the - PowerPoint PPT Presentation

CISS Workshop on Java in Embedded Systems Realtime Java and the Jamaica Virtual Machine aicas Dr. James J. Hunt CEO 26 September 2006 CISS Workshop on Java in Embedded Systems Trends in Embedded Systems Mobile Web / Browser as


  1. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 46

  2. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 47

  3. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 48

  4. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 49

  5. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 50

  6. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 51

  7. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 52

  8. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 53

  9. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 54

  10. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 55

  11. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 56

  12. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 57

  13. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 58

  14. CISS Workshop on Java in Embedded Systems Classic Garbage Collection Root Scanning Mark Sweep Compact 59

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

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

  17. The JamaicaVM Solution Realtime Garbage Collection Root Scan Mark Sweep Compact 62

  18. The JamaicaVM Solution Realtime Garbage Collection Root Scan Mark Sweep Compact 63

  19. The JamaicaVM Solution Realtime Garbage Collection Root Scan Mark Sweep Compact 64

  20. The JamaicaVM Solution Realtime Garbage Collection Root set held in heap instead of scanned Mark Sweep Compact 65

  21. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep Compact 66

  22. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep Compact Break objects into fixed sized blocks 67

  23. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep Fixed sized blocks obviate compaction 68

  24. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 69

  25. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 70

  26. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 71

  27. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 72

  28. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 73

  29. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 74

  30. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 75

  31. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 76

  32. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 77

  33. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 78

  34. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 79

  35. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 80

  36. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 81

  37. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 82

  38. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 83

  39. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 84

  40. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 85

  41. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 86

  42. The JamaicaVM Solution Realtime Garbage Collection Mark Sweep 87

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

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

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

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

  47. The JamaicaVM Solution The JamaicaVM Toolset Overview 92

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

  49. The JamaicaVM Solution Debugging and Monitoring in Java JamaicaVM Application Eclipse Standard Classes JVMTI JVM Agent Debugging Client JVMTI JDWP Host Target 94

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

  51. The JamaicaVM Solution Detecting Runtime Errors ... if (device instanceof MyDevice) { MySensor s = (MySensor) device.sensor; int value = s.reading(); ... } ... 96

  52. The JamaicaVM Solution Detecting Runtime Errors ... if (device instanceof MyDevice) NullPointerException { MySensor s = (MySensor) device.sensor; int value = s.reading(); ... } ... 97

  53. The JamaicaVM Solution Detecting Runtime Errors ... if (device instanceof MyDevice) NullPointerException { MySensor s = (MySensor) device.sensor; ClassCastException int value = s.reading(); ... } ... 98

  54. The JamaicaVM Solution Detecting Runtime Errors ... if (device instanceof MyDevice) NullPointerException { MySensor s = (MySensor) device.sensor; ClassCastException int value = s.reading(); NullPointerException ... } ... 99

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