|
First Source for Red-Hot Product Focus by Tom Lecklider, Senior Technical Editor 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 µ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 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 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. References
Return to EE Home Page Published by EE-Evaluation
Engineering |