Here's the bytecode for the Autograder (AutoGrader.class) . You should put it in nachos/proj1/nachos/ag.
Here are the instructions on how to use it. NOTE: this should NOT be your only test for your code.
To invoke the autograder to test your code, do:
java nachos.machine.Machine -- nachos.ag.ThreadGraderX -# <arguments>
where X is 1, 2, 3, 4, or 8.
For example, you would invoked ThreadGrader8 as follows:
java nachos.machine.Machine -- nachos.ag.ThreadGrader8 -# numHElement=4,numOElement=2
(1) ThreadGrader1.class
test for Condition2.
Arguments:
goal - the number of integers to pass through the bounded buffer.
numThreads - the number of producer threads, and the number of consumer threads.
(2) ThreadGrader2.class
test for Communicator.
Arguments:
goal - the number of integers to pass through the communicator.
numThreads - the number of speaking threads, and the number of listening threads.
(3) ThreadGrader3.class
test for KThread.join().
Arguments:
joinAfterFinish - a boolean indicating whether to wait for the thread to finish
before calling join().
(4) ThreadGrader4.class
test for Alarm.waitUntil().
Arguments:
numThreads - the number of threads to call waitUntil().
requireImmedaite - a boolean specifying whether to require the threads to wake
up exactly on time.
(8) ThreadGrader8.class
test for problem #5, the reaction of water.
numHElement---Number of Element H;
numOElement---Number of Element O;