0

So basically this might be a dumb question but how does hardware (cpu or related) protect virtual data even though all the cpu or any other hardware is doing is sending electricity around, it wouldn't make alot of sense for hardware to allow anything virtual allocated to be protected since of course its just electrical current. If it is actually possible for hardware to provide software/memory protection then how does it do it?

bruh_wym
  • 27
  • 5
  • The HW gives the OS the *ability* to protect itself. There isn't hard-wired protection for certain address ranges, just hard-wired checking of a permission bit in a page-table entry (and the TLB that caches it). – Peter Cordes May 05 '22 at 15:22
  • @PeterCordes how would the permission bit provide protection? – bruh_wym May 05 '22 at 15:37
  • Read the linked duplicates. See the top of this page. It's a bit like parental controls: user-space runs without access to the memory that contains the controls (assuming the OS didn't give user-space access to that memory), so it can't break out of its sandbox. – Peter Cordes May 05 '22 at 15:39

0 Answers0