Three Different Faults

A hardware-managed TLB walks the page table and finds these entries. All three accesses miss the TLB.

VPN valid present protection
0x1 1 1 read only
0x2 1 0 read/write
0x3 0 - -
  1. a store into a byte on VPN 0x1
  2. a load from a byte on VPN 0x2
  3. a load from a byte on VPN 0x3

Which exception does each raise?

A

All three are page faults: the fault handler decides afterwards which one it was

B

1 protection fault, 2 page fault, 3 segmentation fault

C

1 protection fault, 2 segmentation fault, 3 page fault

D

1 page fault, 2 page fault, 3 segmentation fault