Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Microsoft Corporation
April 2000
Summary:This paper lists eight prerequisites for the operating system used in real-time systems and describes how the Microsoft Windows CE 2.1 operating system was designed to meet those requirements. (12 printed pages)
Introduction
High-performance embedded applications must often manage
time-critical responses. Examples include manufacturing process
controls, high-speed data acquisition devices, telecommunications
switching equipment, medical monitoring equipment, aircraft
"fly-by-wire" controls, and weapons delivery, space navigation and
guidance, laboratory experiment control, automobile engine control,
and robotics systems. Validating such an application means examining not only its
computational accuracy, but also the timeliness of its results. The
application must deliver its responses within specified time
parameters in real-time. A real-time system is loosely defined as "any system where a
timely response by the computer to external stimuli is vital." The
standard definition provided in the Internet newsgroup
comp.realtime states: "A real-time system is one in which the
correctness of the computations not only depends on the logical
correctness of the computation, but also on the time at which the
result is produced. If the timing constraints of the system are not
met, system failure is said to have occurred." It is important to distinguish between a real-time system and a
real-time operating system (RTOS). The real-time system represents
the set of all system elements - the hardware, operating system,
and applications - that are needed to meet the system requirements.
The RTOS is just one element of the complete real-time system and
must provide sufficient functionality to enable the overall
real-time system to meet its requirements. It is also important to distinguish between a fast operating
system and an RTOS. Speed, although useful for meeting the overall
requirements, does not by itself meet the requirements for an RTOS.
The Internet newsgroup comp.realtime lists some requirements that
an operating system must meet to be considered an RTOS:
In addition, the OS behavior must be predictable. This means
real-time system developers must have detailed information about
the system interrupt levels, system calls, and timing:
The time for every system call should be predictable and
independent of the number of objects in the system. This paper
describes how Microsoft Windows CE operating system meets each of
these requirements for a real-time operating system. Most
significant, Windows CE guarantees an upper bound on the time it
takes to start a real-time priority thread after receiving an
interrupt. This paper describes the interrupt latency times for a
specific reference platform, the "Odo" platform with the Hitachi
SH3 microprocessor. Microsoft Windows CE is designed as a general-purpose operating
system for small form-factor devices, which are typically diskless
systems with a limited memory capacity. Windows CE is adapted for a
specific hardware platform by creating a thin layer of code that
resides between the kernel and the hardware. This is known as the
Hardware Abstraction Layer (HAL). (In previous releases, this
interface was called the OEM (original equipment manufacturer)
Adaptation Layer, or OAL, and the Kernel Abstraction Layer, or KAL,
to avoid confusion with the Microsoft Windows NT operating system
HAL.) Unlike other Windows operating systems, Windows CE does not
represent one standard, identical piece of software that is common
to all platforms. To be flexible enough to meet the needs of a wide
range of products, Windows CE is modular. This means that it can be
custom-built for a product by selecting from a set of provided
software modules. In addition, some of the available modules are
componentized. This means these modules can themselves be
custom-built by selecting from a set of available components. By
selecting the minimum set of required modules and components that
meet the system requirements, the OEM can minimize the memory
footprint and performance of the operating system. The Windows CE Embedded Toolkit for Microsoft Visual C++
development system version 5.0 provides the system libraries,
tools, documentation, and sample code to enable OEMs to customize
Windows CE for their specific hardware platforms. The embedded
toolkit also includes the device driver kit (DDK) and the software
development kit (SDK). The DDK provides additional documentation
about writing device drivers. The SDK provides libraries, header
files, sample code, and documentation that allow developers to
write applications for Windows CE-based platforms. Windows CE
offers subsets of the same programming interfaces used to develop
applications for other Windows operating systems. For example,
Windows CE version 1.01 supported about 500 of the 1000 Microsoft
Win32 API functions. This means that a wide variety of tools,
third-party books, and training courses for developers for Win32
are already in place and available for developers for Windows CE
system. Real-time systems developers can use the Windows CE Embedded
Toolkit for Visual C++ version 5.0 to port the operating system to
their specific platform and to develop additional device drivers
and real-time applications for that platform. Windows CE is a preemptive multitasking operating system. It
allows multiple applications, or processes, to run within the
system at the same time. Windows CE supports a maximum of 32
simultaneous processes. A process consists of one or more threads,
where each thread represents an independent portion of that
process. One thread is designated as the primary thread for the
process; the process can also create an unspecified number of
additional threads. The actual number of additional threads is
limited only by available system resources. Windows CE uses a priority-based time-slice algorithm to
schedule the execution of threads. Windows CE supports eight
discrete priority levels, from 0 through 7, where 0 represents the
highest priority. These are defined in the header file
Winbase.h.
Windows CE Overview
Threads and Thread Priority
Thread Synchronization
Other Considerations
Interrupt Handling: IRQs, ISRs, and
ISTs
Interrupt Latency
Validating the Real-time Performance of
Windows CE
Measured Latencies on Windows CE
Alder (beta)
Summary
Introduction
Windows CE Overview
Threads and Thread Priority