Dude, first off, why are you obsessed with "direct access to RAM?"
Second, if you want to know exactly how memory protection is implemented in a modern OS, you can see for yourself. The kernel sources for Linux, *BSD, Darwin/Xnu, Plan 9 and more are all open source. There are also open source...