←back to thread

327 points AareyBaba | 1 comments | | HN request time: 0s | source
Show context
anonymousiam ◴[] No.46184727[source]
The same is true for the software that runs many satellites. Use of the STL is prohibited.

The main issue is mission assurance. Using the stack or the heap means your variables aren't always at the same memory address. This can be bad if a particular memory cell has failed. If every variable has a fixed address, and one of those addresses goes bad, a patch can be loaded to move that address and the mission can continue.

replies(7): >>46185566 #>>46187219 #>>46188652 #>>46189307 #>>46190613 #>>46191199 #>>46196185 #
Thaxll ◴[] No.46185566[source]
Can't this be done at runtime? Like the underlying calls can black list hardware address on read/write faults?
replies(1): >>46185682 #
amluto ◴[] No.46185682[source]
If you have memory to spare and are using hardware with an MMU, you can remap your logical address to a different page. Linux can do this, but only for user memory.
replies(1): >>46185809 #
anonymousiam ◴[] No.46185809[source]
This assumes that the operating system can run. If the memory corruption impacts the OS, then it may be impossible to recover. As the systems (and software) have become more complex, keeping these Mission Assurance best practices becomes more important, but the modern generation of developers sometimes loses sight of this.

A good example of what I'm talking about is a program that I was peripherally involved with about 15 years ago. The lead wanted to abstract the mundane details from the users (on the ground), so they would just "register intent" with the spacecraft, and it would figure out how to do what was wanted. The lead also wanted to eliminate features such as "memory dump", which is critical to the anomaly resolution process. If I had been on that team, I would have raised hell, but I wasn't, and at the time, I needed that team lead as an ally.

replies(5): >>46186151 #>>46187307 #>>46187407 #>>46188670 #>>46193150 #
1. 5d41402abc4b ◴[] No.46188670[source]
>This assumes that the operating system can run.

You could have two copies of the OS mapped to different memory regions. The CPU would boot with the first copy, if it fails watchdog would trigger and the CPU could try to boot the second copy.