See as you have seen, almost everyone has given you what they thought,
and there isn't a single answer to your question.
It will be easier for me, if you know the difference between a Arduino and a Raspberry pi.
What we are looking for is a real time and embedded operating system.
such offering from Microsoft was Windows CE. not Windows XP as people have said.
A lot of time, we do not need an operating system. ( Micro-controllers -> FPGA ).
Some times VxWorks .. for real time.
If one is forced to use a particular processor type, then one has to choose the OS with it.
As you can see, there are too many possibilities, however neither Windows XP nor Ordinary Linux distributions come close to fitting the bill.