Peer-review
-
The Repo follows the original lab, and the code passes the pipeline and outputs the correct sequence.
-
Only
$k0
and$k1
are used freely by the kernel, while preserving the rest.
- li $t2, 0x7fffffff
- add $t2, $t2, $t2 # triggers overflow
-
With this inside proc1, the program will stop printing and spin in kernel_loop as soon as proc1 runs. Non-SYSCALL exceptions branch you into kernel_loop, which is an infinite spin and thereby correct.
-
The timer-driven output keeps occurring after each SYSCALL → interrupts are still enabled in user mode.
-
You have a well commented code that is super easy to follow and solves the task in a smart way!