1. 20
  1. 18

    From the article:

    Your options are to increase the number of bits used, which puts off the overflow, or you could work with infinite precision arithmetic, which would slowly use up the available memory and finally bring the system down.

    In this case, increasing the number of bits used is clearly a suitable resolution. At 64 bits, the overflow would occur at 2^63 100ths of a second, i.e. after 2924712086 years. I’m quietly confident that this is sufficient.

    1. 8

      Alternatively initialise your counters near the overflow:

      https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/jiffies.h#n170 (INITIAL_JIFFIES)

      1. 3

        Additionally, most of them use PowerPC-based boards with chips from Freescale Semiconductor. They’ve had 64-bit chips like QorIQ available for a while now.

      2. 3

        This post mentions the DIODE (Directed Integer Overflow Discovery Engine) which is covered in this paper: Targeted Automatic Integer Overflow Discovery Using Goal-Directed Conditional Branch Enforcement from MIT CSAIL lab.

        1. 3

          I have to wonder if keeping the airplane, or avionics suite, running continuously for 248 days is even realistic in the first place.

          1. 3

            While it doesn’t specify the reasons it seems they need/ed rebooting < every 22 days https://www.seattletimes.com/business/boeing-aerospace/faa-orders-787-safety-fix-reboot-power-once-in-a-while/

            1. 2

              Yeah, I mean, this is a tradeoff, but you’re not going to run an airliner that long without maintenance, anyway. It’s still ugly, though.

              1. 2

                NonStop Systems run continuously for years as their parts are replaced. VMS clusters did same on server hardware. Record was 17 years at a railroad company. There’s embedded CPU’s with lock-step support, too. Erlang has also been used in five 9’s systems.

                I’m sure airplane computers could use those proven concepts to hit five or more 9’s. The airplanes themselves still have to go down for maintenance, though.