UEI First to Offer Data-acq Cards with Linux 2.6 Support

3/5/2004 - People in the embedded community are getting very excited about the significant improvements in the latest version of Linux, kernel 2.6, which gives that OS response times bordering on hard real time. United Electronic Industries - The High-Performance AlternativeTM - is the first supplier of data-acq cards to offer drivers that work with this increasingly popular OS. Thanks to these drivers, which are included in the free PowerDAQ for Linux Ver 3.5 support package, test engineers can take full advantage of these benefits. A dramatic example is the time it takes the kernel to alert a user program to an interrupt: In a series of real-world benchmark tests conducted at the UEI laboratories on PowerDAQ PCI-bus hardware, the Linux 2.6/PowerDAQ driver combination can pass notification of an interrupt to an application program in an average of roughly 11 Ásec, which represents more than a 90% reduction in response time from Linux 2.4.

Until now, the only way to get reasonable Linux responsiveness to interrupts or other critical events as required in data-acquisition, test and automation tasks has been to add a realtime patch available from third-party suppliers. In Linux 2.6, though, several improvements give it inherent performance that approaches that of a realtime system; among these are preemption points in the kernel, an improved scheduler and better synchronization. Now, unless a user's requirements are absolutely hard real time, it might not be necessary to go with a special configuration or patch.

Best of all, UEI's drivers work flawlessly with Linux 2.6-and they ship free with all of the firm's PCI and PXI products including multifunction, simultaneous-sampling, analog-output and digital I/O cards. Further, these are professionally developed, fully supported drivers. Users need not worry about the quality or completeness of a public-domain driver, or whether it really works with their hardware, or with this latest version of Linux. UEI has verified and tested its Linux drivers to make certain that PowerDAQ hardware runs exactly as predicted under this environment.

What's special about Linux 2.6?
In previous versions of Linux, system calls could take a long time to run, and during that time the OS was blocked from servicing any interrupts. However, in Linux 2.6 the kernel code adds a number of preemption points that allow the scheduler to see if a high-priority task is waiting, whereupon it blocks the current process so it can then schedule that higher priority process.

Scheduling and task switching is also improved. Previously, Linux would select the next task to run by examining all of them in the queue and positioning them in importance. This action ate up time. Now, as soon as a task is ready, Linux automatically sorts it into position on the current queue. Then the scheduler need only choose the task on top of the queue, thereby eliminating any extra waiting.

A related improvement is support for fast user-space mutexes. A mutex is a program object that allows multiple threads to share a resource, such as file access, but not simultaneously. Any thread that needs a given resource must lock the mutex from other threads while using that resource. In Linux 2.6, mutex functions can check from the user space whether blocking is necessary - if it isn't necessary, a thread need not perform a system call to block another thread, again saving time and making thread execution and task switching faster.

Another major addition to the kernel is that its internal threading infrastructure can now run the Native POSIX Thread Library. Test and automation systems often must poll hardware on a regular schedule, and POSIX timers ease the task of scheduling them.

Benchmark procedure
To investigate the improvement that the Linux 2.6 kernel brings to data-acquisition and automation tasks, UEI's software engineers took a PowerDAQ MF multifunction card and ran a simple benchmark program. The test platform has a 1-GHz Pentium III and 256M bytes of RAM. The benchmark program ran under the Mandrake 9.1 distribution with recompiled kernels for Linux 2.4.20 and 2.6.

The benchmark program uses the capability of an MF board to assert an interrupt when the state of a digital input changes. When the interrupt is received in the low-level driver, the test reads the processor time-stamp counter (TSC), which runs at the same speed as the processor for the most precise timebase possible. When the user program receives the event corresponding to the interrupt, the test program again reads the TSC and subtracts the two values to find the time it took the kernel to get the event from the driver's interrupt service routine to the user's program. The benchmark program ran the test algorithm 1000 times in roughly 30 sec.

The engineers ran two test scenarios:

  1. No load-in this synchronous test, the benchmark program was the only user application running on the system, and there was nothing else keeping the system busy such as display refreshes, mouse movements or hard-disk activity. The PowerDAQ combination running under Linux 2.6 has an average response time of 10.9 Ásec, a reduction of 91.8% compared to Linux 2.4; the worst-case response time drops by 99.2% to 15.8 Ásec
  2. Heavy load-in this synchronous test, the engineers made life as difficult as possible for the benchmark program by opening/closing other applications such as OpenOffice, and by moving various windows on the screen with the mouse. Once again, the PowerDAQ card cut its average response time by 92.4%, this time to 11.3 Ásec; the worst-case time (63.5 Ásec) dropped by 99.0% of its previous value.

From these benchmark numbers, it should be clear that a PowerDAQ card running under Linux 2.6 offers response times that rival those of a hard realtime OS, and in many applications this level of performance should be quite sufficient. For those users who do need hard realtime performance, though, the PowerDAQ Linux Ver 3.5 driver is completely compatible with the realtime patches from organizations such as FSMLabs and RTAI.

Further, because of UEI's LabVIEW for Linux drivers, test engineers who wish to program under LabVIEW and gain the benefits of this new Linux kernel can do so without delay.

These benefits are available immediately for all of UEI's PCI and PXI cards; the PowerDAQ for Linux Ver 3.5 driver set ships for free as part of the PowerDAQ Software Suite that accompanies every board the firm sells. The LabVIEW for Linux driver likewise comes at no charge. These drivers are also available for free downloading from www.ueidaq.com.

For the moment, the only way to use Linux kernel 2.6 on a desktop distribution is to manually compile and install it; UEI guarantees support for any build. When any of the major Linux vendors release desktop distributions based on kernel 2.6, which should happen in the next months, UEI will immediately test them to ensure that the PowerDAQ Linux Ver 3.5 driver is completely compatible.

About United Electronic Industries, Inc
Known as "The High-Performance AlternativeTM" UEI is a supplier of leading-edge PCI- and PXI-based data acquisition cards, distributed Ethernet-based data-acquisition and automation systems, signal-conditioning accessories and software. In particular, it has emerged as a market leader in the field of hard realtime data acquisition on PCs through its support of realtime Linux implementations and commercial RTOSs. Among the firm's major markets are sophisticated production test systems, process monitoring and control as well as R&D.

Previous Page | News by Category | News Search

If you found this page useful, bookmark and share it on: