circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

April 1999, Issue 105

Win32 and Real Time


by Peter Petersen and Tom Schotland
Start A Solution? Best of Both Worlds Two Approaches A Win32 Compatible RTOS Development Process Scalability Software & Sources

A SOLUTION?

Several products claim to add real-time capabilities to Windows NT. And, there are different approaches to solving the real-time problem.

Special ISA or PCI cards can be used to map normal interrupts to the PC’s nonmaskable interrupt to reduce interrupt latencies caused by NT device drivers. However, the real-time application has to run within a device driver, making access to and from regular applications difficult.

Software development requires a thorough knowledge of NT’s device drivers. Device drivers run at the CPU’s highest privilege level without protection for the NT kernel or system data structures. A simple bug can overwrite system memory and crash NT.

Replacing NT’s hardware abstraction layer (HAL) is an approach that attempts to fix problems below the kernel by, for example, providing a higher timer-interrupt frequency. But, the fundamental real-time deficiencies of the kernel can’t be fixed. A modified HAL may improve NT’s soft real-time behavior but not meet the hard real-time requirements of application threads.

Another approach is to run NT as a single task of a true RTOS. Although such a system can yield deterministic time behavior, real-time tasks run completely isolated from the Windows world, requiring complex communications mechanisms.

Software development requires good knowledge of both the RTOS and Windows NT. This approach requires the use of Intel’s hardware task switching, which is slow and increases interrupt latencies (but yields deterministic upper bounds).

Each of these approaches has its problems, and the high resource demands of NT are not reduced (and may even be increased). The performance achieved is either only soft real time or impeded by general performance bottlenecks. All solutions carry additional royalties and increase the OS licensing costs.

Products that need to be deeply integrated into the NT kernel (e.g., at the HAL level) will always lag behind the latest OS version. Also, they’ll never be tested by such a wide user base as the desktop version of NT, so it’s questionable whether they’ll have the same degree of compatibility and stability.