Is Windows capable of hard real-time?

0

I have read that Windows is a preemptive OS. However, there is the option to set process priority to "Realtime". Can processes with the "Realtime" process priority in Windows be preempted? If so, are they somehow capable of satisfying hard real-time deadlines?

Spaghaetti

Posted 2019-05-10T14:00:07.500

Reputation: 3

Answers

0

Windows is not capable of hard real time. And it is a preemtive OS.

A thread running under Realtime priority could be preempted by another thread of higher priority. Realtime is a priority class assigned to processes. Within that class threads can have a wide range of individual priorities. Or a Realtime thread may be preempted by an interrupt. Even the lowest priority interrupt has priority over the highest priority thread. There are other things that could delay the execution of a thread, some of which the programmer has no control over. Even a simple memory access could cause a hard pagefault which would result in disk access requiring many milliseconds to complete.

It has been said that Windows is a soft real time OS. Such a system makes a best effort to meet real time constraints, but there are no promises. There are known and relatively frequent situations where real time constraints will not be met. That just isn't good enough for hard real time. A hard real time OS must make promises and they must be kept. Trying isn't good enough.

A hard read time OS has deadlines that must be met. Such an OS would be used for such things as controlling industrial processes where timing is critical. A delay that is outside allowable parameters could have disastrous consequences.

A hard real time OS must be designed from the ground up for the purpose. It is not easy. General purpose operating systems such as Windows, Linux, and Mac OS do not do particularly well with real time, and not at all with hard real time. Real time operating systems do not make good general purpose operating systems. They are just too different.

LMiller7

Posted 2019-05-10T14:00:07.500

Reputation: 1 849