11.07.2015 Views

An Open Ravenscar Real-Time Kernel for GNAT - DIT - Universidad ...

An Open Ravenscar Real-Time Kernel for GNAT - DIT - Universidad ...

An Open Ravenscar Real-Time Kernel for GNAT - DIT - Universidad ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Only the first four of these packages are visible to GNULL. The other three, <strong>Kernel</strong>.Parameters,<strong>Kernel</strong>.CPU_Primitives, and <strong>Kernel</strong>.Peripherals, are used only by otherkernel packages, and encapsulate implementation dependent elements in order to makeit easier to port the kernel to other hardware environments.Some of the packages (e.g. <strong>Kernel</strong>.Threads) have additional children that extendtheir interfaces so that some of their internal functionality is made visible to other kernelpackages.<strong>Kernel</strong>.Memory<strong>Kernel</strong>{Storage Allocation}{Thread Management}{Synchronization}{Scheduling}<strong>Kernel</strong>.Threads<strong>Kernel</strong>.CPU_Primitives{Interrupt Handling}{<strong>Time</strong> Keeping and Delays}<strong>Kernel</strong>.InterruptsE<strong>Kernel</strong>.Parameters<strong>Kernel</strong>.<strong>Time</strong><strong>Kernel</strong>.PeripheralsFig. 4. Architecture of the <strong>Open</strong> <strong>Ravenscar</strong> <strong>Real</strong>-<strong>Time</strong> <strong>Kernel</strong>3.2 Thread managementAda tasks are implemented at the lower level by kernel threads. Threads are created atprogram startup, so that there is no need to dynamically allocate or deallocate resourcessuch as TCBs or stack space.Threads are scheduled according to the FIFO within priorities policy (ALRM [2],D2). There is a ready queue which is ordered by priority and arrival order. The synchronizationprimitives directly insert or remove threads from the ready queue.Two kinds of synchronization elements are provided by the kernel: mutexes andcondition variables. These elements are used by GNARL to implement protected objects.Despite the name similarity with POSIX, ORK synchronization primitives aredefined in such a way that the related GNULLI elements can be directly implemented,thus enabling a more efficient implementation of protected objects. We have taken ad-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!