ShenChong wrote:
> 
> Does anyone know what's the standards of real-time-OS? Where can I get
> the standards? What's the differences between Linux and VxWroks?
> 

Hello,
The answer to this question is made rather difficult since, many people,
in many different areas of computing and IT, have different definitions
for the term "real-time".  In many situations, the term "real-time"
essentially means "recent".  For example, many on-line sources provide
real-time stock quotes, meaning that they are guaranteed to contain
information which is no older than, generally, 20 minutes.  

Within the industrial and multi-media audience, the term "real-time" can
be broken down into two sub-categories.  

1.  Soft real-time:  this occurs when a task, _on average_, must be
performed at a specific rate.  An example of a soft real-time
application would be a video display, where if one or two frames are
dropped, or occur slightly out of time, the result is either not
noticable to your eye, or, if it is, it certainly is not catastrophic.   

A task can inadvertently be forced to miss it's scheduled time slot when
the CPU is busy doing another task (for example, writing to disk) at
precisely the same moment as the scheduled task is due.  Standard Linux
includes provisions for defining tasks as soft real-time, but since the
soft-real time task has no way to pre-empt the new process (i.e. the
disk write), it must wait for the new process to finish before the
scheduled task can be run.  So, as a result, standard Linux can not
provide any hard scheduling guarantees because it never knows when other
tasks (such as the disk write) will be started.  (Note:  the fine print
says that a standard Linux system which performs only _one_ task _can_
be considered to be "real-time" since there are no other tasks to
pre-empt the scheduled task)

2.  Hard real-time:  this occurs when a task, _must always_ be performed
at a specific rate, and on schedule every time.  A simplified example of
a hard real-time task would be in a bottling factory.  Consider a
situation where an assembly line brings 1000 bottles of milk per minute
uniformly below the bottle capping machine.  At such a fast and
repetitive rate, you need assurances that the capping mechanism will
lower itself every 60 mSec, every time, regardless of what else is
happening.  If, the machine pauses for 3 seconds while it writes a log
file to its database, 50 bottles will remain uncapped (and you'll likely
loose synchronisation on the remainder of the bottles).  

A hard real-time operating system can guarantee that the scheduled task
(i.e. the movement of the capping mechanism) _always_ happens on
schedule.  This is only possible because the scheduled task has the
ability to pre-empt the new task (i.e. writing the log file), forcing
the disk write to be performed as a background process during spare CPU
cycles.  



On-line resources: 

http://www.rtlinux.org (dealing with the NMT real-time Linux)

http://www.realtimelinux.org (dealing with all solutions for real-time
Linux)

http://www.zentropix.com/support/document/helpdox/rtai.pdf
has a pretty good section about why standard Linux can not be considered
hard real-time.  

http://beba.fisica.unlp.edu.ar/
or (mirrored at):  
http://www.zentropix.com/support/document/testdata.html
Provides some test results.   


I hope this has been of some help

-Dave Beal

--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.

Reply via email to