From: Ben Pfaff Date: Sat, 8 Nov 2008 01:12:23 +0000 (-0800) Subject: Add FAQ item to explain doubled test names in output. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c10a827e76ae4a4723624e394f996569041a76e0;p=pintos-anon Add FAQ item to explain doubled test names in output. Suggested by Godmar. --- diff --git a/doc/threads.texi b/doc/threads.texi index 377343d..8dad172 100644 --- a/doc/threads.texi +++ b/doc/threads.texi @@ -770,6 +770,28 @@ becomes the higher of the newly set priority or the highest donated priority. When the donations are released, the thread's priority becomes the one set through the function call. This behavior is checked by the @code{priority-donate-lower} test. + +@item Doubled test names in output make them fail. + +Suppose you are seeing output in which some test names are doubled, +like this: + +@example +(alarm-priority) begin +(alarm-priority) (alarm-priority) Thread priority 30 woke up. +Thread priority 29 woke up. +(alarm-priority) Thread priority 28 woke up. +@end example + +What is happening is that output from two threads is being +interleaved. That is, one thread is printing @code{"(alarm-priority) +Thread priority 29 woke up.\n"} and another thread is printing +@code{"(alarm-priority) Thread priority 30 woke up.\n"}, but the first +thread is being interrupted by the second in the middle of its output. + +This problem indicates a bug in your priority scheduler. After all, a +thread with priority 29 should not be able to run while a thread with +priority 30 has work to do. @end table @node Advanced Scheduler FAQ