Hi ,
Is it possible to achieve hard real time operation with nimrod ? How ?
Thanks.
There is a lot of confusion about the soft/hard realtime distinction: For mission critical hard realtime systems it's not only about the programming language: you need to get rid of the OS or you need an OS with realtime guarantees for a start. You can use Nimrod for hard realtime systems but you have to avoid quite some features like the GC, exceptions and heap allocations and the compiler has no mode (yet) to warn you if you use any of these features accidentally.
However, using Nimrod for hard realtime systems is quite feasible if you know what you're doing (which should be the case anyway when you plan to build a hard realtime system).
Note that games and multimedia applications count as soft real time systems. ;-) For instance, I would also happily use the full language to control a robot (depends of course on what the robot has to do).
About GC:
Can't you use the GC only in non-realtime threads of your system, while in each of your realtime threads - allocate memory(thread local) only at initialization , And of course use a hard real time os(with fair scheduler), and use async messages between threads . Wouldn't that be hard real time ?
I see you used posix threads , so i guess nimrod should run over posix compliant os's ?
I think that even in serious robots , the soft real time takes most of the code, to do Stuff like AI and Vision.
Can't you use the GC only in non-realtime threads of your system, while in each of your realtime threads - allocate memory(thread local) only at initialization , And of course use a hard real time os(with fair scheduler), and use async messages between threads . Wouldn't that be hard real time ?
Indeed, this could work. The async message passing may create problems though; you need to ensure the queues don't become too large, you need progress guarantees etc.; and in particular the current version is unlikely to be up for the task: it is slow and allocates memory dynamically for the messages. (A patch/an alternative implementation is welcome of course.)
I see you used posix threads , so i guess nimrod should run over posix compliant os's ?
It tries its best to be portable to as many OSes as possible but usually some glitches come up when porting to a new Posix-compatible OS.