Hacker News new | ask | show | jobs
by jacurtis 880 days ago
I'm not sure that abstraction is even in the OS. I think its on the memory controller itself. The OS reads from the memory controller.
1 comments

I'm pretty sure it's more of a cooperative arrangement; the OS writes the configuration that the MMU uses, thereby imposing its rules on programs.
The OS controls the MMU.
I mean, sure, that's also a valid description. If we're to be precise, at least on x86 the OS sets up a global descriptor table[0] and then uses the LGDT instruction to tell the CPU to use it[1], and LGDT is a privileged instruction so only the OS (kernel) can do that.

[0] https://wiki.osdev.org/Global_Descriptor_Table

[1] https://wiki.osdev.org/GDT_Tutorial#Telling_the_CPU_Where_th...