If anybody else is interested in the topic, the seminal work on software development at NASA is the Fast Company feature from 1996, "They write the right stuff":
Worth saying that doesn't apply outside manned missions. They notoriously crashed a probe into Mars thanks to erroneous imperial to metric unit conversion.
EDIT: also the VxWorks fan stuff here is a bit odd, given the other notorious error involved setting the task priorities so that the probe spent the whole time checking the weather, but never phoned home. They were just lucky they shipped the thing in debug mode and reprogrammed it once it had landed.
That pathfinder bug was a priority inversion caused by failing to enable priority inheritance when creating mutexes, not quite as simple as setting the priorities wrong. VxWorks wasn't entirely at fault, although the priority inheritance feature was not obvious. Concurrency is hard. See http://research.microsoft.com/en-us/um/people/mbj/mars_pathf... for details.
you really, really should never write things such that task priorities must be of a certain arrangement for the thing to work properly. It's very bad form. Also, from the link "Tasks on the Pathfinder spacecraft were executed as threads with priorities that were assigned in the usual manner reflecting the relative urgency of these tasks." Yeaaaaaugh! "PRIORITIES DO NOT WORK THAT WAY!" - Morbo.
http://www.fastcompany.com/node/28121/print?donttaseme