locked
realtime programming RRS feed

  • Question

  • I would like to start learning realtime programming...
    1- Is this to do with multithreading?
    2- When learning paralel programming, do you also learn about multithreading and realtime programming?
    Thanks
    Wednesday, August 31, 2011 1:42 PM

Answers

  • Real-time is not related to multithreading.  In fact multithreading generally goes against realtime (at least in the deterministic sense).  You cannot use an OS like Windows for hard realtime programming.  As a consequence .NET and any language that runs on it is also not hard realtime. 

    Soft realtime is possible on Windows with strong restrictions in place (mainly dealing with determinisism).  C# could theoretically be soft realtime but you'd really need to limit your usage of the framework to get that behavior.  I wrote soft realtime systems in the 90s using C++ and Windows NT/2000 so I know it can be done.  But Windows is not deterministic so issues do arise.

    A full coverage of realtime programming and the differences therein is too large for a forum topic.  Google for the information about what it is and why it is useful.  It is not in any way related to parallel or multithreaded processing.  You do not learn about one while learning about the other.  C#, .NET and Windows are multithreaded, parallel-based systems and therefore that is the type of programming you do on them.

    Michael Taylor - 8/31/2011
    http://msmvps.com/blogs/p3net

    • Marked as answer by Martin_Xie Thursday, September 8, 2011 2:07 PM
    Wednesday, August 31, 2011 1:59 PM

All replies

  • Wednesday, August 31, 2011 1:43 PM
  • Thanks but that link does not answer my question.
    Wednesday, August 31, 2011 1:50 PM
  •  I'd look into an os that is specifically designed for realtime applications like QNX. 

    Windows is not guaranteed to be a realtime operating system.

    Wednesday, August 31, 2011 1:57 PM
  • Real-time is not related to multithreading.  In fact multithreading generally goes against realtime (at least in the deterministic sense).  You cannot use an OS like Windows for hard realtime programming.  As a consequence .NET and any language that runs on it is also not hard realtime. 

    Soft realtime is possible on Windows with strong restrictions in place (mainly dealing with determinisism).  C# could theoretically be soft realtime but you'd really need to limit your usage of the framework to get that behavior.  I wrote soft realtime systems in the 90s using C++ and Windows NT/2000 so I know it can be done.  But Windows is not deterministic so issues do arise.

    A full coverage of realtime programming and the differences therein is too large for a forum topic.  Google for the information about what it is and why it is useful.  It is not in any way related to parallel or multithreaded processing.  You do not learn about one while learning about the other.  C#, .NET and Windows are multithreaded, parallel-based systems and therefore that is the type of programming you do on them.

    Michael Taylor - 8/31/2011
    http://msmvps.com/blogs/p3net

    • Marked as answer by Martin_Xie Thursday, September 8, 2011 2:07 PM
    Wednesday, August 31, 2011 1:59 PM