Shamelessly stolen from you know where

  • Buddahriffic@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    3 days ago

    What you said is accurate but it implied systems with an OS don’t run machine code directly. They still do, just the CPU has ways of automatically interacting with the OS when it needs to (and those features are enabled), mostly via interrupt handlers. Things like address translation happens transparently, either via a lookup table for recently used addresses or the CPU will throw a TLB miss interrupt if it’s not ready to go and needs the OS to give it a mapping (or maybe even load the page from disk before it can proceed).

    CPU architecture is pretty interesting and doesn’t require programs run through a translation layer like Java, Python, or JavaScript. The translation layers themselves are programs running as machine code at the user level.

    Edit: I see now that you meant the directly as in the microcontroller runs the ARM uarch. I’ll leave this up in case anyone reads it like I did initially, but sorry for the misunderstanding on my end.