Slashdot Mirror


The Software Behind the Mars Phoenix Lander

chromatic writes "Imagine managing a million lines of code to send over seven hundred pounds of equipment millions of miles through space to land safely on Mars and perform dozens of experiments. You have C, 128 MB of RAM, and very few opportunities to retry if you get it wrong. O'Reilly News interviewed Peter Gluck, project software engineer for NASA's Mars Phoenix Lander, about the process of writing software and managing these constraints — and why you're unlikely to see the source code to the project any time soon."

10 of 152 comments (clear)

  1. Millions of lines? by Anonymous Coward · · Score: 0, Insightful

    How many lines of code can 128 MB of RAM hold and what is the average 'line' for C?

    1. Re:Millions of lines? by neokushan · · Score: 3, Insightful

      For legacy reasons that have just sort of stuck, the maximum line size in C is often no more than 80 characters long, although plenty of people ignore this unwritten "rule" these days.
      I'd say you can safely assume that each line is around 80 characters, though, as a lot of lines will use very few.

      But it's all irrelevant as I doubt they'd bother transmitting the entire source code to Mars when they can just compile it into a good ol' binary that's probably a hundredth of the original source code's size, if not more.

      --
      +1 IDisagreeSoHeMustBeATrollOrAnAstroturferOrAShill
  2. Re:wow, long article, here's the answer to the tea by QuantumG · · Score: 5, Insightful

    This is basically the reason why space technology is so primitive. The science has been stifled for years by government regulations.

    --
    How we know is more important than what we know.
  3. Re:wow, long article, here's the answer to the tea by megaditto · · Score: 4, Insightful

    It's a tricky balance though. Nuclear missile launch codes are also -- technically -- public property, yet I am not sure it'd be a good idea to release that in the public domain.

    I think the way things are handled right now is the best we are going to get: basic science is open, applied scientific results are secret.

    --
    Obama likes poor people so much, he wants to make more of them.
  4. Your statement is flawed. by flattop100 · · Score: 5, Insightful

    Space technology is not "flawed." It is rigorously tested to survive A)Lift off B)Months and years of dormancy C)Descent D)Operation on another planet millions of miles away, with minutes-long latency. Beyond that, it has to be tested time and again to make sure there are NO errors. If you computer at home freezes, you hit reset. Trying pushing the reset button on a Mars rover--let me know how that works out for you. Space technology is not primitive. It may seem simplistic, but that's to guarantee functionality. Read the definition of "mission-critical" and think about what you typed there. It's a little different that "recreational software development."

    1. Re:Your statement is flawed. by Kerkyon · · Score: 3, Insightful

      Beyond that, it has to be tested time and again to make sure there are NO errors.

      Well, no, not really. It's far more economical to ensure that the system can recover from serious errors and that errors are fixable, rather than try to assure zero errors. Mainly because the former is possible and the latter isn't.

      If you computer at home freezes, you hit reset. Trying pushing the reset button on a Mars rover--let me know how that works out for you.

      This is addressed in TFA -- the watchdog timer takes care of it; they're ubiquitous in high-reliability embedded systems.

  5. My eyes, they burn! by geekoid · · Score: 5, Insightful

    What a horrible interview.

    WHen interviewing someone, you don't tell them what they know, you ask them.

    An example:
    "That's not a really beefy embedded board actually. It's what, thirty-three megahertz?

    Yeah. That's â" yeah.


    About 128 megabytes of RAM?


    That's right.

    I imagine that produces some interesting challenges, getting all of that software to run together on that board while also having it land on the planet successfully.
    "

    Painful.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    1. Re:My eyes, they burn! by rho · · Score: 2, Insightful

      But just think how smart and well-informed the interviewer sounds!

      I stopped reading halfway through. Useless interviewer leads to useless interview.

      --
      Potato chips are a by-yourself food.
  6. Nah, space technology is just as junky as us. by tjstork · · Score: 2, Insightful

    Dude, the lunar lander program crashed repeatedly on Neil Armstrong and Buzz Aldrin right when they were trying to land on the moon. It was so bad, that mission control basically told them to ignore it and Neil went ahead and landed the thing really by the seat of his own pants. You really can't have a bug much more worse than that!

    When you think about it, space software is probably the most unreliable software there is. I mean, it is a classic cathedral design, has only a handful of users, and so, yeah, they can do a lot of testing, but, they miss stuff. Look at how often they have to upload patches to the ship while it is in flight.

    --
    This is my sig.
  7. Re:Reset button on a lander by joeslugg · · Score: 2, Insightful

    6 bit counter (2**6) ?

    Just a guess...