Reputation: 53
Is it because timing constraints imposed on real-time systems means that a thread or task should control its own execution based on timings where a sequentially executed program may not be able to guarantee timings are achieved due to its task load?
Regards, thanks.
Upvotes: 1
Views: 1813
Reputation: 531
I liked Peter's answer, but I'd like to elaborate.
The exogenous physical devices that are part of a real-time system -- i.e., the part that the real-time software and computer interact with -- may have any amount of concurrency from none to whatever. Real-time systems are NOT inherently concurrent, but many if not most of them are to some extent.
Regardless of the amount of concurrency the exogenous part has, the real-time software can in general have any amount of concurrency from none (the so-called "master thread" Peter alluded to) to as many schedulable threads/tasks/etc. as is deemed appropriate.
And as Peter noted, the more concurrency in the software, the more complex and difficult concurrency control gets. This is true in general, and exacerbated in real-time software due to the time constraints. It is claimed by some reputable software scientists that the human mind is not well suited to managing high degrees of asynchronous concurrency of anything.
Edward Lee is one of the most outspoken critics of concurrent threads, as articulately documented in this tech report "The Trouble With Threads" www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf.
Upvotes: 1
Reputation: 24867
Concurrent<>Real time, as others have posted.
Real time systems tend to use premptive schedulers because of the good IO performance. Cooperative or non-existent scheduling are only suitable for applications where latency and overall IO performance is not important - ruling them out for many/most 'real time' tasks.
Whether 'real' concurrency is acutally used, ie. mutiple cores, is another matter.
Upvotes: -1
Reputation: 533570
You can write a real time system with one thread so it doesn't have to be concurrent.
Using threads can help in real time systems, but they can introduce their own problems.
Perhaps you associate real time with concurrency because you have to be more aware of what every thread is doing.
Upvotes: 5