Solo disponible en BuenasTareas
  • Páginas : 12 (2817 palabras )
  • Descarga(s) : 35
  • Publicado : 2 de junio de 2010
Leer documento completo
Vista previa del texto
Embedded GNU/Linux and Real-Time an executive summary
Robert Berger Embedded Software Specialist Stratigou Rogakou 24, GR-15125 Polydrosso/Maroussi, Athens, Greece Phone : (+ 30) 697 593 3428, Fax: (+ 30) 210 684 7881 email: Abstract What is real-time and how can it be added to a plain vanilla Linux kernel[1]? Two fundamentally different approaches aredescribed here. One approach attempts to patch the vanilla Linux kernel (PREEMPT_RT[2]) to achieve real-time functionality, while the other one utilizes a dual kernel architecture (RTAI[3], RTLinux/GPL[4], Xenomai[5], XM/eRTL[6], Real-Time Core[7], XtratuM[8], seL4[9], PaRTiKle[10],...), where Linux runs as the idle process on top of the realtime kernel. How do those approaches compare? At the timeI started my quest for the holy grail of real-time Linux I hoped that it would be a clear decision wether to use p-rt or dk, but things seem to be less black and white than I initially thought. Bear with me to find out what changed my initial believes. 1 Introduction I would like to thank Nicholas Mc Guire, Paulo Montegazza, Philippe Gerum1 and Jan Kiszka from the dual kernel (dk) camp and ThomasGleixner from the preempt-rt (p-rt) side as well as Paul E. McKenney and Carsten Emde for sharing their precious time with me to provide valuable input and to review this paper. 2 Real-Time Real-Time has to do with time (timeliness), but most of all with determinism (predictability, time and event determinism). Paul E. McKenney defined it as follows: “A real-time system will pass a specified testsuite“[11]. At first sight one might believe that a commercial hard real-time operating system always outperforms (real-time) Linux, but even this is not always true. Performance measurements on Gigabit Ethernet network communication have been carried out on VMEbus MVME5500 boards equipped with MPC7455 PowerPC processors[12]. Comparisons between the Linux IP stack, RTnet[13] and the VxWorksnetwork stack have been performed. One board acquired 64 channels from AD converters via the VME bus and transmitted the data via UDP to another board which wrote data to a DA converter. Please note, that Linux under load would have had much worse performance, while the other systems were only minimally affected by workload. The graph shows that there are valid open source alternatives to VxWorks atleast for specific cases. 1 Philippe does not belong to any camp. He will maintain Xenomai dk until it proves totally useless, which, according to his understanding of the facts, is not the case so far.

3 Comparison of dual-kernel (dk) and PREEMPT_RT (p-rt) characteristics 3.1 Latencies Wind River ran a couple of benchmarks[14] on a Dell D610 laptop with an Intel Pentium M processor to compareReal-Time Core, the Linux PREEMPT_RT patched kernel, and the basic Linux 2.6.27 kernel. The tests used default configurations and fully stressed the non real-time Linux system in order to measure scheduling jitter. average latency (μs) vanilla Linux PREEMPT_RT Real-Time Core 44.000 32.680 27.030 worst case latency (μs) 7827.007 109.009 29.200

This shows the general believe that a dk solutionalways performs better than p-rt. The factor by which it performs better (in case it does) strongly depends on the test cases and the chosen architecture. Please note that p-rt might not be available on as many architectures and kernel versions as dk, so in some cases you cannot perform comparisons. According to Carsten Emde [15] the peak performance of machines increased by a factor of 20000 in thelast 30 years while the worst case performance (WCET) decreased only by a factor of 200 due to caches, shared IRQs, multiprocessing and the like. This means that processors 30 years ago were much better suited for deterministic real-time applications. Real-time operating systems are usually written with those real-time friendly architectures in mind. Also dk utilizes naïve (naïve meaning simple...
tracking img