Required reading: Chapter 8 of Lion's
| pc (=670)| | r5 (=0) | <- r5 (=usize+64. - 2) | r4 | | r3 | | r2 | <- sp | pc (=1627)| | r5 (=usize+64. -2) | <- r5 | r4 | | r3 | | r2 | <- sp
| pc (=670)| | r5 (=0) | <- r5 (=usize+64. - 2) | r4 | | r3 | | r2 | <- sp | pc (=1638)| | r5 (=usize+64. -2) | <- r5 | r4 | | r3 | | r2 | | pc (=1969)| | r5 (=prev r5) | <- r5 | r4 | | r3 | | r2 | | pc (=2094)| | r5 (=prev r5) | <- r5 | r4 | | r3 | | r2 | <- sp
| pc (=670)| | r5 (=0) | <- r5 (=usize+64. - 2) | r4 | | r3 | | r2 | <- sp | pc (=1627)| | r5 (=usize+64. -2) | <- r5 | r4 | | r3 | | r2 | <- sp
Second, to ensure that certain pieces of kernel code cannot be interrupted, the kernel raises priority of the processor before entering that code and lowwering it when leaving that piece of code. For example, the clock is at interrupt 6; by raising the the priority to 6 after a clock interrupt, no handlers at lower or equal level can interrupt the processor; thus, the clock handler cannot be interrupted until the handler lowers the priority below 6. (Why is the clock at a high interrupt?)
An alternative strategy is to disable interrupts in the kernel (except for clock), as you will do in the lab. What is the advantage of this approach? What is the disadvantage?