Originally posted by: jhu
how does an rtos handle a situation where many processes need to be run at a specific time and the time needed to execute one process runs past the time that another process requires?
In my experience your dealing with badly written code and your now not running in real time.
Just because your running a real time OS doesn't mean your code runs in real time.
I ran into this case once porting real time code.
We used to run a very very old system with 30 process nodes for 30 worker processes and
one process that spawned the rest. However when we were porting the code, we no longer
needed the 30 process nodes, the new nodes were considerably faster, could handle more
than one process. Someone spec the system out and found out we only required 6 nodes.
However the problem we ran into was that when we had 30 nodes, the process that spawned
the other processes off would die, so you had no problem making sure each node had a process.
However in the new system there was a slight bug in the ported code that let the system decide
how to split up the processes. What we wanted and expected to happen is that one of the nodes
would get the first process and then 5 others would be assigned to that node as well. So you
would end up wanting 5 processes per node. And you really didn't care about the first process because
it would die off anyway and wouldn't require CPU time. However what ended up happening was that
the system would put that process on a node with only 4 others. Leaving one node with 6 worker
processes, which wouldn't cause it to run outside of real time. Which for us was very bad.
That one was boggled the mind for alittle bit, especially when the someones first conclusion was
the original assessments of processes per node was incorrect and we needed an extra node, which
solved the problem, but wasn't the correct solution.