Quick answer, yes, it could. Long answer, maybe, it's not as easy as you think.
A lot of what's complicated about space-flight software is that it must be automated and more importantly it must be timed just right. Linux or any other SpaceFlight OS is going to need to monitor fuel burn rate, thrust and altitude. It will need to monitor and control gimbals on the engines, various consumable stores and other instrument based readings. It will need to make decisions based on these readings and not get locked up or confused. It will need to be able to transmit all these readings back home and send some radio signals or change frequency at minimum when key decisions are made. These are to let ground control know what is going on when they are not in control or too far away to make quick changes. The further away the craft is, the longer it takes to send a command.
Can it do it, definitely yes. But each craft and mission is different. I'd bet that they want the hard real time Linux for this.
Ok- this a question of "could it ever ?"
Several folks have proposed American funding for Big Dumb Boosters.
Think a cloned only slightly updated Saturn V. Problem being that NASA has made "Lawn Ornaments" of all the unused ones they had, then shredded or burned all the project docs.
Which included ***ALL** known copies of the software. So even if that mythical "found one complete in a warehouse" scenario were true... We would have to recreate software not only to fly the bird, but to support it. That is quite likely the same level of complexity as writing code for ANY such giant rockets. If we copy a Saturn V or make the not yet hatched Saturn VI.
Thus it becomes viable to consider Linux and it's ancillary tool sets
Then again - would you ever be able to find enough coders in any other STABLE viable OS?
--
Oren Beck
816.729.3645