Add answers for lab3 part A
This commit is contained in:
parent
d943a2be37
commit
5e04fb305e
12
answers-lab3.txt
Normal file
12
answers-lab3.txt
Normal file
@ -0,0 +1,12 @@
|
||||
1. Some interrupts receive a different "shape" of stack frame - the kernel pushes
|
||||
an error code for some, but not for the others. We thus need individual handlers
|
||||
that would make sure that what we have on the stack is consistent, and
|
||||
then call one centralized function for that. The handlers additionally
|
||||
are able to pass in a trap number to that centrallized function. This way, a lot
|
||||
of code can be re-used.
|
||||
|
||||
Conceptually, each trap has a different semantic meaning. Thus, it makes no sense
|
||||
to perform the same action for both traps - they don't mean the same thing.
|
||||
|
||||
2. The general protection fault occurs when a process can access memory, but not do something else with it. We do not want page faults to be trigger-able by users (this is the case for many other traps). Thus, when the user tries to invoke int 14,
|
||||
it's not allowed to execute it from userspace, so it is thrown a general protection fault, which it then prints.
|
Loading…
Reference in New Issue
Block a user