From: <mar...@us...> - 2009-05-21 02:20:10
|
Revision: 266 http://gridsim.svn.sourceforge.net/gridsim/?rev=266&view=rev Author: marcos_dias Date: 2009-05-21 01:59:34 +0000 (Thu, 21 May 2009) Log Message: ----------- Changes in the java documentation of some classes. Modified Paths: -------------- trunk/source/gridsim/parallel/ResourceDynamics.java trunk/source/gridsim/parallel/SSGridlet.java trunk/source/gridsim/parallel/gui/ParallelVisualizer.java trunk/source/gridsim/parallel/gui/VisualizerAdaptor.java trunk/source/gridsim/parallel/scheduler/ARConservativeBackfill.java trunk/source/gridsim/parallel/scheduler/AggressiveBackfill.java trunk/source/gridsim/parallel/scheduler/AggressiveMultiPartitions.java trunk/source/gridsim/parallel/scheduler/ConservativeBackfill.java trunk/source/gridsim/parallel/scheduler/RuntimePredicate.java trunk/source/gridsim/parallel/util/Workload.java trunk/source/gridsim/parallel/util/WorkloadFileReader.java trunk/source/gridsim/parallel/util/WorkloadJob.java trunk/source/gridsim/parallel/util/WorkloadLublin99.java Modified: trunk/source/gridsim/parallel/ResourceDynamics.java =================================================================== --- trunk/source/gridsim/parallel/ResourceDynamics.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/ResourceDynamics.java 2009-05-21 01:59:34 UTC (rev 266) @@ -196,7 +196,7 @@ } /** - * Sets the particular PE status on a Machine + * Sets the particular PE status on a Machine<br> * <b>NOTE:</b> Not supported. * @param status PE status, either <code>PE.FREE</code> or <code>PE.BUSY</code> * @param machineID Machine ID Modified: trunk/source/gridsim/parallel/SSGridlet.java =================================================================== --- trunk/source/gridsim/parallel/SSGridlet.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/SSGridlet.java 2009-05-21 01:59:34 UTC (rev 266) @@ -138,8 +138,8 @@ /** * Checks whether this Gridlet is submitted by reserving or not. - * @return <tt>true</tt> if this Gridlet has reserved before, - * <tt>false</tt> otherwise + * @return <code>true</code> if this Gridlet has reserved before, + * <code>false</code> otherwise * @pre $none * @post $none */ @@ -149,7 +149,7 @@ /** * Checks if this object is an advance reservation or not - * @return <tt>false</tt> indicating that it is not + * @return <code>false</code> indicating that it is not */ public boolean isAdvanceReservation() { return false; @@ -198,7 +198,7 @@ /** * Sets the Gridlet status. * @param status the Gridlet status - * @return <tt>true</tt> if the new status has been set, <tt>false</tt> + * @return <code>true</code> if the new status has been set, <code>false</code> * otherwise * @pre status >= 0 * @post $none @@ -284,7 +284,7 @@ /** * Gets the id of the partition or queue to which this * gridlet was scheduled - * @return the partition id or <tt>-1</tt> if not found + * @return the partition id or <code>-1</code> if not found */ public int getPartitionID() { return partition; @@ -294,7 +294,7 @@ * Sets the id of the partition or queue to which this * gridlet was scheduled * @param partition the partition id - * @return <tt>true</tt> if set correctly or <tt>false</tt> otherwise. + * @return <code>true</code> if set correctly or <code>false</code> otherwise. */ public boolean setPartitionID(int partition) { if(partition < 0) { @@ -307,7 +307,7 @@ /** * Gets the priority of this gridlet assigned by the scheduler - * @return the priority or <tt>-1</tt> if not found + * @return the priority or <code>-1</code> if not found */ public int getPriority() { return priority; @@ -316,7 +316,7 @@ /** * Sets the priority of this gridlet assigned by the scheduler * @param priority the priority - * @return <tt>true</tt> if set correctly or <tt>false</tt> otherwise. + * @return <code>true</code> if set correctly or <code>false</code> otherwise. */ public boolean setPriority(int priority) { if(priority < 0) { @@ -397,7 +397,7 @@ /** * Gets the submission or arrival time of this Gridlet from * the latest GridResource - * @return the submission time or <tt>0.0</tt> if none + * @return the submission time or <code>0.0</code> if none */ public double getSubmissionTime() { return gridlet.getSubmissionTime(); @@ -436,7 +436,7 @@ /** * Gets the Gridlet's finish time - * @return finish time of a gridlet or <tt>-1.0</tt> if + * @return finish time of a gridlet or <code>-1.0</code> if * it cannot finish in this hourly slot */ public double getActualFinishTime() { Modified: trunk/source/gridsim/parallel/gui/ParallelVisualizer.java =================================================================== --- trunk/source/gridsim/parallel/gui/ParallelVisualizer.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/gui/ParallelVisualizer.java 2009-05-21 01:59:34 UTC (rev 266) @@ -239,7 +239,8 @@ } /** - * Handles the events generated by this frame + * Handles the events generated by this frame + * @param e the action event */ public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); Modified: trunk/source/gridsim/parallel/gui/VisualizerAdaptor.java =================================================================== --- trunk/source/gridsim/parallel/gui/VisualizerAdaptor.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/gui/VisualizerAdaptor.java 2009-05-21 01:59:34 UTC (rev 266) @@ -22,33 +22,53 @@ */ public class VisualizerAdaptor implements Visualizer { - /** - * @see Visualizer#notifyListeners(int, ActionType, boolean, LinkedList) - */ + /** + * Notifies the listener about the action performed<br> + * <b>NOTE:</b> As this class is an adaptor, this method is empty. + * @param subjectId the subject, or entity, that created the action + * @param actionType the action performed + * @param pause whether the simulation should be paused + * @param itemList the list of schedule items to provide to the listeners + * @see ActionType + */ public void notifyListeners(int subjectId, ActionType actionType, boolean pause, LinkedList<ScheduleItem> itemList) { } - /** - * @see Visualizer#notifyListeners(int, ActionType, boolean, ScheduleItem) - */ + /** + * Notifies the listeners about the action performed<br> + * <b>NOTE:</b> As this class is an adaptor, this method is empty. + * @param subjectId the subject, or entity, that created the action + * @param actionType the action performed + * @param pause whether the simulation should be paused + * @param item the schedule item to provide to the listeners + * @see ActionType + */ public void notifyListeners(int subjectId, ActionType actionType, boolean pause, ScheduleItem item) { } - /** - * @see Visualizer#notifyListeners(int, ActionType, boolean) - */ + /** + * Notifies the listeners about the action performed<br> + * <b>NOTE:</b> As this class is an adaptor, this method is empty. + * @param subjectId the subject, or entity, that created the action + * @param actionType the action performed + * @param pause whether the simulation should be paused + * @see ActionType + */ public void notifyListeners(int subjectId, ActionType actionType, - boolean shouldPause) { + boolean pause) { } - /** - * @see Visualizer#notifyListeners(AllocationAction) - */ + /** + * Notifies a listener about the action performed<br> + * <b>NOTE:</b> As this class is an adaptor, this method is empty. + * @param action the action performed + * @see actionType + */ public void notifyListeners(AllocationAction action) { } Modified: trunk/source/gridsim/parallel/scheduler/ARConservativeBackfill.java =================================================================== --- trunk/source/gridsim/parallel/scheduler/ARConservativeBackfill.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/scheduler/ARConservativeBackfill.java 2009-05-21 01:59:34 UTC (rev 266) @@ -36,7 +36,7 @@ /** * {@link ARConservativeBackfill} class is an allocation policy for - * {@link ParallelResource}> that implements conservative backfilling and + * {@link ParallelResource} that implements conservative backfilling and * supports advance reservations. The policy is based on the conservative * backfilling algorithm described in the following papers: * <p> @@ -80,11 +80,11 @@ * <li> Local load is not considered. If you would like to simulate this, * you have to model the local load as jobs. It is more precise * and faster. To do so, please check {@link WorkloadLublin99}. - * <li> Jobs cannot be paused nor migrated. + * <li> Jobs cannot be paused or migrated. * </ul> * * @author Marcos Dias de Assuncao - * @since + * @since 5.0 * * @see ResourceCharacteristics * @see ReservationPolicy Modified: trunk/source/gridsim/parallel/scheduler/AggressiveBackfill.java =================================================================== --- trunk/source/gridsim/parallel/scheduler/AggressiveBackfill.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/scheduler/AggressiveBackfill.java 2009-05-21 01:59:34 UTC (rev 266) @@ -53,7 +53,7 @@ * simulate this, you have to model the local load as jobs. * It is more precise and faster. To do so, please check * {@link WorkloadLublin99}. - * <li> Jobs cannot be paused nor migrated. + * <li> Jobs cannot be paused or migrated. * </ul> * * @author Marcos Dias de Assuncao @@ -86,14 +86,14 @@ /** * Allocates a new {@link AggressiveBackfill} object - * @param resourceName the <tt>GridResource</tt> entity name that will + * @param resourceName the resource entity name that will * contain this allocation policy * @param entityName this object entity name * @throws Exception This happens when one of the following scenarios occur: * <ul> * <li> Creating this entity before initialising GridSim package - * <li> The entity name is <tt>null</tt> or empty - * <li> The entity has <tt>zero</tt> number of PEs (Processing + * <li> The entity name is <code>null</code> or empty + * <li> The entity has <code>zero</code> number of PEs (Processing * Elements). <br> * No PEs, which means that the Gridlets cannot be processed. * A GridResource must contain one or more Machines. @@ -238,8 +238,8 @@ /** * Cancels a job running or in the waiting queue. If a job is cancelled and * the job was either running or was the first job in the waiting queue (i.e. pivot), - * then the availability profile is updated. - * <b>NOTE:</b> + * then the availability profile is updated.<br> + * <b>NOTE THAT:</b> * <ul> * <li> This method firstly checks if the job has not finished. If the * job has completed, it cannot be cancelled. @@ -508,7 +508,7 @@ } /** - * Forecast finish time of a Gridlet. + * Forecast finish time of a Gridlet.<br> * <tt>Finish time = length / available rating</tt> * @param availableRating the shared MIPS rating for all Gridlets * @param length remaining Gridlet length Modified: trunk/source/gridsim/parallel/scheduler/AggressiveMultiPartitions.java =================================================================== --- trunk/source/gridsim/parallel/scheduler/AggressiveMultiPartitions.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/scheduler/AggressiveMultiPartitions.java 2009-05-21 01:59:34 UTC (rev 266) @@ -68,7 +68,7 @@ * <li> Local load is not considered. If you would like to simulate this, * you have to model the local load as jobs. It is more precise * and faster. To do so, please check {@link WorkloadLublin99}. - * <li> Gridlets cannot be paused nor migrated. + * <li> Gridlets cannot be paused or migrated. * <li> This policy does not support advance reservations. * </ul> * Modified: trunk/source/gridsim/parallel/scheduler/ConservativeBackfill.java =================================================================== --- trunk/source/gridsim/parallel/scheduler/ConservativeBackfill.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/scheduler/ConservativeBackfill.java 2009-05-21 01:59:34 UTC (rev 266) @@ -63,7 +63,9 @@ * the range [0..99]. The ranges of current PEs available is updated * to [100..499] and one entry is inserted at the profile to indicate * that the range [0..499] will be available again at simulation time - * 600 seconds. Now suppose that a job (<tt>Jb</tt>) arrives at simulation + * 600 seconds. + * <p> + * Now suppose that a job (<tt>Jb</tt>) arrives at simulation * time 200 requiring 400 PEs and expected to run for 500 seconds. * The policy checks the ranges currently available and find [100..499]. * It then scans the availability profile and analyses all the entries whose @@ -76,6 +78,7 @@ * the execution. The policy then updates the ranges of current PEs to []. * After that, the policy updates the entry at 600 seconds to [0..99] * and inserts an entry with time 700 seconds with the range [0..499]. + * <p> * Now consider that a third job (<tt>Jc</tt>) arrives at simulation time 250 * requiring 500 PEs and expected to run for 100 seconds. As the * current ranges available is [], the policy scans the profile until @@ -94,7 +97,7 @@ * <li> Local load is not considered. If you would like to simulate this, * you have to model the local load as jobs; it is more precise * and faster. To do so, please check {@link WorkloadLublin99}. - * <li> Jobs cannot be paused nor migrated. + * <li> Jobs cannot be paused or migrated. * </ul> * * @author Marcos Dias de Assuncao Modified: trunk/source/gridsim/parallel/scheduler/RuntimePredicate.java =================================================================== --- trunk/source/gridsim/parallel/scheduler/RuntimePredicate.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/scheduler/RuntimePredicate.java 2009-05-21 01:59:34 UTC (rev 266) @@ -16,6 +16,7 @@ * This predicate filters jobs according to their runtime * * @author Marcos Dias de Assuncao + * @since 5.0 */ public class RuntimePredicate implements PartitionPredicate { private int minRuntime; Modified: trunk/source/gridsim/parallel/util/Workload.java =================================================================== --- trunk/source/gridsim/parallel/util/Workload.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/util/Workload.java 2009-05-21 01:59:34 UTC (rev 266) @@ -35,8 +35,8 @@ * This class dispatches jobs to a grid resource according to the workload * model provided. That is, the workload model can generate jobs according to * various distributions, or read the job information from a log file. - * <br> - * <b>NOTE:</b> + * <p> + * <b>NOTE THAT:</b> * <ul> * <li> This class can be classified as <b>one grid user entity</b>. * Hence, you need to incorporate this entity into <tt>numUser</tt> Modified: trunk/source/gridsim/parallel/util/WorkloadFileReader.java =================================================================== --- trunk/source/gridsim/parallel/util/WorkloadFileReader.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/util/WorkloadFileReader.java 2009-05-21 01:59:34 UTC (rev 266) @@ -31,7 +31,8 @@ /** * This class is responsible for reading resource traces from a file and - * creating a list of jobs. <br> + * creating a list of jobs. + * <p> * <b>NOTE:</b> * <ul> * <li> This class can only take <tt>one</tt> trace file of the following Modified: trunk/source/gridsim/parallel/util/WorkloadJob.java =================================================================== --- trunk/source/gridsim/parallel/util/WorkloadJob.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/util/WorkloadJob.java 2009-05-21 01:59:34 UTC (rev 266) @@ -13,6 +13,7 @@ * This class represents job read from a a workload trace file. * * @author Marcos Dias de Assuncao + * @since 5.0 */ public class WorkloadJob { private Gridlet gridlet = null; Modified: trunk/source/gridsim/parallel/util/WorkloadLublin99.java =================================================================== --- trunk/source/gridsim/parallel/util/WorkloadLublin99.java 2009-05-19 12:18:14 UTC (rev 265) +++ trunk/source/gridsim/parallel/util/WorkloadLublin99.java 2009-05-21 01:59:34 UTC (rev 266) @@ -12,12 +12,9 @@ * generator presented by Lublin and Feitelson. * <p> * Details on how the distributions have been implemented and how their - * parameters can be configured are described below. Please note that this text - * was extracted from the C implementation of the model performed by Uri Lublin - * and Dror Feitelson: - * - * - * + * parameters can be configured are described below. Please note that the + * following text was extracted from the C implementation of the model + * performed by Uri Lublin and Dror Feitelson: * <p> * The load generated can be changed by changing the values of the model parameters. * Remember to set the number-of-nodes' parameters to fit your system. @@ -48,21 +45,21 @@ * Given ri,ni,ai,N or r,n,a,N we can calculate the expected load on the system * * <p> - * <tt> + * <pre> * sum(ri * ni) * load = --------------- * P * max(ai) - * </tt> + * </pre> * * <p> * We can calculate an approximation (exact if 'ri' and 'ni' are independent) * *<p> - *<tt> + *<pre> * r * n * approximate-load = ------- * P * a - *</tt> + *</pre> * * <p> * The model controls the r,m,a. @@ -83,15 +80,16 @@ * Var(hg) = p^2*a1*b1^2 + (1-p)^2*a2*b2^2<br> * One who wishes to enlarge the hyper-gamma (or the runtime) random value may * do that using one (or more) of the three following ways:<br> - * 1. enlarge the first gamma.<br> - * 2. and/or enlarge the second gamma.<br> - * 3. and/or set a smaller value to the 'p' parameter.(parameter p of hyper-gamma + * <p><ul> + * <li> enlarge the first gamma.<br> + * <li> and/or enlarge the second gamma.<br> + * <li> and/or set a smaller value to the 'p' parameter.(parameter p of hyper-gamma * is the proportion of the first gamma). * since in my model 'p' is dependent on the number of nodes (p=pa*nodes+pb) * this is done by diminishing 'pa' and/or diminishing 'pb' such that 'p' * will be smaller. Note that changing 'pa' affects the correlation * between the number of nodes a job needs and its runtime. <br> - * <br> + * </ul> * Use {@link #setRunTimeParameters(int, double, double, double, double, double, double)} * in order to change the runtime parameters of jobs. * @@ -116,10 +114,12 @@ * Let tsu ~ two-stage-uniform(Ulow,Umed,Uhi,Uprob) then the expectation of tsu * is E(tsu) = Uprob*(Ulow+Umed)/2 + (1-Uprob)*(Umed+Uhi)/2 = * = (Uprob*Ulow + Umed + (1-Uprob)*Uhi)/2. <br> - * 'Ulow' is the log2 of the minimal number of nodes a job may run on. <br> - * 'Uhi' is the log2 of the system size. <br> - * 'Umed' is the changing point of the cdf function and should be set to <br> - * 'Umed' = 'Uhi' - 2.5. ('2.5' could be change between 1.5 to 3.5). <br> + * <ul> + * <li>'Ulow' is the log2 of the minimal number of nodes a job may run on. + * <li>'Uhi' is the log2 of the system size. + * <li>'Umed' is the changing point of the cdf function and should be set to + * 'Umed' = 'Uhi' - 2.5. ('2.5' could be change between 1.5 to 3.5). + * </ul> * For example if the system size is 8 (Uhi = log2(8) = 3) it makes no sense to * set Umed to be 0 or 0.5 . In this case I would set Umed to be 1.5 , and maybe * set Ulow to be 0.8 , so the probability of 2 would not be too small. @@ -127,11 +127,14 @@ * to a value between 0.7 to 0.95. *<br> * One who wishes to enlarge the mean number of nodes may do that using one of - * the two following ways:<br> - * 1. set a smaller value to 'prob'<br> - * 2. and/or enlarge 'uMed'<br> + * the two following ways: + * <p><ul> + * <li> set a smaller value to 'prob' + * <li> and/or enlarge 'uMed' + * </ul> * Remember that changing the mean number of nodes will affect on the runtime - * too. <br> + * too. + * <p> * Use {@link #setParallelJobProbabilities(int, double, double, double, double)} * to change the number of nodes and probability of parallel jobs. <br> * Use {@link #setPower2Probability(int, double)} to change the probability of @@ -143,18 +146,19 @@ * -------------------------- <br> * Changing the arrival time: <br> * -------------------------- <br> - * The arrival time is calculated in two stages: <br> - * First stage : calculate the proportion of number of jobs arrived at every + * The arrival time is calculated in two stages: + * <ul> + * <li><b>First stage:</b> calculate the proportion of number of jobs arrived at every * time interval (bucket). this is done using the gamma(anum,bnum) * cdf and the CYCLIC_DAY_START. The weights array holds the points - * of all the buckets. <br> - * Second stage: for each job calculate its inter-arrival time: <br> + * of all the buckets. + * <li><b>Second stage:</b> for each job calculate its inter-arrival time: * Generate a random value from the gamma(aarr,barr). * The exponential of the random value is the * points we have. While we have less points than the current * bucket , "pay" the appropriate number of points and move to the * next bucket (updating the next-arrival-time). - * <br> + * </ul> * The parameters 'aarr' and 'barr' represent the inter-arrival-time in the * rush hours. The parameters 'anum' and 'bnum' represent the number of jobs * arrived (for every bucket). The proportion of bucket 'i' is: @@ -162,15 +166,16 @@ * We calculate this proportion for each i from BUCKETS to (24+BUCKETS) , * and the buckets (their indices) that are larger than or equal to 24 are move * cyclically to the right place: - * (24 --> 0 , 25 --> 1 , ... , (24+BUCKETS) --> BUCKETS ) - * <br> + * <pre> + * (24 --> 0 , 25 --> 1 , ... , (24+BUCKETS) --> BUCKETS) + * </pre> * One who wishes to change the mean inter-arrival time may do that in the * following way: <br> * - enlarge the rush-hours-inter-arrival time. * This is done by enlarging the value of aarr or barr according to the wanted - * change of the CV. <br> - * One who wishes to change the daily cycle may change the values of 'anum' - * and/or 'bnum'<br> + * change of the CV. One who wishes to change the daily cycle may change the + * values of 'anum' and/or 'bnum' + * <p> * Use {@link #setInterArrivalTimeParameters(int, double, double, double, double, double)} * to change the inter-arrival parameters. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |