Tae-Sung Shin
Tae-Sung Shin

Reputation: 20633

Need help to choose real-time OS and Hardware

I heard and read that Windows/Linux OS machines are not real-time. I have read this article. It listed WindowsCE is one of RTOS. That's kind of confusing to me since I always thought WindowsCE is for a mobile or embeded device.

I need a real-time application running 24/7 and processing signals various sensors from each quick moving object to db and monitor by running several machine learning algorithms.

What would be proper real-time hardware and OS for this kind of applications? Development environment would be MFC or Qt C++. I really need opinions from experienced developers. Thanks

Upvotes: 1

Views: 673

Answers (2)

Martin Beckett
Martin Beckett

Reputation: 96119

How real time do you need?
Remember real time is about responsiveness, not speed. In fact most RTOS will be slower on average than general OS.

Do you need to guarrantee a certain average number of transactions/second or do you need to always respond within n seconds of an event?

Do you have custom hardware or are you relying on inputs over ethernet, USB, etc? Are drivers for the hardware available on the RTOS or will you have to write them yourself ?

Windows and linux are possible RTOS. Windows embedded allows you to turn off services to give much more reliable response rate and there are both realtime kernels and realtime add-ons to Linux which give pretty much the same real time performance as something like VxWorks.

It also depends on how many tasks you need to handle. A lot of the complexity of true RTOS (like VxWorks) is that they can control many tasks at the same time while allowing each a guaranteed latency and CPU share - important for a Mars rover but not for a single data collection PC

Upvotes: 2

André Caron
André Caron

Reputation: 45239

QNX has served me well in the past. I should warn you that it was only for training purposes (real-time industrial process control), and that I have implemented real time control programs with this OS by I've never really deployed one.

The first rule with real-time systems is to specify your real-time constraints, such as:

  1. the system must be able to process up to 600 signals per minute; or
  2. the system must spend no more than 1/10 second per signal.

The difference is subtle, but these are different constraints.

Just keep in mind that there is absolutely no way to decide if any hardward/OS/library combination is good enough for you unless you specify these constraints


For that, you think QNX might be proper? What would be its advantages over Windows/Linux systems with high priority setting?

If you look at the QNX documentation for many POSIX systems calls, you will notice they specify extra constraints on performance, which are possibly required to guarantee your real-time constraints. The OS is specifically designed to match these constraints. You won't get this on a system that is not officially an RTOS. If you are going to write real-time software, I recommend that you buy a good book on the subject. There is considerable literature given that the subject is very sensitive.

Get yourself a good book on real-time system design to get a feel of what questions to ask, and then read the technical documentation of each product you will use to see if it can match your constraints. Example of things to look in software libraries like Qt is when they allocate memory. If this is not documented in each class interface, there is no way to guarantee meeting your constraints since there is hidden algorithmic complexity.


Development environment would be MFC or Qt C++.

I would think that Qt compiles on QNX, but I'm not sure if Qt provides the guarantees required to match your real-time constraints. Libraries that abstract away too much stuff are risk since it's difficult to determine if they satisfy your requirements. Hidden memory management is often problematic, but there are other questions you should ask about too.


It seems to me that people say Real-time systems == embedded systems. Am I wrong?

Real-time system definitely does not equal "embedded system", though many embedded systems have real-time constraints.

Upvotes: 2

Related Questions