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

Article: Thoughts on Adeos

Jun 11, 2002 — by LinuxDevices Staff — from the LinuxDevices Archive — 5 views

The recent announcement of Adeos by Philippe Gerum, Karim Yaghmour, Paolo Mantegazza, and a variety of organizations provides an exciting opportunity to real-time Linux developers. Is there a new, completely GPL, Open Source, solution for hard real-time with Linux? If so, is the solution a sound one? I'll provide my… opinion on these and other related issues . . .

Should/can I use Adeos for my real-time application right now?

It is too soon to go out and use Adeos directly for a complicated real-time application. Adeos provides a framework on top of which controlled interrupt processing can be built. At this point it seems best to wait for RTAI or some other full-featured real-time API to adopt the Adeos layer. Adeos is sufficient for deterministic interrupt handling but alone does not provide tasking, communication, etc.

What does Adeos do?

Adeos provides functionality at the kernel level. That is in kernel space, and is thus directly available to Linux loadable kernel modules. Consequently, Adeos does not directly provide support to user space applications.

Specifically, Adeos provides the following new kernel functions: adeos_register_domain(), adeos_unregister_domain() ,adeos_renice_domain(), adeos_suspend_domain() ,adeos_virtualize_irq(), adeos_control_irq(), adeos_stall_ipipe, adeos_unstall_ipipe, adeos_restore_ipipe, adp_current,adp_root(). A more detailed description is available in this article.

These functions allow for, among other things, the creation of new “domains”. These domains are prioritized. The priority defines in what order interrupts are processed. Thus by creating a domain of higher priority than the domain in which Linux resides, interrupts can be processed before Linux processes them.

Linux does not need to really disable interrupts on the processor. They will simply appear disabled to Linux and that is sufficient. Linux won't be interrupted when it doesn't want to be, because Adeos controls the interrupts. Thus, real-time performance in other, high priority domains, will not be affected by the actions of Linux.

How can I get started using Adeos?

First, download the software patch for linux-2.4.18 which is located here.

After patching the kernel, you must choose “Adaptive Domain Environment support” from the “General setup” portion of the Linux kernel configuration. Note that, at present, there is no help available within the configuration system for that option.

The download for Adeos provides a simple example kernel loadable module which can be used to test that the kernel is supporting Adeos properly. The example also shows how simple it is to register an interrupt handler which will be of priority higher than that of Linux. This simple mechanism may be all that is required for some real-time applications.

What Architectures?

Adeos is currently only available for Linux and for x86. However, it is the concept that is most important. The amount of code for Linux is approximately 1400 lines. Porting this code to a different O/S and to a different architecture may be a relatively simple process. Decisions in the design and implementation of Adeos point to portability as an important goal.

Is Adeos Free?

The comments in the patch file for Adeos state that the software is GPL. Of course, RTLinux claims to be GPL as well. The Adeos software makes no mention of a patent covering its techniques. The announcement from the developers states clearly that they wish to provide a solution that is independent of the patent protecting RTLinux. My sense is that all of the developers involved in Adeos sincerely wish the source to be freely available and not hampered by any software patents.

Is Adeos a sound approach?

If the need is for one particular device to be able to deterministically handle interrupts, then Adeos may be sufficient. This is a simple, and major, advance for real-time with Linux.

The fundamental idea of providing a higher priority for interrupt processing to some application or “domain” other than Linux is a sound approach to providing real-time guaranteed performance. Ultimately, the soundness will rely upon the details of the implementation. With such well experienced developers, and the experience in real-time of the RTAI developers, converging to bring Adeos into existence for real-time Linux, the prospects seem quite good that a new, sound solution for hard real-time in Linux will emerge.

What should be produced is a new round of debate over the relative merits of the approaches to real-time in Linux such as the preemptible kernels, RTLinux, and RTAI. This time, without the cloud of patent infringement that currently exists. Developers will indeed have three or four good solutions for real-time with Linux from which to choose.

What else can Adeos do?

By providing a mechanism for registering interrupt handling, Adeos enables multiple operating systems to co-exist. This includes RTOS's. These OSes must be modified to use the Adeos interrupt mechanism, but, as mentioned above, this may be a relatively easy effort.

In addition, the ability to do kernel debugging on a single piece of hardware, instead of having to do it remotely, will be a welcome benefit to driver writers and others working in kernel space. And perhaps more importantly, kernel debuggers might no longer need to be as tied to kernel releases as is currently required. Instead of requiring a patch, a kernel debugger could be developed simply as a loadable module, and use Adeos to manage interrupts.



About the author: Kevin Dankwardt is founder and President of K Computing, a training and consulting firm. He has spent most of the last 9 years designing, developing, and delivering technical training for such subjects as Unix system programming, Linux device drivers, real- time programming, and parallel-programming for various organizations world-wide. He received his Ph.D. in Computer Science, in 1988.






 
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.