News for hackers. Stuff that matters.
Re:SpaceX Crew Demo-1 Mission [video] by bsaul on Saturday March 02, 2019 @05:13AM (#19288568)
I remember reading here a document about C programming guidelines for military / space software ( basically no dynamic memory allocation ever), but that was set a long time ago. I wonder if spaceX reinvented some parts of the software stack, or if they went along the traditional way.

I don’t expect seing rust code in the shuttle, but maybe formal proof with custom functionnal languages...

Re:SpaceX Crew Demo-1 Mission [video] by elteto on Saturday March 02, 2019 @11:09AM (#19289752)
The flight software team did a reddit AMA a while back [0]. They use C++ for writing the flight software (what flies falcon, dragon, etc) running on a customized RT Linux.

[0] https://www.reddit.com/r/IAmA/comments/1853ap/we_are_spacex_...

Re:SpaceX Crew Demo-1 Mission [video] by raptorraver on Saturday March 02, 2019 @03:02PM (#19290877)
Thanks for this! ”We’re looking to start crew trials as early as 2015.” :)
Re:SpaceX Crew Demo-1 Mission [video] by monocasa on Saturday March 02, 2019 @11:53AM (#19289940)
And FreeRTOS. RTLinux is only barely soft realtime.
Re:SpaceX Crew Demo-1 Mission [video] by avmich on Saturday March 02, 2019 @01:19PM (#19290353)
> RTLinux is only barely soft realtime.

Linux used to run as a non-privileged process in hard real-time kernel, which taken together was guaranteeing responses in nanoseconds range.

If this is still the case (along with what Wikipedia states) , the whole system is by definition hard real-time.

Re:SpaceX Crew Demo-1 Mission [video] by monocasa on Sunday March 03, 2019 @12:56AM (#19292981)
Wow, that's really silly that someone went out, made a hard realtime system using Linux as the lowest priority level, and then called it RTLinux. RTLinux for years had meant Linux with the PREEMPT_RT patches.

In any case, SpaceX doesn't use Linux for hard realtime systems.

> They do not have hard realtime requirements

https://lwn.net/Articles/540368/

And I probably wouldn't use the RTLinux for a real hard realtime system if I were making the choice. Putting all of the realtime code in the same memory domain as the rest of the Linux kernel is a huge surface area for corruption. I'd probably use sel4 with a virtualized Linux to get the same semantics.

Re:SpaceX Crew Demo-1 Mission [video] by solarkraft on Saturday March 02, 2019 @04:40PM (#19291328)
But only the underlying kernel part is actually real-time, the Linux process wouldn't be, right? That leads me to the question: Shouldn't all things in a rocket be real time? Are they "post-poning" stuff like telemetry and other communications?
Re:SpaceX Crew Demo-1 Mission [video] by avmich on Saturday March 02, 2019 @04:43PM (#19291341)
All critical processes can run outside of Linux, in hard real-time fashion. Linux is used for non-critical things, like networking... The whole RTLinux includes Linux (non-RT part) and a hard RT part, for which you can write your code.
Re:SpaceX Crew Demo-1 Mission [video] by danpalmer on Saturday March 02, 2019 @07:09AM (#19288882)
From what I understand, they are pushing the boundaries on the hardware front, i.e. relatively recent, typical Linux computers onboard, and just relying on having a few redundant ones and short flight times, rather than very radiation hardened systems like those used in satellites or real-time operating systems.

However on the SpaceX software side I think they’re fairly conservative and “boring”, so I’d guess C and similar guidelines to what you’ve mentioned.

Re:SpaceX Crew Demo-1 Mission [video] by biesnecker on Saturday March 02, 2019 @09:16AM (#19289328)
I'd be surprised if they were able to be human flight certified without all the redundancy and hardening that any other manned spacecraft has, though.
Re:SpaceX Crew Demo-1 Mission [video] by gpm on Saturday March 02, 2019 @09:46AM (#19289443)
For example, my understanding is that the redundancy approach is basically "do everything on 3 computers, vote on the outcome".
Re:SpaceX Crew Demo-1 Mission [video] by creatornator on Saturday March 02, 2019 @02:18PM (#19290654)
Sometimes you even have different firmware/software teams write code for each of the three different configurations (often targeting different processors/architectures, etc). Pretty cool
Re:SpaceX Crew Demo-1 Mission [video] by JshWright on Saturday March 02, 2019 @12:49PM (#19290185)
You can "skimp" on hardening if you use more redundancy (which is generally cheaper, and often lighter (which is the real cost savings)).
Re:SpaceX Crew Demo-1 Mission [video] by danpalmer on Sunday March 03, 2019 @01:18PM (#19295874)
You can also skimp on hardening if the operational lifetime in space is minutes to days, instead of months to years like most satellites.
Re:SpaceX Crew Demo-1 Mission [video] by mandeepj on Saturday March 02, 2019 @02:26PM (#19290688)
They build everything in-house - software and hardware. You can read about it in detail in Musk's biography - https://www.amazon.com/Elon-Musk-SpaceX-Fantastic-Future-ebo...