X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fthreads%2Fmlfqs-load-avg.c;h=50e83e276406714b03ab8d199a16259ee574ffbf;hb=f4651c01a134759e3dc904960f96d568e6855a4f;hp=1462a80eb3c9594d269f239e8e46f18d24281aaf;hpb=94ef10ad53439c273d7c1e7397223c1cbd41f1f1;p=pintos-anon diff --git a/src/tests/threads/mlfqs-load-avg.c b/src/tests/threads/mlfqs-load-avg.c index 1462a80..50e83e2 100644 --- a/src/tests/threads/mlfqs-load-avg.c +++ b/src/tests/threads/mlfqs-load-avg.c @@ -4,7 +4,17 @@ seconds, starting 10 seconds in, the main thread prints the load average. - The expected output is this (some margin of error is allowed): + The expected output is listed below. Some margin of error is + allowed. + + If your implementation fails this test but passes most other + tests, then consider whether you are doing too much work in + the timer interrupt. If the timer interrupt handler takes too + long, then the test's main thread will not have enough time to + do its own work (printing a message) and go back to sleep + before the next tick arrives. Then the main thread will be + ready, instead of sleeping, when the tick arrives, + artificially driving up the load average. After 0 seconds, load average=0.00. After 2 seconds, load average=0.05. @@ -117,7 +127,7 @@ test_mlfqs_load_avg (void) { int i; - ASSERT (enable_mlfqs); + ASSERT (thread_mlfqs); start_time = timer_ticks (); msg ("Starting %d load threads...", THREAD_CNT);