Safety Critical Java implementation on HVM    • SCJ program    • Mission Concept    • H dl      Handlers    • Memory Model...
SCJ program       gA SCJ program is organized as•   Missions    Mi iEach mission is composed of•   Schedulable objects i e...
The Mission Concept                 p                      3
HandlersExample: A periodic event handler implementationpublic class MyPeriodicEvh extends PeriodicEventHandler{  p  prote...
Memory ModelMemory Model of Level 1; - scheduling is Fixed Priority Preemptive Scheduling                                 ...
Schedulig (Level 0):Cyclic Executive                       6
Scheduling (Level 1):Fixed Priority Preemptive                            7
Implementation of SCJ using HVM• Mission concept (finished)• Memory model (finished)• Level 0 (finished)  – PeriodicEventH...
Example:    MemoryArea.executeInArea/** * Executes logic in this memory area, with no cleanup and pointer reset * at the e...
PlatformsNow  – x86 with Linux / Cygwin on WindowsLater this year  – AVR ATMega2560  – CR16c from National  – NECv850     ...
Upcoming SlideShare
Loading in …5
×

Safety Critical Java implementation on HVM af Hans Søndergaard, ViaUC

359
-1

Published on

Oplægget blev holdt ved et seminar i InfinIT-interessegruppen højniveau sprog til indlejrede systemer den 8. februar 2012.
Læs mere om interessegruppen på http://www.infinit.dk/dk/interessegrupper/hoejniveau_sprog_til_indlejrede_systemer/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
359
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Safety Critical Java implementation on HVM af Hans Søndergaard, ViaUC

  1. 1. Safety Critical Java implementation on HVM • SCJ program • Mission Concept • H dl Handlers • Memory Model • Scheduling • ImplementationInfinit Højniveausprog, 8 February 2012Hans Søndergaard 1
  2. 2. SCJ program gA SCJ program is organized as• Missions Mi iEach mission is composed of• Schedulable objects i e handlers objects, i.e.Handlers are• Periodic (SCJ Level 0)• Periodic and Aperiodic (Level 1)Memory Model y• Immortal Memory, Mission Memory, Private Memory• No heap and no Garbage CollectionScheduling is• Cyclic executive (Level 0)• Fixed i it Fi d priority preemptive (L ti (Level 1) l 2
  3. 3. The Mission Concept p 3
  4. 4. HandlersExample: A periodic event handler implementationpublic class MyPeriodicEvh extends PeriodicEventHandler{ p protected MyPeriodicEvh (PriorityParameters priority, y ( y p y, PeriodicParameters periodic, long memSize) // size of private mem { super(priority, periodic, new StorageParameters(memSize, null)); } public void handleAsyncEvent() { // the logic to be executed every period for (int i = 0; i < n; i++) { Integer obj = new Integer (i); } }} 4
  5. 5. Memory ModelMemory Model of Level 1; - scheduling is Fixed Priority Preemptive Scheduling 5
  6. 6. Schedulig (Level 0):Cyclic Executive 6
  7. 7. Scheduling (Level 1):Fixed Priority Preemptive 7
  8. 8. Implementation of SCJ using HVM• Mission concept (finished)• Memory model (finished)• Level 0 (finished) – PeriodicEventHandler – Cyclic Executive Scheduling• Level 1 (not finished) – Fixed Priority Preemptive Scheduling – Periodic- (Yes), AperiodicEventHandler 8
  9. 9. Example: MemoryArea.executeInArea/** * Executes logic in this memory area, with no cleanup and pointer reset * at the end. * @param logic The Runnable object whose run() method shall be e ecuted. @pa a og c e u ab e ose u () et od s a executed. */public void executeInArea (Runnable logic){ MemoryArea outerArea = currentArea; currentArea = this; VMFct.pushNativeAllocScope(allocPoint); VMFct pushNativeAllocScope(allocPoint); // call of HVM C function C-function logic.run(); // Java VMFct.popNativeAllocScope(); // call of HVM C-function currentArea = outerArea;} 9
  10. 10. PlatformsNow – x86 with Linux / Cygwin on WindowsLater this year – AVR ATMega2560 – CR16c from National – NECv850 10
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×