What's your favorite embedded operating
system (OS)? QNX? No? WindRiver? Argh! Due to the use of different
processors and varied specifications for applications, the embedded
OS market has always had a plethora of products to chose from. This
lack of standardization has also discouraged the larger OS
companies from offering products in this market space.
With the advent of the Information Appliance age, many of these
applications are standardizing upon Internet connectivity, and high
volume commodity products are now enticing the big boys to come
play. Recently, Microsoft, Oracle, Sun, and Red Hat have all made
this market space a strategic part of their corporate visions. But
the road to riches has not been an easy one for companies trying to
develop the definitive embedded OS.
Within the Information Appliance space there are many
segments—from set top boxes to handheld computers. Trying to
address all of the features that are required for each segment has
been a frustrating ordeal for the OS companies and their
developers. Even Microsoft has had its share of ups and downs since
it introduced Windows CE back in 1996. However, its latest release
of the product, version 3.0, is expected to achieve many of the
results that the company hoped to obtain when it first entered this
market.
Figure 1: Sub-PC devices such as the new iPaq Pocket PC
require an embedded OS with a small footprint
Some of the complaints heard about CE in the past had to do with
its real-time support, megalithic software design, instant on
capability, migration down from the desktop environment,
requirement for a GUI, lack of support, non-open source model, and
cost. While some of these complaints were ill founded, Microsoft
has attempted to address the legitimate problems. The long awaited
release of Windows CE version 3.0 shores up some real-time
deficiencies, adds more functionality, provides a tighter
integration into the developer studio environment, and incorporates
some well known Microsoft applications.
In the last few years Microsoft has restructured the Windows CE
organization so that a core OS group focuses on the general
platform development and vertical market groups address specific
features and functionality. The vertical market groups include the
Pocket PC, handheld PC (H/PC), AutoPC,
multimedia, mobile phone, and embedded systems groups.
Each group places a high priority on targeting issues and
enhancements needed for its vertical market. As an example, the
multimedia group needed DirectX technology, which was not available
at that time for CE, while other groups didn't require it as a
priority item. Because of the urgency for this functionality, the
multimedia group did the work to modularize this software piece. It
was then immediately offered as part of the package for the Windows
CE product for the multimedia vertical market.
This integration work was then passed back to the core OS group
so that they could refine and package it into the base product. It
is now available as part of the version 3.0 release, which not only
highlights the emphasis that Microsoft is placing on meeting
individual market needs, but also the modular nature of the OS.
Before highlighting the improvements in version 3.0, it is
important to take a look at Window CE's history. It has been widely
reported and believed that Windows CE is an OS that migrated from
Microsoft desktop operating systems—Windows 95 and Windows
NT. Nothing could be further from the truth. While ideas were
borrowed from those operating systems, Windows CE was actually
developed from scratch.
Microsoft developed CE on the premise that it would have Win32
API compatibility, a small memory footprint, portable code,
reliability, and leverage existing development tools (Developer
Studio). Trade-offs were then made to support a subset of Win32 API
functions so that the memory footprint could be minimized. The
Win32 API also had to be redeveloped to achieve greater reliability
and support the Windows CE's kernel. A new kernel was also designed
so that CE would have real-time features and meet the criteria
needed for embedded systems design.
The Microsoft design team did a remarkable job coming up with
Window CE's kernel. They set in place limitations to the design of
the OS before development began. The design team limited the number
of processes to 32 with each process having a virtual address space
limit of 32 MB. For information appliances today, this seemed to be
a fair limitation. 32 slots would be available for 32 possible
processes.
Slot 0 would be a special slot that designated the active
process. Window CE then changed the way a process became active.
Previously, processes became active by copying program and data
memory to a special area in memory, but this came with the
associated overhead of installing and cleaning up processes, data,
and stacks.
In Windows CE, slot 0 is a special slot that designates an
active process and its pointers are directed to the slot where the
process actually resides. When a process switch occurs, slot 0's
pointers are changed to the new active process. Instead of memory
copies to activate a process, pointers are just changed, which
significantly reduces the time it takes to switch processes. The
kernel also incorporates Protected Server Libraries (PSL) that
borrow the resources of a calling thread to minimize the amount of
stack space needed and to increase efficiency when used in
conjunction with critical sections.
Interrupt handling initially didn't support nested interrupts,
but it does now in version 3.0. This allows interrupts with higher
priorities to be serviced immediately, instead of waiting for a
lower priority interrupt to be completed. Thus real-time
performance is enhanced due to the deterministic nature of nested
interrupts. Window CE also provides an interrupt API that allows
the use of an event handle with an interrupt ID and an interrupt
thread service routine. This combination allows for the speedy
servicing of interrupts and the triggering of the interrupt thread
by synchronization events.
There are an unlimited amount of threads per process. The thread
scheduler is a priority-based, round robin scheduler that initially
had eight priority levels but now has 256 in version 3.0. The
scheduler handles priority inversion. Synchronization methods for
threads include critical sections, events, mutexes, and semaphores
(new with version 3.0).
From the start, Windows CE has been modularized so that
developers could include the components they needed for their
applications and eliminate the others. This reduced the size of the
code and amount of resources needed for applications. This
modularization has also contained the GUI. While the other Windows
operating systems required a GUI, Windows CE doesn't. In the early
days much software effort was devoted to abstracting the GUI code
from the messaging subsystem. Although a GUI is required for
debugging on the target system, Windows CE's modularization and
customization provides for instant ON capabilities upon power
up.
The ability to communicate with other devices is a major
priority for Windows CE. The OS supports TAPI 2.1, RAS, serial,
IrDA, DCOM, and TCP/IP. Its TCP/IP support includes the WinInet
component for HTTP and FTP, ASP and ISAPI Web server support, and
DHCP client with Autonet that assigns an IP address if a DHCP
server isn't available. However, Network Address Translation (NAT)
support is missing from 3.0.
Windows CE has also incorporated Microsoft's embedded
applications in its latest release. These include the Mobile
Internet Explorer, Pocket Word, and Pocket Inbox email. Mobile
Internet Explorer is an embedded browser component that supports
.gif and .wav files, frames, tables, JavaScript ActiveX controls,
HTML v4.0, DHTML, and cascading style sheets.
Figure 2: Mobile Internet Explorer enables a near-desktop
browsing experience on the new Pocket PC
Windows CE's development tools set it apart from most other
operating systems. Microsoft's Developer Studio tools support the
Window CE development. With its version 3.0 release, Microsoft has
tightened the integration with the CE platform by incorporating the
platform builder, wizards for the customization of the platform,
hardware assisted debugging, and source level debugging.
New to version 3.0 is the Common Executable Format (CEF), which
is a processor independent language. This format is built within
Visual C++ in the same manner as a normal executable, but is an
intermediate set of instructions instead of native machine code
instructions. This allows the applications to run on different
processors within the same type of platform. Therefore, when a CEF
executable is built for the Pocket PC, it will run on all Pocket
PCs but will not run on H/PCs.
Windows CE version 3.0 is closing the real-time performance gap
with RTOSs and is adding functionality that other embedded
operating systems don't provide. All in all, this release will put
a lot of pressure on its competitors to keep pace. The development
environment and the widespread usage of the Win32 API will allow
experienced developers and third party
vendors to easily create applications for CE.
The release of the Pocket PC platform
platform includes the first set of products to utilize the new
version of CE. Judging from the initial buzz about these devices,
version 3.0 could put Microsoft back on track in the embedded
marketplace.