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/
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
Safety Critical Java implementation on HVM af Hans Søndergaard, ViaUC
1. Safety Critical Java implementation on HVM
• SCJ program
• Mission Concept
• H dl
Handlers
• Memory Model
• Scheduling
• Implementation
Infinit Højniveausprog, 8 February 2012
Hans Søndergaard
1
2. SCJ program
g
A SCJ program is organized as
• Missions
Mi i
Each 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 Collection
Scheduling is
• Cyclic executive (Level 0)
• Fixed i it
Fi d priority preemptive (L
ti (Level 1)
l
2
4. Handlers
Example: A periodic event handler implementation
public 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
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. Platforms
Now
– x86 with Linux / Cygwin on Windows
Later this year
– AVR ATMega2560
– CR16c from National
– NECv850
10