Printer Friendly

First source for red-hot Linux 2.6 drivers: product focus.

The recent release of the Linux 2.6 kernel was closely followed by a United Electronic Industries (UEI) announcement that it was offering the 2.6 version of drivers for UEI data acquisition cards. According to UEI, the drivers are the first to be offered by any leading data acquisition card vendor and ship free with all PCI and PXI products including multifunction, simultaneous-sampling, analog-output, and digital I/O cards.

By using Linux 2.6 and these drivers, the company claims that notification of an interrupt can be passed to an application program in an average of 11 [micro]s--a 90% reduction in the time required by the 2.4 kernel. While not quite real time, this significant performance improvement may make Linux a good choice for your next embedded or near-real-time application.

Linux is continuing to grow in popularity for many reasons, with low cost and openness being major ones. These attributes are attractive, but until now, Linux could not address the special needs of very small embedded systems, applications requiring real-time operation, or very large systems.

If you have been using Linux, you are aware of the slow interrupt response inherent in version 2.4. In fact, an active debate about the causes of the sluggishness and possible fixes continued in the Linux community throughout the three years between the releases of Linux 2.4 and 2.6. For many 2.4 users, proprietary patches had to be used to address scheduler latency.

Actually, there are four elements that contribute to the overall delay between an interrupt and the time the associated application program starts to run: interrupt latency, interrupt handler duration, scheduler latency, and scheduling duration. Of these, scheduler latency was by far the largest.

In the 2.4 kernel, the process scheduler could not run when a process was executing in a system call. This restriction explains the 232-ms maximum latency measured in one test that also found a mean latency value of 88 [micro]s. (1) In the same test, so-called low-latency patches were inserted that added explicit preemption points to allow very long routines to be interrupted if the scheduler needed to run. These patches reduced the mean latency to about 54 [micro]s but limited the maximum latency to only 1.3 ms.

A second approach was to interrupt the executing process if possible. Although the Linux kernel was not originally written to support preemptive interrupts, they had become practical by 2.4, and an appropriate set of patches could be added.

Linux 2.6 incorporates these changes as well as important modifications to the process scheduler and the way in which resources are shared among competing threads. The effect of these and other alterations is to save time. In a test of the new kernel, a 500-MB file was read in 3.9 s vs. 37 s for the 2.4 kernel. (2) In this case, much of the improvement was due to a new anticipatory I/O scheduler that avoids unnecessary process queuing.

In UEI's investigations of the performance of a PowerDAQ MF multifunction card, a benchmark program was run under Linux 2.6 on a 1-GHz Pentium III with 256 MB of memory. When an interrupt was received in the low-level driver, the test read the processor time-stamp counter (TSC). When the user program received the event corresponding to the interrupt, the TSC was read again and the two values subtracted to determine the overall latency.

Although increased interrupt handling speed is the feature key to high-speed operation of the UEI cards. Linux 2.6 doesn't stop there. In multiprocessing applications, it handles 64 processors vs. 16 for 2.4 and can address 4,095 devices compared to 255. The memory space also increases from 16 GB to 64 GB of RAM and from 2 TB to 16 TB for file systems.

These new capabilities may not be as important to data acquisition as they are to enterprise applications attempting to challenge UNIX. (2) However, by addressing all of 2.4's deficiencies, the new 2.6 kernel ensures continued Linux growth. That can't be a bad thing for designers deciding what operating system to use for their next project.
               No Load              Heavy Load
           Average  Worst Case  Average  Worst Case
Linux 2.4  133.2    1950.9      149.6    6351.7
Linux 2.6   10.9      15.8       11.3      63.5

Real-Time Data Acquisition Interrupt Response of PowerDAQ Multifunction
PCI Card Under Linux 2.6
Courtesy of UEI

Note: Table made from bar graph.


1. Williams, C., "Linux Scheduler Latency," Red Hat, 2002,

2. Venezia, P., "Linux v2.6 Scales the Enterprise," InfoWorld, 2004 Issue 5, pp. 36-45.

by Tom Lecklider, Senior Technical Editor
COPYRIGHT 2004 NP Communications, LLC
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2004 Gale, Cengage Learning. All rights reserved.

Article Details
Printer friendly Cite/link Email Feedback
Title Annotation:Data Acquisition
Author:Lecklider, Tom
Publication:EE-Evaluation Engineering
Geographic Code:1USA
Date:Apr 1, 2004
Previous Article:A system-component approach to functional test systems: any programmable instrument can be used in a system. But what makes one system-ready and...
Next Article:Switching considerations for microwave test systems: with today's technology, RF switching and signal control are moving out of the realm of mystery...

Terms of use | Privacy policy | Copyright © 2022 Farlex, Inc. | Feedback | For webmasters |