After successfully completing the exercise, you will see the following results:
The behavior seen in cases 1, 2 and 3 occurs because the 80386 processor does not distinguish between READ and EXECUTE access. Furthermore, READ or EXECUTE access is allowed even for memory objects specified with WRITE access. This is because WRITE access implies both READ and EXECUTE access. However, WRITE access must be specified in order for the application to write into a memory object.
In case 4, because the guard page bit is set, a guard page fault will always occur when accessing the page. You also should have seen a second message, "Exception occurred handling a prior exception ". This occurs when the default guard page exception handler is invoked and tries to treat the area as a stack.
In case 5, because the memory allocated was not committed, no physical space was reserved. Whenever accessing any of this memory a general protection exception is always raised.