NtDoom running inside the Windows kernel.

  • M_Djallo@feddit.it
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    I’m ignorant, but what does this means? I mean, what’s the difference running it “in the kernel” and running it normally on windows?

    • LedgeDrop@lemm.ee
      link
      fedilink
      arrow-up
      24
      ·
      1 year ago

      Windows (and most other operating systems) have a “user land” and a “kernel space”.

      “user land” is where all your applications run. A “user land” application can only see other applications and files owned by the same user. Eventually, a user land app will want to do “something”. This can be something like read a file from disk, make a network connection, draw a picture on the screen. To accomplish this, the user space app need to “talk” to the kernel.

      If user space apps were instruments being played in an orchestra, the kernel would be the conductor. The kernel is responsible for making sure the user land apps can only see their respective users files/apps/etc.

      The kernel “can see and do everything”, it reports to no one. It has complete access to all the applications and every file. Your device drivers for your printer, video card, ect all run in “kernel space”.

      Basically, the OPs link: they’ve ported Doom to run effectively like a device driver. This means that if doom crashes, your PC will blue screen.

      This has no practical purpose, other than saying “yeah, we did it” :)

      • Technoguyfication@lemmy.ml
        link
        fedilink
        English
        arrow-up
        7
        ·
        1 year ago

        Print drivers in Windows have actually been in userspace for a while now. That’s why the cheap drivers that come with your $40 Inkjet from Walmart don’t cause bluescreens anymore.

      • darkmugglet@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        And that is the sheer absurdity: doom as a device driver. Sheer and unabashedly luncacy, because why the fuck not. I approve

    • Gradinko@kbin.social
      link
      fedilink
      arrow-up
      17
      ·
      1 year ago

      It means that all the code is running in privileged kernel mode instead of user mode. Kernel mode is usually reserved for the operating system and device drivers only. If code running in kernel mode has an unhandled exception or error, the entire system will crash. This creates the BSOD or “blue screen of death” on Windows.

      User mode is less privileged and where all your typical applications run. If something crashes in user mode, it only crashes that process, not the whole system.

      It’s a crazy thing that they did. Very impressive technically, but not really useful.

      • AnarchistArtificer@slrpnk.net
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        Very impressive technically, but not really useful.

        Those are my favourite kinds of shitposts. I find them legitimately beautiful

      • Big P@feddit.uk
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Forgive me if this is a stupid question but why is it technically impressive? Is it not just the same as running it in usermode but with higher privileges?

        • Barry Zuckerkorn@beehaw.org
          link
          fedilink
          arrow-up
          15
          ·
          1 year ago

          The API is much more limited for kernel mode, because Microsoft doesn’t want to make it easy to crash the kernel. So it’s not just a matter of taking old DOS code and making Windows run it in an old compatibility layer, but actually requires translating the whole thing into a much more limited set of commands to properly draw the graphics and respond to user input.

          It’s impressive like being able to play the French horn without using the valves, or painting beautiful pictures using only a mechanical typewriter. It’s being able to do something that is trivially easy with normal tools, but with such a limited toolset that the accomplishment itself is impressive.