From anna@cs.toronto.edu Sun Oct 29 12:34:33 2000 Date: 5 Oct 2000 16:01:04 GMT From: Anna Popivanova Newsgroups: ut.cdf.csc468h Subject: assignment 1 requirements ______________________________ Assignment 1 requirements General Requirements SUBMISSION Electronic Due by 12 noon on Thursday. Each problem has to be in its own directory containing source, class files and a README file. Paper due in the beginning of class on Thursday. Everything must be stapled together and contain your Name, student number, and assignment number on the front page. Use at least 10pt font when printing. Problems should be printed in order (1, then 2, then 3). Each problem has to contain source files and a README file. APPROXIMATE MARK DISTRIBUTION Correctness 60% Style and clarity 20% Documentation 20% Note: if your program does not compile/run/take right arguments, you get 0 for that problem STYLE Main requirement for style is that your code must be easily readable and understandable. You must do the following - the header of each file you submit must contain your name, student number, name of assignment - all classes, methods, and data members must have javadoc style brief comments - your code must be written according to OOP paradigm (not everything goes to main function) - use proper indentation and comment intricate blocks of code. DOCUMENTATION Provide a README file for each problem with your submission, in which you briefly (no more than 1/3-1/2 of a page) describe main points of your solution, and why your solution is deadlock and starvation free. OTHER Your programs must compile and run on JDK1.2 without modifications. Use proper Java synchronization tools ( synchronize, wait, notify, notifyAll ) Problem-Specific Requirements Main class names should be a1q All the average times assume uniform distribution. All times are in ms. All program parameters must be in the order specified below. Q1 Program parameters: -seed - random seed -simulation time - time (in ms) to run the simulation -total number of H atoms -total number of O atoms -average H ready time (all H atoms must be ready within time interval (0, 2*avg time)) -average O ready time (all O atoms must be ready within time interval (0, 2*avg time)) Thus a call to your program will look like this java a1q1 234245 5000 20 10 500 1000 Output should be in the following format: On atom submission to the pool (atom ready): atom [HO] entered pool on water generation: water H2O generated, H were in pool for .., .. ms, O was in pool for .. ms on end simulation end simulation Ready atoms are: Q2 Messages are integers 0,1,.. Slots are identified by integers 0, .., B-1 Program parameters: -seed - random seed -simulation time - time (in ms) to run the simulation -average message generation time (the next message must be ready within time interval (0, 2*avg time) after the previous) -average message request time(for each consumer, the next message must be requested within time interval (0, 2*avg time) after the previous request by the same consumer) -N -B Thus a call to your program will look like this java a1q2 234245 5000 50 10 5 10 Output should be in the following format: On message submission to the pool: message ready on slot assignment message assigned slot on message consumption message from slot consumed by consumer on end simulation end simulation available messages are: Q3 Messages are integers 0,1, .. Slots are identified by integers 0, .. , B-1 Program parameters: -seed - random seed -simulation time - time (in ms) to run the simulation -average message generation time (the next message must be generated within time interval (0, 2*avg time) after the previous) -average message request time(the next message must be requested within time interval (0, 2*avg time) after the previous) -B Thus a call to your program will look like this java a1q2 234245 5000 50 10 10 Output should be in the following format: On message submission to the pool: message ready on slot assignment message assigned slot on message consumption message from slot consumed on end simulation end simulation available messages are: --------------------------