Add explanatory comments to threads tests.
[pintos-anon] / src / tests / threads / priority-donate-nest.c
index a7b919c90b276cf049bdab81598687e40a11f4e6..1f245847698c3bc8254fe7d3726b9ff8530970a5 100644 (file)
@@ -1,5 +1,9 @@
-/* Problem 1-3: Priority Scheduling tests.
-
+/* Low-priority main thread L acquires lock A.  Medium-priority
+   thread M then acquires lock B then blocks on acquiring lock A.
+   High-priority thread H then blocks on acquiring lock B.  Thus,
+   thread H donates its priority to M, which in turn donates it
+   to thread L.
+   
    Based on a test originally submitted for Stanford's CS 140 in
    winter 1999 by Matt Franklin <startled@leland.stanford.edu>,
    Greg Hutchins <gmh@leland.stanford.edu>, Yu Ping Hu