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

Software archaeology - Learning from the landing on the moon!

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. SOFTWARE ARCHAEOLOGY
    Learning from
    the landing on
    the moon!

    View full-size slide

  2. 2
    03.11.22 © 2022 viadee

    View full-size slide

  3. 3
    03.11.22 © 2022 viadee
    INTERNATIONAL SPACE STATION (ISS)
    Source: By NASA/Crew-2 - https://www.flickr.com/photos/nasa2explore/51710869257/

    View full-size slide

  4. 4
    03.11.22 © 2022 viadee

    View full-size slide

  5. 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

    View full-size slide

  6. 6
    03.11.22 © 2022 viadee
    Source: The New York Times / Wikimedia Commons / NASA

    View full-size slide

  7. 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)

    View full-size slide

  8. 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.

    View full-size slide

  9. 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.

    View full-size slide

  10. 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)

    View full-size slide

  11. 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

    View full-size slide

  12. 12
    03.11.22 © 2022 viadee
    Source: By NASA, Public Domain

    View full-size slide

  13. 13
    AGC = APOLLO GUIDANCE COMPUTER
    03.11.22 © 2022 viadee
    Source: https://commons.wikimedia.org/w/index.php?curid=3984038

    View full-size slide

  14. 14
    03.11.22 © 2022 viadee
    Source: James A. Hand, MIT‘s Role in Project Apollo (R-700), Volume 1, October 1971

    View full-size slide

  15. 15
    AGC HARDWARE
    03.11.22 © 2022 viadee
    55, 33, 15
    size in cm (length, width, height)

    View full-size slide

  16. 16
    AGC HARDWARE
    03.11.22 © 2022 viadee
    32
    weight in kg

    View full-size slide

  17. 17
    AGC HARDWARE
    03.11.22 © 2022 viadee
    55
    power consumption in watts

    View full-size slide

  18. 18
    AGC HARDWARE
    03.11.22 © 2022 viadee
    16
    bit architecture
    1 sign, 14 data bits, 1 parity bit

    View full-size slide

  19. 19
    AGC HARDWARE
    03.11.22 © 2022 viadee
    -16,383 to 16,383
    integer range
    one‘s complement

    View full-size slide

  20. 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

    View full-size slide

  21. 21
    AGC HARDWARE
    03.11.22 © 2022 viadee
    2048
    words read/write memory (RAM)
    corresponds to 4 KiB

    View full-size slide

  22. 22
    AGC HARDWARE
    03.11.22 © 2022 viadee
    36,864
    words read-only-memory (ROM)
    corresponds to 72 KiB

    View full-size slide

  23. 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)

    View full-size slide

  24. 24
    AGC HARDWARE
    03.11.22 © 2022 viadee
    2
    clock rate in MHz

    View full-size slide

  25. 25
    AGC HARDWARE
    03.11.22 © 2022 viadee
    51,000 / 1,900
    Downlink data rate in bps (bits per second)
    to Mission Control („Houston“)

    View full-size slide

  26. 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

    View full-size slide

  27. 27
    https://svtsim.com/moonjs/agc.html
    03.11.22 © 2022 viadee
    DSKY / AGC SIMULATOR

    View full-size slide

  28. 28
    03.11.22 © 2022 viadee
    Source: By Brandrodungswanderfeldhackbau, Public Domain, https://commons.wikimedia.org/w/index.php?curid=3612656

    View full-size slide

  29. 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)

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  32. 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

    View full-size slide

  33. 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

    View full-size slide

  34. 34
    03.11.22 © 2022 viadee
    https://apolloinrealtime.org/

    View full-size slide

  35. 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)

    View full-size slide

  36. 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

    View full-size slide

  37. 37
    ALARMS
    03.11.22 © 2022 viadee
    1202
    Executive Overflow – NO VAC AREAS
    Vector Accumulator (VAC) Area Exhaustion
    à more than 5 Interpreter jobs

    View full-size slide

  38. 38
    03.11.22 © 2022 viadee
    Source: James A. Hand, MIT‘s Role in Project Apollo (R-700), Volume 1, October 1971

    View full-size slide

  39. 39
    03.11.22 © 2022 viadee
    Software
    Engineering

    View full-size slide

  40. 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)

    View full-size slide

  41. 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!“

    View full-size slide

  42. 42
    MISSION CONTROL (HOUSTON)
    03.11.22 © 2022 viadee
    Source: Space Center Houston (spacecenter.org)

    View full-size slide

  43. 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)

    View full-size slide

  44. 44
    03.11.22 © 2022 viadee

    View full-size slide

  45. 45
    03.11.22 © 2022 viadee

    View full-size slide

  46. 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

    View full-size slide

  47. 47
    METHODOLOGY / PRINCIPLES STAY
    03.11.22 © 2022 viadee
    Abstraction
    Virtualization

    View full-size slide

  48. 48
    03.11.22 © 2022 viadee
    Thanks a lot for flying with me
    through rocket history J
    Tobias Voß
    [email protected]
    @tobiaslvoss
    tobiaslvoss

    View full-size slide