I’ve seen people talking about it and experienced it myself with a server, but why does Linux run so well on ARM (especially compared to Windows)?

  • h3ndrik@feddit.de
    link
    fedilink
    arrow-up
    119
    arrow-down
    3
    ·
    1 year ago

    I don’t think it’s just Linux. I’ve been told MacOS also works very well on ARM. Maybe it’s just Microsoft doing a bad job.

      • Bluefruit@lemmy.world
        link
        fedilink
        arrow-up
        57
        arrow-down
        4
        ·
        1 year ago

        I don’t believe it.

        You mean to tell me that Microsoft is doing a bad job with thier OS???

        Preposterous. These 100 or so processes that its running to track my every breath are incredibly important to make sure im given the best ad experience.

    • Semi-Hemi-Demigod@kbin.social
      link
      fedilink
      arrow-up
      37
      arrow-down
      1
      ·
      edit-2
      1 year ago

      Mac OS was running on RISC processors back in the 90s, and Steve Jobs used them in his NeXT computers which used a variation of BSD, which was the basis for OS X which could run on PowerPC.

      Apple’s had a ton of experience with RISC so it makes sense they’d do it well.

      • .:\dGh/:.@lemmy.ml
        link
        fedilink
        arrow-up
        7
        ·
        1 year ago

        It’s mainly due to PA Semi acquisition. These guys were the ones responsible of making excellent PowerPC processors, which were similar to what ARM has now.

        These guys are probably happier now that they have more resources, target devices and tightly coupled software.

      • LeFantome@programming.dev
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        1 year ago

        NeXT computers were based on Motorola 680x0 processors that were actually CISC ( not RISC ). Steve Jobs did run MacOS on RISC in the 90s though as that is what PowerPC was.

        Modern Apple silicon is of course ARM64 so not the same architecture as PowerPC at all.

        • Bene7rddso@feddit.de
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          NeXTStep ran on multiple architectures, some oft them RISC. They did some work on a PPC build too

    • Xusontha@ls.buckodr.inkOP
      link
      fedilink
      arrow-up
      15
      arrow-down
      4
      ·
      edit-2
      1 year ago

      Well MacOS is because of a controlled ecosystem/hardware and a really good emulator, but IDK about Linux

      Also yes Windows on ARM is a steaming pile of garbage

      • h3ndrik@feddit.de
        link
        fedilink
        arrow-up
        13
        ·
        1 year ago

        Yeah. Linux is also optimized to run well. Has a capable community and a few good design choices. Many people use it to run it on servers so I wouldn’t be surprised if it performed well well on servers.

        Also there is a well known fork that is used on millions/billions(?) of ARM phones. So it’d better be a good choice for that use case.

      • pivot_root@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        1 year ago

        Microsoft absolutely could have made something comparable to Rosetta 2 for userspace if they were competent.

        Rosetta 2 isn’t an emulator, but a binary recompiler. It takes amd64 instructions, decodes them, and generates equivalent aarch64 instructions. The aarch64 instructions are then executed directly by the processor, performing the same tasks that the original binary would do on an Intel processor.

        It’s extremely difficult to do properly, but it’s nothing inherently special to MacOS or Apple’s ARM chips. ARMv8 has an attribute to enable strongly-ordered memory accesses, and it also supports native 4 KiB page sizes. Beyond those two solved concerns, there isn’t any actual hardware barrier preventing binary translation. Individual amd64 instructions can be translated into one or more equivalent aarach64 instructions, and complex instructions or those using large registers like those in AVX-512 can be shimmed and implemented in software. An offset table can be used to deal with indirect jumps, and direct jumps can just be rewritten in the generated code. And as Apple has proven, it’s even possible to support JIT-compiled code by intercepting jumps into executable pages and recompiling them before executing.

        It’s expensive in terms of time and engineering skills, but Microsoft had more than enough control over their own proprietary kernel to build something similar into Windows back when they first released it for ARM.

      • Free Palestine 🇵🇸@sh.itjust.works
        link
        fedilink
        arrow-up
        6
        arrow-down
        3
        ·
        1 year ago

        Also yes Windows on ARM is a steaming pile of garbage

        Not just on ARM. Windows is and will always be a proprietary steaming pile of shit, no matter what architecture. That will be the case as long as Microsoft develops it.

    • thelastknowngod@lemm.ee
      link
      fedilink
      arrow-up
      6
      ·
      1 year ago

      I have an M1 mbp for work and its honestly unbelievable. It’s one of the nicest machines I’ve owned in years. The chip is a huge part of it.