Safety Critical Java implementation on HVM af Hans Søndergaard, ViaUC
Upcoming SlideShare
Loading in...5
×
 

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

on

  • 453 views

Oplægget blev holdt ved et seminar i InfinIT-interessegruppen højniveau sprog til indlejrede systemer den 8. februar 2012. ...

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/

Statistics

Views

Total Views
453
Views on SlideShare
267
Embed Views
186

Actions

Likes
0
Downloads
0
Comments
0

3 Embeds 186

http://infinit.dk 120
http://www.infinit.dk 62
http://infinit2012.odeum.com 4

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

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

  • 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
  • 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
  • The Mission Concept p 3
  • 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
  • Memory ModelMemory Model of Level 1; - scheduling is Fixed Priority Preemptive Scheduling 5
  • 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) – PeriodicEventHandler – Cyclic Executive Scheduling• Level 1 (not finished) – Fixed Priority Preemptive Scheduling – Periodic- (Yes), AperiodicEventHandler 8
  • 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
  • PlatformsNow – x86 with Linux / Cygwin on WindowsLater this year – AVR ATMega2560 – CR16c from National – NECv850 10