ICS 143 Principles of Operating Systems Discussion Section Week 6
Today Announcements Programming Assignment Mid-term Solutions 11/16/2018
Announcements Programming Assignment Homework #3: Out now on class website (Homework page) Due Wed, 10 June 2015, 11:55pm via EEE Dropbox Homework #3: (delayed) Out early next week 11/16/2018
Programming Assignment Follow project description on class website (Homework page): www.ics.uci.edu/~ics143/homework_files/programming_assignment.pdf Individual submission – everyone gets to code! It’s ok to discuss ideas, but everyone must submit their own code Goal is to implement different schedulers: First-Come, First-Served (FCFS) Shortest Remaining Time First (SRTF) Aka preemptive Shortest Job First (SJF) Extra credit: Proportional Share (PS) Pre-allocates certain amount of CPU time to each process Every job has a weight, and jobs receive a share proportional to the weight 11/16/2018
Programming Assignment (2) www.github.com/ekinoguz/ProcessSchedulers 11/16/2018
Programming Assignment (3) www.github.com/ekinoguz/ProcessSchedulers Scheduler.java: Abstract interface each scheduler has to follow FCFSScheduler.java: Skeleton class to implement FCFS scheduling SRTFScheduler.java: Skeleton class to implement SRTF scheduling PSScheduler.java: Skeleton class to implement PS scheduling Makefile: Instructions to compile your source code (Linux) Tester.java: Class used to test your code 11/16/2018
Programming Assignment (4) FCFSScheduler::schedule: Parse input file (file name given as inputFile string) Schedule jobs Write output file (file name given as outputFile string) /** * First-come-first-serve scheduler. */ public class FCFSScheduler implements Scheduler { @Override public void schedule(String inputFile, String outputFile) { // implement your scheduler here. // write the scheduler output to {@code outputFile} } 11/16/2018
Programming Assignment (5) Input: text file One incoming process per line <process-id> <arrival-time> <burst-time> <share> Output: text file One scheduled process per line <process-id> <finish-time> <wait-time> <turnaround-time> Last line: <average-wait-time> <average-turnaround-time> Submission: .zip package via EEE DropBox 11/16/2018
Programming Assignment (6) Black-box testing via grade.sh on Linux machine: Public tests and expected output provided Will test on public / private tests to make sure your code works Grading FCFS: 30 points SRTF: 50 points 1-Page Report: 20 points + 5 bonus points (PS) (Extra) PS: + 25 bonus points 11/16/2018
Programming Assignment (7) Black-box testing via grade.sh on Linux machine: Your responsibility to make sure that your code compiles and runs in Linux If you want, you can simulate our exact grading procedure: Get the exact same software environment: Download and install VirtualBox 4.3.26 for Linux Download and install Ubuntu 12.04.5 LTS inside VirtualBox Download and install openjdk-7-jdk Run the exact same script: Execute grade.sh Verify output and grade (Detailed instructions in programming_assignment.pdf) 11/16/2018
Programming Assignment (8) www.github.com/ekinoguz/ProcessSchedulers Opportunity to learn how to use git / GitHub: Instead of downloading .zip, fork the repo! Create your own branches, have a local/remote copy of your code progress You can contribute your own public tests: Fork & clone the repo Add some public tests Send a pull request 11/16/2018