Operating Systems in space!
Published: 2021-04-20 04:05:57

[NASA](https://www.nytimes.com/2021/04/19/science/nasa-mars-helicopter.html#:~:text=At%203%3A34%20a.m.,crater%2C%20into%20the%20Martian%20sky.) has just deployed *Ingenuity*, a lightweight helicopter sent with the payload of the most recent Mars rover, *Perseverance*.  At exactly 3:34 AM (ET) Ingenuity successfully executed the first powered flight on another planet. 

That wasn't the only first in space history today, though. As it turns out, it was also the first time a linux process has ever been executed on another planet. Which got me wondering, what other operating systems have we as a species hurled into the cosmic abyss? 

Let's get into it.
 

In the early days of spaceflight, when programs like Russia's [Sputnik](https://en.wikipedia.org/wiki/Sputnik_1) and the U.S's [Explorer](https://en.wikipedia.org/wiki/Explorer_1) were being rolled out, each new craft came with its own custom built OS. These were often tailored to those craft's specific needs, and extremely basic by modern standards.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awkr6yronl1ypy6292zf.png)
  

Enter stage right: a man by the name of [J. Halcombe Laning](https://en.wikipedia.org/wiki/J._Halcombe_Laning). Laning was a pioneer of his time who worked with engineers at MIT to create the first ever real time computer in the early fifties, among many other notable accolades.  By the time the [Apollo missions](https://www.nasa.gov/mission_pages/apollo/missions/index.html) were being conceived, NASA knew it would need a state of the art guidance system for it's new generation of space-craft, so they turned to Laning to help build out the software for it. Years later, the [Apollo Guidance Computer](https://en.wikipedia.org/wiki/Apollo_Guidance_Computer#cite_note-Hoag-17) was launched with Apollo I, which included the same basic real time operating system designed by Laning that would dominate most of the rest of the Apollo Program. 

But, as with the early days, there was no real standardization during this period. That didn't come until 1987, when NASA adopted [VXworks](https://www.windriver.com/products/vxworks) as it's primary OS of choice.

Here's the crazy part: that standard hasn't changed in over thirty years, since it was originally adopted! Perseverance, the most recent rover that dropped off our little helicopter buddy from earlier, is running on the [same OS](https://blogs.windriver.com/wind_river_blog/2018/11/back-to-mars-with-vxworks/) that crafts in the late 80's and early 90's were.  

Which, to be fair, is a bit of an oversimplification. While they haven't changed from VXworks in the last three decades, NASA *has* updated their proprietary version of it as time has gone on, so it's not like it is completely outdated. 

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rleuxdn8x6o9cpn11k4y.png)
 

VXworks itself was chosen because it was one of the leading OS's at the time, especially among government agencies and the military. According to [wikipedia](), VXworks is--- 

*"... designed for use in embedded systems requiring real-time, deterministic performance and, in many cases, safety and security certification, for industries, such as aerospace and defense, medical devices, industrial equipment, robotics, energy, transportation, network infrastructure, automotive, and consumer electronics."*

Which makes the choice of OS for Ingenuity even more interesting. It's packing a [Qualcomm Snapdragon 801 Processor](https://en.wikipedia.org/wiki/Qualcomm_Snapdragon), which is a CPU you'd usually find in a run of the mill laptop. Running the CPU is a relatively standard linux environment that is utilizing an open source framework called ["F Prime"](https://www.theverge.com/2021/2/19/22291324/linux-perseverance-mars-curiosity-ingenuity), that was specifically designed for powered flight using Ingenuity. This means that if you wanted to, you could go to [NASA's website](https://trs.jpl.nasa.gov/handle/2014/48425) and tinker with it yourself! How cool is that???

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4mbq2w8vbu323l0bw50m.png)

Now, I understand no conversation about modern space-tech would be complete without a mention of [Space-X](https://www.spacex.com/), the renegade hot-shot of the international aerospace community. 

Unsurprisingly, their [engineers chose linux](https://thenewstack.io/the-hardware-and-software-used-in-space/#:~:text=But%20it's%20not%20necessarily%20a,its%20flightpath%2Ddirecting%20grid%20fins.) as their primary OS, which runs everything from their rockets to their onboard nav systems. Like the little mars helicopter who could, they are sporting modern x86 processors to run most of their processes. The interesting part to me, a web developer who is only just getting started in the field, is that they are using languages like Javascript, Python and C++ to execute the complex processes behind the scenes and tools like HTML and CSS to display information to their astronauts in the cockpit. Hell, they are using chromium and javascript for the touchscreen functionality on the main displays!

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pxuc20di1j31ea24xg5g.png)

Which, in a weird way, makes me feel oddly closer to the cosmos at large. Like, one would assume that the kind of tech that helps put people into space is somewhat unknowable, left to only the smartest among us. But here we are, throwing CSS and HTML into the eternal nothing. 

Of course these are all incredibly complex systems built by literally the smartest people in the world, but when it's all laid out into one brief overview you can notice that it's just one generation iterating into another, and is really no more unknowable than the first time you sat down to code javascript. 

So raise a glass to the first linux process on the Red Planet. It will not be the last!