[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Real-time _design_ patterns/examples ...
I've just finished a course for fourth year engineering students on
real-time programming, using rtlinux examples. Our experiences are
that students have not too much problems in understanding the
real-time concepts and the specific implementations in rtlinux (i.e.,
mostly the Posix API). But, they do have _a lot_ of problems in
_designing_ a real-time system. One of the major problems is, in my
opinion, a lack of ``software patterns'' or optimally-designed example
implementations of many common real-time components.
I'm planning to spend some time on such example implementations; but
(hopefully) somebody else has already done this?
What would be the best place to store these examples?
What would be the best way to develop them in this community? (in
other words: who wants to maintain such a project? :-)
Examples of the patterns I'm thinking of are:
- producer-consumer (how to synchronize them such that the buffer in
between does not fill up or get empty; swinging buffers; etc.);
- motion control pattern: command interpreter -> trajectory generator
-> servo thread;
- finite state machine (or other tool) to make sure that all threads
always return to a well-defined state before engaging in IPC with
other threads;
- coping with an `emergency' interrupt that requires that the current
task is stopped and an emergency task is executed;
- soft real-time broker: distribute data to interested threads
(real-time or not) with loose coupling;
- etc.
Also a list of Do's-and-don'ts would be very welcome.
Herman
--
"I decry the current tendency to seek patents on algorithms. There
are better ways to earn a living than to prevent other people from
making use of one's contributions to computer science." D. E. Knuth