Peer review
Hi!
Lab looks good overall, nice tests! However, we seem to think of blocking time in different ways. From my understanding, a task can be blocked even if it holds no resources, as long as a task of lower priority shares a resource with a task of a higher priority. Consider the case where
T1 has prio 1, holds R1 for 5 T2 has prio 2, holds no resources T3 has prio 3, holds R1 for 10 T4 has prio 4, holds no resources
While T1 is holding R1, it's priority is temporarily changed to the priority ceiling of R1(in this case 3). Otherwise, if we allow T2 to run while T1 is holding R1, and T3 tries to preempt, it would have to wait, which is priority inversion! The time period for which T1 takes priority over T2 is T2's blocking time, from my understanding. Here i would expect it to be 5, but when running the test on your code it returns 0.
On another note, it seems you forgot to implement the recurrence relation version of task preemption.
Let me know if you disagree on the first point, i'm always down to discuss!
