Hardware Reference
In-Depth Information
sulating all device-dependent routines in a set of library functions that can be called
by the application tasks. This approach is adopted in RK, a research hard real-time
kernel designed to support multisensory robotics applications [LKP88].
APPROACH B
As in the previous approach, all interrupts from external devices are disabled, except
the one from the timer. Unlike the previous solution, however, the devices are not
directly handled by the application tasks but are managed in turn by dedicated kernel
routines, periodically activated by the timer.
This approach eliminates the unbounded delays due to the execution of interrupt drivers
and confines all I/O operations to one or more periodic kernel tasks, whose computa-
tional load can be computed once and for all and taken into account through a specific
utilization factor. In some real-time systems, I/O devices are subdivided into two
classes based on their speed: slow devices are multiplexed and served by a single
cyclical I/O process running at a low rate, whereas fast devices are served by ded-
icated periodic system tasks, running at higher frequencies. The advantage of this
approach with respect to the previous one is that all hardware details of the peripheral
devices can be encapsulated into kernel procedures and do not need to be known to
the application tasks.
Because the interrupts are disabled, the major problem of this approach is due to the
busy wait of the kernel I/O handling routines, which makes the system less efficient
during the I/O operations. With respect to the previous approach, this case is charac-
terized by a higher system overhead, due to the communication required among the
application tasks and the I/O kernel routines for exchanging I/O data. Finally, since
the device handling routines are part of the kernel, it has to be modified when some
device is replaced or added. This type of solution is adopted in the MARS system
[DRSK89, KDK + 89].
APPROACH C
A third approach that can be adopted in real-time systems to deal with the I/O devices
is to leave all external interrupts enabled, while reducing the drivers to the least pos-
sible size. According to this method, the only purpose of each driver is to activate
a proper task that will take care of the device management. Once activated, the de-
vice manager task executes under the direct control of the operating system, and it is
guaranteed and scheduled just like any other application task. In this way, the priority
that can be assigned to the device handling task is completely independent from other
Search WWH ::




Custom Search