Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Software archaeology - Learning from the landin...

Tobias Voß
November 03, 2022

Software archaeology - Learning from the landing on the moon!

The landing on the moon was about 50 years ago and mankind plans again big space programs. IT played a major role at the first moon landing and many important fundaments of software engineering were established. The term itself was coined by Margaret Hamilton during the design of the Apollo Guidance Computer (AGC), the control software of the Apollo lunar lander.

I want to practice a bit of software archaeology in contrast to current technology hypes with a retrospection of the groundbreaking achievements of the AGC. Priority scheduling, multitasking and a realtime operating system were implemented for one of the first embedded systems. A virtual machine - a new concept as well - provided mathematical functions and abstracted from the hardware. One of the main success factors was the robustness of the software, which was characterized by excellent error handling and prevented human user errors - an important learning after Hamiltons daughter crashed the AGC while playing with it. This quality kicked in minutes before the landing and prevented the failure of the mission. Let us take a look back to the future!

Tobias Voß

November 03, 2022
Tweet

More Decks by Tobias Voß

Other Decks in Technology

Transcript

  1. 3 03.11.22 © 2022 viadee INTERNATIONAL SPACE STATION (ISS) Source:

    By NASA/Crew-2 - https://www.flickr.com/photos/nasa2explore/51710869257/
  2. 5 03.11.22 © 2022 viadee CHINESE SPACE STATION Source: By

    Shujianyang, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=111045856
  3. 7 03.11.22 © 2022 viadee „We choose to go to

    the Moon...We choose to go to the Moon in this decade and do the other things, not because they are easy, but because they are hard.“ (John F. Kennedy, 12.09.1962, Address at Rice University on the Nation's Space Effort) „I believe that this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the Moon and returning him safely to the Earth.“ (John F. Kennedy, 25.05.1961, Special Message to the Congress on Urgent National Needs)
  4. 8 03.11.22 © 2022 viadee Source: By NASA - This

    is a cropped and rotated version of : http://nix.larc.nasa.gov/info?id=S62-04976&orgid=8File:Mercury_capsule_with_escape_system_-_artist_concept_-_original.jpg, public domain, https://commons.wikimedia.org/w/index.php?curid=90873932 Epic 1 (Mercury, 1958-63) Get an astronaut into an orbit around the earth.
  5. 9 03.11.22 © 2022 viadee Source: By NASA - Great

    Images in NASA Description, public domain, https://commons.wikimedia.org/w/index.php?curid=6482593 Epic 2 (Gemini, 1961-66) Orbital maneuvers for rendezvous and docking, extra-vehicular activity as preparation for Apollo.
  6. 10 03.11.22 © 2022 viadee Bildquellen: By NASA - http://www.hq.nasa.gov/alsj/a11/AS11-40-5903HR.jpg,

    http://www.archive.org/details/AS11-40-5903 (TIFF image), NASA Image and Video Library, Public Domain, https://commons.wikimedia.org/w/index.php?curid=3847764 Epic 3 (Apollo, 1961-72) Moon landing (and safe return)
  7. 11 CSM = COMMAND SERVICE MODULE LM = LUNAR MODULE

    03.11.22 © 2022 viadee Source: By NASA - http://www.hq.nasa.gov/office/pao/History/alsj/a15/as15-88-11963.jpg, Public Domain, https://commons.wikimedia.org/w/index.php?curid=243484 By Apollo 16 astronauts - NASA photo AS16-116-18580, cropped, Public Domain, https://commons.wikimedia.org/w/index.php?curid=6057549
  8. 13 AGC = APOLLO GUIDANCE COMPUTER 03.11.22 © 2022 viadee

    Source: https://commons.wikimedia.org/w/index.php?curid=3984038
  9. 14 03.11.22 © 2022 viadee Source: James A. Hand, MIT‘s

    Role in Project Apollo (R-700), Volume 1, October 1971
  10. 15 AGC HARDWARE 03.11.22 © 2022 viadee 55, 33, 15

    size in cm (length, width, height)
  11. 20 AGC HARDWARE 03.11.22 © 2022 viadee 9 decimal digits

    numeric precision realized with a double word (28 bits) precision of 1 foot (=30,48 cm) at navigation
  12. 23 AGC HARDWARE 03.11.22 © 2022 viadee 12 length of

    memory addresses (with 3 bits opcode) only enough for 4096 words memory banking (virtual addressing)
  13. 25 AGC HARDWARE 03.11.22 © 2022 viadee 51,000 / 1,900

    Downlink data rate in bps (bits per second) to Mission Control („Houston“)
  14. 26 DSKY 03.11.22 © 2022 viadee Source: By Oona Räisänen

    & NASA - Self-made in Inkscape; based on the Apollo Operations Handbook (File:DSKYS interface.jpg, by NASA) and a NASA photo from http://www.nasa.gov/centers/dryden/about/Organizations/Technology/Facts/TF-2001-02-DFRC_prt.htm, Public Domain, https://commons.wikimedia.org/w/index.php?curid=8991950
  15. 28 03.11.22 © 2022 viadee Source: By Brandrodungswanderfeldhackbau, Public Domain,

    https://commons.wikimedia.org/w/index.php?curid=3612656
  16. 29 03.11.22 © 2022 viadee „DSKY responds quickly to software

    commands, but in turn, must interface with the slowest component of all, the human crew.“ (Frank O‘Brien, The Apollo Guidance Computer, Architecture and Operation)
  17. 30 EXECUTIVE = REAL-TIME OPERATING SYSTEM 03.11.22 © 2022 viadee

    7 processes ordered by priority cooperative multi-tasking with NEWJOB
  18. 31 EXECUTIVE = REAL-TIME OPERATING SYSTEM 03.11.22 © 2022 viadee

    11 different interrupts T3RUPT = TIME3 timer overflow KEYRUPT1 = keystroke DSKY
  19. 32 EXECUTIVE = REAL-TIME OPERATING SYSTEM 03.11.22 © 2022 viadee

    100 keys to be pressed for the state vector telemetry uplink from mission control RPA = uplink data equals DSKY input
  20. 33 INTERPRETER 03.11.22 © 2022 viadee Source: By Impawards, Fair

    use, https://en.wikipedia.org/w/index.php?curid=1659383 Virtual machine vector & matrix data types trigonometric & radix functions index register & stack pointer simpler addressing without banks mixed code with Executive assembly
  21. 35 03.11.22 © 2022 viadee „I want you to study

    and write down every possible program alarm whether they can happen or not.“ Gene Kranz (Flight Director Mission Control) to Jack Garman (Support for Flight Controllers)
  22. 36 ALARMS 03.11.22 © 2022 viadee 1201 Executive Overflow –

    NO CORE SETS à Exhaustion of core sets, i.e. the set of waiting processes to be scheduled
  23. 37 ALARMS 03.11.22 © 2022 viadee 1202 Executive Overflow –

    NO VAC AREAS Vector Accumulator (VAC) Area Exhaustion à more than 5 Interpreter jobs
  24. 38 03.11.22 © 2022 viadee Source: James A. Hand, MIT‘s

    Role in Project Apollo (R-700), Volume 1, October 1971
  25. 40 03.11.22 © 2022 viadee „The computer (or rather the

    software in it) was smart enough to recognize that it was being asked to perform more tasks than it should be performing. It then sent out an alarm, which meant to the astronaut, 'I'm overloaded with more tasks than I should be doing at this time and I'm going to keep only the more important tasks'; i.e., the ones needed for landing ...“ (Letter from Margaret H. Hamilton, Director of Apollo Flight Computer Programming MIT Draper Laboratory, Cambridge, Massachusetts, titled "Computer Got Loaded", published in Datamation, March 1, 1971)
  26. 41 DSKY 03.11.22 © 2022 viadee Source: Von Oona Räisänen

    & NASA - Self-made in Inkscape; based on the Apollo Operations Handbook (File:DSKYS interface.jpg, by NASA) and a NASA photo from http://www.nasa.gov/centers/dryden/about/Organizations/Technology/Facts/TF-2001-02-DFRC_prt.htm, Public Domain, https://commons.wikimedia.org/w/index.php?curid=8991950 „Always take human errors into account when programming!“
  27. 43 DIGITAL AUTOPILOT 03.11.22 © 2022 viadee Source: „Armstrong and

    Aldrin during Apollo 11 landing rehearsal“, Project Apollo Archive, Public domain, via Wikimedia Commons „At MET 102:43:08 (650 feet), after deciding that he could not stop short of the crater, Armstrong flipped the autopilot mode switch from AUTO to ATT HOLD to take manual control of the LM's attitude. He maneuvered to zero pitch to maintain horizontal velocity and skim over the rocky area.“ (http://klabs.org/history/apollo_11_alarms/eyle s_2004/eyles_2004.htm)
  28. 46 METHODOLOGY / PRINCIPLES STAY 03.11.22 © 2022 viadee Agile

    Planning Iterative Design Simulation Robust Fault-tolerant Vision Inspiration Cooperation Competition is good for business
  29. 48 03.11.22 © 2022 viadee Thanks a lot for flying

    with me through rocket history J Tobias Voß [email protected] @tobiaslvoss tobiaslvoss