>Guy Mac>>
>>Henrik Carlqvist wrote:
>>
>>>A process with a real time priority will keep the
>>>CPU until it gives away the CPU by its own will or until
>>>another process with a higher real time priority needs
>>>the CPU. All processes with normal priorities will work
>>>as before with preemptive multitasking, but the normal
>>>processes will only get any CPU if it isn't needed by
>>>any real time process.
>>>
>>>Such real time processes can hang the entire machine
>>>if they get stuck in an infinite loop. Unless the
>>>computer has more CPUs than working real time processes
>>>there will be no CPU left to handle mouse movements,
>>>terminals or ssh daemons. Because of this you will
>>>need root privileges to set those priorities.
>>
>> The above is an excellent description of what happens when a non
>> real-time OS is handed a process that is labeled "real time"
>> and told not to interrupt it. If the process finishes quickly
>> and isn't much of a resource hog, this can be an effective
>> strategy, but as you pointed out, if it hangs you are hosed.
>> A Real-Time Operating System is designed to avoid such problems,
>> and will meet the deadlines on all processes.
>
>This all strangely sounds like DOS ;-|
In what way?
DOS is (unless you count TSTs) is a single-tasking program loader with a rudimentary API. It not only fails to "meet the deadlines on all processes", it only runs one process. DOS can do a fine job of controlling real-time embedded systems, but the application has to do all the functions that are normally handled by an RTOS (real-time operating system). For many real-time embedded systems a simple loop does everything needed, and a RTOS is overkill, but if you need multi-threading, DOS is no longer appropriate.
QNX, on the other hand, is a RTOS and, with careful software design, will meet all deadlines on all processes. And, now that the Linux Kernel has real-time capabilities, the same is possible using Linux.
References:
formatting link
formatting link
formatting link
formatting link
formatting link