X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fthreads%2Fmlfqs-fair.c;h=30282c36e32d15b0da44d074aa99093c69d3815c;hb=606adbdcd2294fa780081cf2c88ff949d7cca152;hp=fd8ab86369c497038af4553034a24134ff900db6;hpb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;p=pintos-anon diff --git a/src/tests/threads/mlfqs-fair.c b/src/tests/threads/mlfqs-fair.c index fd8ab86..30282c3 100644 --- a/src/tests/threads/mlfqs-fair.c +++ b/src/tests/threads/mlfqs-fair.c @@ -1,3 +1,19 @@ +/* Measures the correctness of the "nice" implementation. + + The "fair" tests run either 2 or 20 threads all niced to 0. + The threads should all receive approximately the same number + of ticks. + + The mlfqs-nice-2 test runs 2 threads, one with nice 0, the + other with nice 5, which should receive 1,904 and 1,096 ticks, + respectively, over 30 seconds. + + The mlfqs-nice-10 test runs 10 threads with nice 0 through 9. + They should receive 672, 588, 492, 408, 316, 232, 152, 92, 40, + and 8 ticks, respectively, over 30 seconds. + + (The above are computed via simulation in mlfqs.pm.) */ + #include #include #include "tests/threads/tests.h"