![]() | |
Teachers Assignments Other Pages | Project 2: Assigned: Wed Mar 20 2024 In this project, you will implement a scheduler, which chooses the order jobs are going to run. Part 0, 0 points: I have written two classes that you'll need to use in this project: Part 1, 0 points: Create a new Java file, Part 2, 0 points: If you're not using a super fancy IDE and have to import packages yourself, you will almost certainly want both java.util.* and java.util.concurrent.*. You'll at least have to have java.util.concurrent.LinkedBlockingQueue. Part 3, 0 points: Your MyScheduler class will be tested in the following way: Part 4, 0 points: Add the constructor, Part 5, 0 points: Add a method, Part 6, 0 points: Add a method, Part 7, 25 points: Next you want to implement the Part 8, 0 points: To test your code, you should run it with my tester: Part 9, 50 points: I recommend working on the max wait setting first. (What scheduling algorithm is best for this?) Implement that algorithm and run the tests and try to score the maximum number of points. The testing code has brackets, each one worth a different number of points. The lower time intervals are worth more points. When you have the correct algorithm implemented, the tester should run pretty consistently with full points. Part 10, 50 points: The avg wait setting is probably the second-easiest version to get. The point brackets work similarly, though they are using much smaller values. Again, for this one, when you have the correct algorithm implemented, the tester should run pretty consistently with full points. Part 11, 50 points: I recommend doing the combined version next In this one, you'll need to find a balance between the maximum and average wait times. I tried out a bunch of different formulas and found one that had pretty good performance. This, however, is not nearly as consistent as the prior two. My version gets full points a bit more than 50% of the time. If you can reach close to that frequency, I'll be willing to run your code multiple times. It will be very helpful for you to let me know what score you're expecting. Part 12, 50 points: The deadlines setting is easily the hardest version. For me, this required some extra programming. (Remember that you do have to run all jobs to completion.) My version gets full points well above 50% of the time, but my utility is only in the mid-80%s, and I haven't found a fix for that. Again, I'm very willing to run your code multiple times when I'm grading. It will be helpful for me to know what to expect. Part 13, 0 points: This is a hard project. I am expecting that groups will have to meet with me to get some direction. Please come by my office and ask questions! Communicate early and often! You're going to want to strive for consistency, so test your code multiple times in each of the categories. Do not expect that it will always run perfectly. Don't treat your first trial run as the way it will always play out! I am willing to run your code multiple times and take the best score (overall, not for each part) but I'm not willing to run it incessantly because you had a good run once in a blue moon. If you get stuck and don't know how to improve your code, please come visit me! Submitting your Project: Upload your code to canvas. You should definitely upload your MyScheduler.java file, as well as any other files you used. If you get it up before the deadline and send me a message, I can run a test on my own computer. (There is no limit to the amount of times you can ask me to do this. The only barrier is how much time I actually have, so submit early and often.) Make sure the names of all group members are in the code header. |