• piyuv@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    ·
    1 day ago

    I’m not very good with C/C++ so please correct me, isn’t that what’s called a “race condition”? Parallelism can cause non-determinism but not in the same sense LLMs generate non-deterministic output. Compilers are not statistical machines.

    • ryannathans@aussie.zone
      link
      fedilink
      English
      arrow-up
      16
      arrow-down
      1
      ·
      1 day ago

      You don’t need parallelism to have a race condition, just not handling an event with expected timing can cause one - like when two keys are pressed within one polling cycle and you depend on one being pressed before the other for some logic like up and right arrow for a diagonal but they register as right and up so the diagonal movement doesn’t trigger

      Compiler optimisation strategies sometimes use statistical machines and link time optimisation does use random number generators for producing output

    • Natanael@infosec.pub
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      16 hours ago

      You can have single threaded race conditions appear simply from inputs appearing in an unintended ordering. Or on a single core CPU, you can have one task meant to be done first take unusually long time, so the CPU gives time to another thread which finishes first but expected to finish last.

    • wonderingwanderer@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      1
      ·
      20 hours ago

      From my understanding, which is very limited, race conditions are more an issue with concurrent programming. Parallel computing uses separate processor cores for each task so there’s less reliance on stack machines. But I guess each core still shares the memory, so maybe it still happens. Like I said, my understanding is limited. Just use rust.