Real-time for Windows NT Myron Zimmerman, Ph.D. Chief Technology Officer, Inc. Cambridge, Massachusetts (617) 661-1230 www.vci.com Slide 1
Agenda Background on, Inc. Intelligent Connected Equipment Trends Microsoft Windows CE Windows NT and Windows NT Embedded Win32-based real-time API RTX Real-time Extension for Windows NT DCX Real-time Software Component Model Question and Answer Resources at www.vcicenter.com Slide 2
Overview Founded in 1980, pre-ipo, 85+ employees Investors include GE, Intel and Microsoft 900+ projects in Telecom, Industrial Automation, Medical, Point of Sale, Military & Aerospace Headquarters in Cambridge, MA, with offices in California, Virginia, France, Japan, United Kingdom, the leading provider of products and expertise for organizations developing Windows-based Intelligent Connected Equipment (ICE) Slide 3
Milestones 1980 s: Principal UNIX developers for DEC, Foxboro, GE, Toshiba on real-time UNIX versions EDS on $250M USDA, AT&T on $980M AFCAC 251 contracts Boeing & Rockwell on first FAA flight-certified embedded UNIX Early 1990 s: Real-time and embedded UNIX products Fully preemptive and real-time UNIX SVR3/R4 kernels Embedded and ROM ed UNIX, embedded development tools 1996: Real-time and embedded Windows products First tools and embedded configurations of Windows NT Licensed to Microsoft in 1998 as basis for Windows NT Embedded First comprehensive real-time extension for Windows NT Slide 4
Intelligent Connected Equipment Trends Shift to 32-bit general purpose micros (64-bit coming) Compressed equipment life-cycles Exploding software content in intelligent equipment Advanced GUI-based operator interfaces Connectivity to other equipment and Information Systems Complexity and advanced product features Use of commercial-off-the-shelf components Hardware -standard processors, busses and board sets Software - standard OS and layered components New equipment software development paradigm more use of existing components, less new code development Slide 5
Windows in Intelligent Equipment Desired by end-user organizations for commonality with their existing Information Systems Microsoft offers two Windows OS options CE for the low-end - less features, higher NRE, lower unit cost NT for the high-end - more features, lower NRE, higher unit cost Pluses for equipment vendors and their developers Great range of COTS Drivers, Applications, etc. Familiar Windows GUI-based operator interface Powerful Win32 API and Network connectivity Rich set of development tools Recently added embedded features Missing comprehensive real-time functionality Slide 6
Windows CE 3.0 Microsoft targets Pocket PC, Set-tops and variations Win32 API subset Disconnected or intermittent connected system Windows NT host development and download Memory.5MB RAM,.5MB ROM GUI adds 1MB RAM, 2MB ROM Typical total RAM in 4 to 16 MB range Application code pages, XIP, ROM compression Scheduling and response times (Pentium III 700) 16 ISR levels - 2.5 µs to 5+ µs 256 thread priorities - 6.7 µs to 25+ µs Heavy load or networking - 100+ µs Slide 7
Windows NT Embedded u u Based on technology licensed from Microsoft targets the high-software content market u u u u OEM leverages Windows NT networking and applications Full Win32 API, security and system services are available New embedded licensing model (e.g. lower cost) Target Designer authoring tool u u u u Builds the target image from Windows NT operating system and application components Database of all NT files, registry settings and inter-relationships Provides configuration management Performs dependency checking Slide 8
Windows NT Embedded Features Based on the standard (i.e. retail) Windows NT Small memory footprint configurations 16 MB RAM, 10 MB Storage (16 MB with networking) The paging file can be eliminated Special display driver for headless operation A write filter for read-only storage devices Remote management and unattended error recovery Boot and run from: Flash Memory CD-ROM (requires bootable ROM burning software) Slide 9
Windows NT and Real-time Windows NT without RTX is not hard real-time Scheduling and response times (Pentium III 700) 32 ISR levels - 2.5 µs to 10+ µs DPC - 5.8 µs to 5000+ µs 32 thread priorities - 6.7 µs to 5000+ µs (plus paging) All low-level device programming must be done in a Windows NT kernel level driver using the Device Driver Kit (DDK) non-win32 interface and difficult to debug Hard to manage user-level working sets (e.g. paging) Complex interrupt management ISR queues a DPC, which in turn schedules a thread Slide 10
Situational Analysis Two basic approaches to support real-time Use two computers one computer with a RTOS for real-time, plus another computer with Windows for non-real-time processing One computer for both real-time and non-real-time processing Benefits of the one computer approach Lower hardware costs and easier software integration Utilize a real-time extension for soft coprocessor capability Single host Pentium processor for both types of processing Pentium is a very high-performance RISC-speed processor Pentium includes some DSP-like instructions (MMX) 20% CPU bandwidth of a 500 MHz processor, is still 100 MHz Microsoft may add some real-time features over time Select an API and extension that can support these features Slide 11
RTX The Real-time Extension for Windows NT that enables high-speed, deterministic processing without a coprocessor RtWinAPI the common real-time Windows API RTX Description and Features RTX Architecture Performance Results (CE, NT and NT with RTX) Slide 12
RtWinAPI - The Common Real-time Windows API Defines a common real-time Win32-based API Supports real-time applications and device drivers Same on Windows CE and Windows NT with RTX Carefully selected set of 108 Win32 calls Most useful and provide the best real-time performance Process, Thread, Handle, DLL, Heap memory support Events, Semaphores, Mutexs and Shared Memory support Elegant thread-based device interrupt management IPC between real-time and non-real-time components Leverages standard development tools and knowledge Header file and doc available on s CENTER Slide 13
RTX Description RTX adds a real-time sub-system (RTSS) to NT Independent thread scheduler runs ahead of all Windows NT interrupt, DPC and thread processing High-speed and deterministic response times RTSS can run on a dedicated processor on MP systems Worst-case IST jitter times of 22 µs (8 µs on MP systems) Supports RtWinAPI plus other advanced API calls C, C++ and Java (3 rd party) language support No changes to Windows NT kernel or device drivers Real-time HAL extender for interrupt isolation, fast timers, blue screen interception Includes debugging, timing trace and object viewer tools Slide 14
Key RTX Features Thread-based interrupt management Interrupt mask based on thread priority Full RTX API (with FP and SEH) always available Bus controller, direct memory and device port IO access Resources (memory, interrupts, ) coordinated with NT RTX applications continue after Windows NT stops RTX applications start early during booting (~3 s after initial blue screen) Floating point support Windows NT starvation watchdog timer (UP issue only) Structured exception handling (SEH) Support for DLL modules Slide 15
RTX Architecture Win32 Process Win32 Process with RTX IPC RTSS Process RTSS Process RTX.DLL Win32 Subsystem Windows NT Kernel and Device Drivers RTX - RTSS (Real-time Subsystem) HAL RTX - HAL (Real-time HAL Extender) Slide 16
Thread Switch Times under Load on Pentium III 700 (Min / Max in ì sec) Operation NT 4.0 CE 3.0 RTX 5.0 SetEvent (no switch) 1.0 / 5000+ 1.7 / 8.2+.3 / 3.7 Event 1.4 / 5000+ 2.8 / 12.2+.9 / 6.3 Mutex 1.5 / 5000+ 4.0 / 12.0+ 1.0 / 6.5 Semaphore 1.4 / 5000+ 3.3 / 10.7+.9 / 6.3 Yield 1.2 / 5000+ 1.5 / 9.5+.4 / 6.8 Priority Change 1.3 / 5000+ 1.6 / 10.2+.7 / 5.3 IST Latency 6.7 / 5000+ 6.7 / 26+ 4.0 / 19 NOTES: 1) Maximum values include the overhead of timer interrupts. 2) NT does not priority promote the thread owning a contested mutex. 3) CE results from light GUI load only - networking loads add 100+ µs latencies. Slide 17
DCX The Real-time Data and Control Exchange for Windows Connecting software components together in real-time DCX Description DCX Key Features DCX Architecture Slide 18
DCX Description Supports a data-flow centric software component model with high-performance real-time data and control flow Based on the publish/subscribe model Integrates with Microsoft COM and the OPC interface standard Types of DCX software components Real-time applications use RtWinAPI (portable) calls Device drivers use RtWinAPI (portable) calls Non-real-time applications use any native OS API calls DCX COM server to COM and DCOM client components System integration model for mixed-vendor real-time software components Slide 19
DCX Features Data flow tuned for Real-time and Control Named data items with configurable properties Cached and queued methods, variety of data types High-performance read/write times (less than 0.2 µs) No-contention read/write access protocol guarantees determinism Configurable Scheduling Behavior Abstract all thread priorities and timers Standard and configurable synchronization methods C/C++ and real-time Java (3 rd party) language interfaces C++ driver and application component classes coming Distributed using real-time TCP/IP networks coming Slide 20
Component Integration with DCX OPC Client OPC Client Real-time App Non-RT App Data Logger Operator Interface DCX - Open data exchange DCX COM Server (OPC IDL) Real-time Driver Real-time App Slide 21
DCX Architecture DCX DCX Device Driver RtWinAPI IPC IPC Sync Sync Objects Shared Shared Memory DCX DCX Resource Manager Configuration Database DCX Application DCX Slide 22
Summary Start with Windows NT and/or CE platforms Lower development costs while adding functionality Run on a wide range of off-the-shelf platforms Leverage large pool of Win32 developers and tools Add RTX for hard real-time capability and to reduce coprocessor and DSP hardware costs Use DCX to connect real-time and non-real-time software components together Leverage s expertise to reduce development risk, cost and time-to-market Check the www.vci.com and www.vcicenter.com websites for current information, downloads and support Slide 23