there's no guarantee that the CPU isn't running in real mode |
True; but if the CPU were running in real mode then you'd have to deal with that yourself.
[there's no guarantee] that the OS will act on the exception and do something |
Well it's pretty much impossible to get to user mode without an IDT; so I find it hard to believe that the OS wouldn't have a handler registered for int 13... If you didn't have an IDT and you ran a usermode program you wouldn't be able to get back to ring 0, so you'd have a pretty worthless OS. At any rate, I said "probably" kills your process, so it doesn't matter.
Also, if you DID cause int 0x0D and the OS had no handler for that interrupt, then that would cause a double fault. If the OS had no general protection fault handler, then it probably wouldn't have a double fault handler, either. The CPU would then fault trying to find the double fault handler, and that would cause a triple fault. So then the CPU would SHUTDOWN and the motherboard would probably reset the computer.
Second, there's no guarantee what type of CPU it is (x86? ARM? SPARC? Software?). |
x86 was assumed because that's what the vast majority of computer users have. Besides that, I'm fairly sure ARM, SPARC and PPC use interrupts (or something similar) as well. I don't see how a CPU could operate without them.
Third, what the CPU does is ultimately irrelevant to the discussion. We're working one level above it. |
You asked what would happen if you tried to access *p "no matter what" p was pointing to.