News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

Linux 2.6 real-time podcast series concludes

Aug 31, 2007 — by LinuxDevices Staff — from the LinuxDevices Archive — 1 views

TimeSys has published the final installment in its podcast series devoted to real-time capabilities in the Linux 2.6 kernel. Probably the most informative and well-organized episode yet, the new podcast provides fascinating insight and perspective on seven new real-time capabilities added to Linux between the 2.6.0 and 2.6.22.2 releases.

Spread the word:
digg this story

In their two prior episodes devoted to real-time Linux, co-hosts Gene Sally and Maciej Halasz defined some terms and identified sources of latency in Linux. In the final installment, they begin with an organized list of real-time innovations since 2.6 development began, and then return to discuss each innovation in order.

Topics broached include:

  • The 0(1) scheduler
  • Improved POSIX compliancy, including Linux's first implementation of message queues and of priority inheritance, as well as an improved implementation of signals less apt to disregard multiple inputs
  • Three levels of real-time preemptibility, configurable at compile time according to the user's preference for throughput or real-time predictability:

    • Voluntary preemption — adds voluntary preemption points to the kernel, re-using the “my_sleep” function for minimum disruption; allows more opportunities for the scheduler to run high-priority tasks, with little effect on total throughput
    • Preemptible kernel — adds involuntary kernel preemption points, with the goal of achieving 1ms of latency on a fairly fast Pentium processor
    • Full real-time preemption — adds even more preemption points, with the goal of achieving microsecond-level latency; all but “kernel-critical” portions of kernel code become preemptible involuntarily at any time

  • Hard IRQs executed in thread context — allows developers to better insulate systems from external events, by moving hardware interrupts into kernel thread context (where differing priority levels can be assigned)
  • Priority inheritance available in both kernel and user space mutexes — prevents “priority inversions,” where contentions between multiple tasks for the same resource might otherwise cause a lower-priority but sooner-arriving task to be allocated first
  • High-resolution timers — added in 2.6.21, this allows the kernel to actually use the high-resolution timers built into most processors, enabling, for example, POSIX timers and nano_sleep calls to be “as accurate as hardware allows,” Halasz said. “The kernel's entire time management gets to the level of microseconds, and you can schedule timer interrupts at that granularity. Before, time management was not that great. But now, the timer actually gets woken up when you ask for it.”
  • Various kernel config options for monitoring real-time behavior of kernel, including:

    • CONFIG_LATENCY_TRACE — allows end-user to “track the full trace of maximum latency.” The kernel gets a little bigger, and throughput might worsen, but the kernel will keep a text file-like log of latency
    • CONFIG_WAKEUP_TIMING — “Allows the tracking of the maximum recorded time between waking up for a high-priority task, and executing on the CPU, shown in microseconds” Halacz said, adding, “It's available under the /proc filesystem, where you can also reset values.”

As usual, this episode can be found here. Although intended to be a half-hour in length, it runs about 45 minutes, proving that real-time can indeed affect throughput.

Henry Kingman


 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.