EasyManua.ls Logo

Intel 8253 - Page 397

Intel 8253
773 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
3/24/97 5-1 Multi-tasking
5 Real-time Multi-tasking
Multi-tasking as the name suggests, allows tasks, which are pieces of code that do specific duties,
to run in an apparently concurrent manner. This means that tasks will seem to all run at the same
time, doing many specific jobs simultaneously.
High end applications (like automotive) require instantaneous responses when dealing with high
speed events, such as engine management, traction control and adaptive braking system (ABS)
and hence there is a trend towards multi-tasking in a wide variety of high performance embedded
control applications.
Real-time application programs are often comprised of multiple tasks. Each task manages a
specific facet of application program. Building a real-time application from individual tasks
allows subdividing a complicated application program into independent and manageable
modules. Each task shares the processor with other tasks in the application program according to
an assigned priority level.
In real-time multi-tasking, the main concern is the system overhead. Switching tasks involve
moving lots of data of the terminated and initiated tasks, and extensive book-keeping to be able
to restore dormant tasks when required. Thus it is extremely crucial to minimize the system
overhead as much as possible. In some cases, some of the tasks may be associated with real-time
response, which further complicates the requirements from the system.
The following section analyzes the requirements and the XA suitability to these applications.
5.1 Multi-tasking Support in XA
The XA has numerous provisions to support multi-tasking systems. The architecture provides
direct support for the concept of a multi-tasking OS by providing two (System/User) privilege
levels for isolation between tasks. High performance, interrupt driven, multi-tasking applications
systems requiring protection are feasible with the XA.
The XA architecture offers the following features which will appeal to multi-tasking
implementations.
5.1.1 Dual stack approach
The architecture defines a System Stack Pointer (SSP) as well as an User Stack Pointer (USP).
The dual stack feature supports fast task switching, and ease the creation of a multi-tasking
monitor kernel. The separation of the two offers a reduction is storing and retrieving stack
pointers or using a single stack, when switching to the kernel and back to an application. It also
serves to speed up interrupt processing in large systems with external data memory. User stacks
can be allocated in the slower external memory, while system memory is in internal SRAM,
allowing for fast interrupt latency in this environment. The dual stack approach also adds the
benefit of a better potential to recover from an ill-behaved task, since the system stack is still
intact when an error is sensed.

Table of Contents