Interesting take on comparability vs performance. I gotta imaging capturing user data and sending to a cloud collector is also a big culprit.

  • smoll_pp_operator@vlemmy.net
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    So what I want to know is why do we still have programs that run on a single core when nearly every Windows PC out there is running a multi-core processor?

    What are we missing to have the OS adapt any program to take advantage of the hardware?

    • CoderKat@lemm.ee
      link
      fedilink
      English
      arrow-up
      19
      ·
      1 year ago

      You can’t automatically adapt that. Multi thread safe programming takes extra work (or certain languages or frameworks that are able to optimize this). And even then, not all types of tasks make sense to multithread.

      The OS still does take advantage of multiple cores, though. You never have just one process running. The OS will schedule different processes on different cores.

    • Giooschi@lemmy.world
      link
      fedilink
      English
      arrow-up
      19
      ·
      1 year ago

      To run something on multiple cores you need to detect a bunch of different tasks it is doing that don’t depend on one another. Then you can execute each task in its own thread. The problem is that most often these different task don’t exist, or, if they do, figuring them out automatically by the code is likely equivalent to solving the halting problem, that is it’s undecidable and there can’t exist a program that does this.

    • Thassar@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Multi-threaded programming is hard. You can’t just write some code and expect it to work across 4 cores, you need to know what to parallelise and how to do it. If you think normal bugs are hard to fix, just wait until you have a calculation that gives a different answer each time you run it thanks to race conditions.