19
for class on
Monday
Dec. 7, 2009
Please re-read Section 4.9 of the text, and read pages B-33 through B-38.
Please turn in written responses to these questions:
1. If an instruction causes a non-fatal exception like a TLB miss, why not finish the instruction inside the miss handler and then resume execution at the instruction immediately following the exception-causing one? Good idea or bad, and why?
2. The x86 architecture includes instructions for moving potentially very large strings. These instructions may cause a TLB miss or a page fault in the middle of the string. If this happens, can the instruction be restarted? Why or why not, and if not, what should happen instead?
Then, be prepared to discuss the following in class:
3. The MIPS subset we've been studying can cause only a small number of exceptions: integer overflow and undefined instruction appeared in chapter 4, TLB miss and page fault in chapter 5. In the full architecture--like any other--there are a lot more:
Exceptions can usefully be classified in a number of ways, which we will discuss. Here are some: Did the program cause the exception (and hence "deserve" the consequences), or did it happen for a reason outside the program? In the former case, can the exception-causing instruction be allowed to finish? Should the program or process be resumed or should it be terminated? And what, if anything, should be done about the exception, perhaps partly by the operating system? Please think about, and be prepared to discuss, how the exceptions from the above list (and any others you care to bring up) yield different answers to these classification questions.