RTOS Explained: Understanding Kernel Services

Kernel services (sometimes referred to as systems calls or functions) are used to cause the kernel to operate on the data of the kernel objects to achieve the desired behavior of the application code. Knowledge of how these data structures work is fundamental to building real-time application systems around the RTXC Quadros RTOS product.

To function consistently and predictably a real-time operating system must be based on a set of rules. These rules permit software processes to operate and gain access to system resources in an orderly manner. Kernel services embody and enforce these rules to ensure the necessary order in the application processes that use them.

Time is the most difficult and unforgiving resource managed by the kernel. Kernel services must be designed and coded to require minimal execution time yet remain predictable. Execution speed of the kernel services determines the responsiveness of the system to changes in the physical process.

Here are just a few examples of RTXC Quadros kernel services:

KS_TestSemaT   Test a semaphore and wait for a specified number of ticks on a specified counter if the semaphore is not DONE.

KS_YieldTask  Yield to the next ready task of the same priority.

KS_OpenQueue  Allocate and name a dynamic queue.

KS_ReceiveMsgT  Receive a message from a mailbox. If the mailbox is empty, wait a specified number of ticks for a message.

KS_AllocBlkW  Allocate a block of memory. If the partition is empty, wait for an available block.

KS_UseMutx  Look up a dynamic mutex by name and mark it for use.

XX_AllocSysRAM  Allocate a block of system RAM.

A rich set of kernel services means less code for you to write. In the case of the RTXC Quadros RTOS you have access to more than 330 services. And, like the 88 keys on a piano that provide a seemingly infinite variety of music, you can use these kernel services in an almost infinite number of combinations to meet the specific need of your embedded applications.

In the RTXC Quadros RTOS User Manual each kernel service is described in detail with example code.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>