You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(24) |
Sep
(14) |
Oct
(13) |
Nov
(5) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(2) |
Feb
(53) |
Mar
(29) |
Apr
(5) |
May
(11) |
Jun
(3) |
Jul
(7) |
Aug
(48) |
Sep
(10) |
Oct
(8) |
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(2) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sunil N. <sun...@gm...> - 2013-04-07 04:41:54
|
I am trying to simulate resource scheduling algorithms like min-min in Gridsim. I am using gridsim toolkit 4.1. I want to know that how to use AllocPolicy class in my simulation. I have seen the example provided but how to implement those methods is not cleared. Second thing I want to know is after submitting gridlet to and resource for execution how can I know number of resources that are free in the Grid.Eg. there are 5 resources and i submit gridlet to one resource after wards how can i know that 4 resources are currently available in coding. Please do needful in the matter. sunil nakum |
From: Sunil N. <sun...@gm...> - 2012-03-04 12:23:53
|
hello I want to simulate resource scheduling algorithms using gridsim. can any one please help me where i can add code for my scheduling algorithm. It's urgent. -- Thanks & Regards, Sunil V. Nakum, Lecturer, R. K. C. E. T., Rajkot. |
From: <mar...@us...> - 2009-10-15 15:43:29
|
Revision: 276 http://gridsim.svn.sourceforge.net/gridsim/?rev=276&view=rev Author: marcos_dias Date: 2009-10-15 15:43:21 +0000 (Thu, 15 Oct 2009) Log Message: ----------- Just a misspelling in the documentation has been fixed. Modified Paths: -------------- trunk/examples/auction/readme.txt Modified: trunk/examples/auction/readme.txt =================================================================== --- trunk/examples/auction/readme.txt 2009-10-15 15:42:32 UTC (rev 275) +++ trunk/examples/auction/readme.txt 2009-10-15 15:43:21 UTC (rev 276) @@ -4,7 +4,7 @@ ./example01 : shows how to use reverse auctions, i.e. the lowest bid is the better and auctions are started by buyers. -./example02 : shows how to use different auctions, such as English, Ducth +./example02 : shows how to use different auctions, such as English, Dutch and First Price Seal Bid. NOTE: Detailed explanations are provided in the source file(s). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-10-15 15:42:41
|
Revision: 275 http://gridsim.svn.sourceforge.net/gridsim/?rev=275&view=rev Author: marcos_dias Date: 2009-10-15 15:42:32 +0000 (Thu, 15 Oct 2009) Log Message: ----------- This update fixes a bug in the build.xml file, which prevented the make jar targed from copying .properties file into gridsim.jar Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-09-24 09:00:48 UTC (rev 274) +++ trunk/build.xml 2009-10-15 15:42:32 UTC (rev 275) @@ -49,6 +49,9 @@ <!-- rule to compile GridSim source files --> <target name="build" depends="prepare"> <javac srcdir="${src.dir}" destdir="${class.dir}" classpath="${classpath}" /> + <copy todir="${class.dir}"> + <fileset dir="${src.dir}/" includes="**/*.properties"/> + </copy> </target> <!-- rule for making a jar file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-09-24 09:00:56
|
Revision: 274 http://gridsim.svn.sourceforge.net/gridsim/?rev=274&view=rev Author: marcos_dias Date: 2009-09-24 09:00:48 +0000 (Thu, 24 Sep 2009) Log Message: ----------- Changes in documentation and script details to release GridSim as version 5 Modified Paths: -------------- trunk/jars/gridsim.jar trunk/release.sh Modified: trunk/jars/gridsim.jar =================================================================== (Binary files differ) Modified: trunk/release.sh =================================================================== --- trunk/release.sh 2009-09-23 17:22:45 UTC (rev 273) +++ trunk/release.sh 2009-09-24 09:00:48 UTC (rev 274) @@ -5,7 +5,7 @@ # sh release.sh 5beta VERSION=$1 -FILES="./source ./examples ./jars ./build.xml *.txt" +FILES="./source ./examples ./jars ./build.xml ./doc *.txt" CURRDIR=`pwd` mkdir -p ./release/gridsim This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-09-23 17:23:03
|
Revision: 273 http://gridsim.svn.sourceforge.net/gridsim/?rev=273&view=rev Author: marcos_dias Date: 2009-09-23 17:22:45 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Changes in documentation and script details to release GridSim as version 5 Modified Paths: -------------- trunk/examples/ResFailure/example01/GridUserFailureEx01.java trunk/examples/ResFailure/example01/GridletSubmission.java trunk/examples/ResFailure/example01/ResFailureEx01.java trunk/examples/ResFailure/example01/readme.txt trunk/examples/ResFailure/example02/GridUserFailureEx02.java trunk/examples/ResFailure/example02/GridletSubmission.java trunk/examples/ResFailure/example02/ResFailureEx02.java trunk/examples/ResFailure/example02/readme.txt trunk/examples/ResFailure/example03/GridUserFailureEx03.java trunk/examples/ResFailure/example03/GridletSubmission.java trunk/examples/ResFailure/example03/ResFailureEx03.java trunk/examples/ResFailure/example03/readme.txt trunk/examples/datagrid/example01/DataExample1.java trunk/examples/datagrid/example01/DummyUser.java trunk/examples/datagrid/example02/DataExample2.java trunk/examples/datagrid/example02/FileUser.java trunk/examples/datagrid/example03/DataGridletExample.java trunk/examples/datagrid/example03/DataGridletUser.java trunk/examples/datagrid/example04/DataGridSim.java trunk/examples/datagrid/example04/FilesReader.java trunk/examples/datagrid/example04/ParameterReader.java trunk/examples/datagrid/example04/ResourceReader.java trunk/examples/datagrid/example04/SimUser.java trunk/examples/datagrid/example04/UserReader.java trunk/examples/network/FiniteBuffer/FnbUser.java trunk/examples/network/FiniteBuffer/GridletSubmission.java trunk/examples/network/FiniteBuffer/mainExample.java trunk/examples/network/FiniteBuffer/readme.txt trunk/examples/parallel/agressive/ExampleEASY01.java trunk/examples/parallel/conservative/ExampleCB01.java trunk/examples/readme.txt trunk/source/gridsim/ARGridResource.java trunk/source/gridsim/ARObject.java trunk/source/gridsim/ARPolicy.java trunk/source/gridsim/ARSimpleSpaceShared.java trunk/source/gridsim/Accumulator.java trunk/source/gridsim/AdvanceReservation.java trunk/source/gridsim/AllocPolicy.java trunk/source/gridsim/GridInformationService.java trunk/source/gridsim/GridResource.java trunk/source/gridsim/GridSim.java trunk/source/gridsim/GridSimCore.java trunk/source/gridsim/GridSimRandom.java trunk/source/gridsim/GridSimShutdown.java trunk/source/gridsim/GridSimStandardPE.java trunk/source/gridsim/GridSimTags.java trunk/source/gridsim/GridStatistics.java trunk/source/gridsim/GridUser.java trunk/source/gridsim/Gridlet.java trunk/source/gridsim/GridletList.java trunk/source/gridsim/IO_data.java trunk/source/gridsim/Machine.java trunk/source/gridsim/MachineList.java trunk/source/gridsim/PE.java trunk/source/gridsim/PEList.java trunk/source/gridsim/ParameterException.java trunk/source/gridsim/ResGridlet.java trunk/source/gridsim/ResGridletList.java trunk/source/gridsim/ResourceCalendar.java trunk/source/gridsim/ResourceCharacteristics.java trunk/source/gridsim/ResourceUserList.java trunk/source/gridsim/Sim_from_port.java trunk/source/gridsim/SpaceShared.java trunk/source/gridsim/Stat.java trunk/source/gridsim/TimeShared.java trunk/source/gridsim/auction/Auction.java trunk/source/gridsim/auction/AuctionObserver.java trunk/source/gridsim/auction/AuctionTags.java trunk/source/gridsim/auction/Auctioneer.java trunk/source/gridsim/auction/ContinuousDoubleAuction.java trunk/source/gridsim/auction/DoubleAuction.java trunk/source/gridsim/auction/DutchAuction.java trunk/source/gridsim/auction/EnglishAuction.java trunk/source/gridsim/auction/FirstPriceSealedBidAuction.java trunk/source/gridsim/auction/Message.java trunk/source/gridsim/auction/MessageAsk.java trunk/source/gridsim/auction/MessageBid.java trunk/source/gridsim/auction/MessageCallForBids.java trunk/source/gridsim/auction/MessageInformOutcome.java trunk/source/gridsim/auction/MessageInformStart.java trunk/source/gridsim/auction/MessageRejectBid.java trunk/source/gridsim/auction/MessageRejectCallForBid.java trunk/source/gridsim/auction/OneSidedAuction.java trunk/source/gridsim/auction/Responder.java trunk/source/gridsim/auction/ReverseDutchAuction.java trunk/source/gridsim/auction/ReverseEnglishAuction.java trunk/source/gridsim/auction/ReverseFirstPriceSealedBidAuction.java trunk/source/gridsim/datagrid/DataGridResource.java trunk/source/gridsim/datagrid/DataGridTags.java trunk/source/gridsim/datagrid/DataGridUser.java trunk/source/gridsim/datagrid/DataGridlet.java trunk/source/gridsim/datagrid/File.java trunk/source/gridsim/datagrid/FileAttribute.java trunk/source/gridsim/datagrid/ReplicaManager.java trunk/source/gridsim/datagrid/SimpleReplicaManager.java trunk/source/gridsim/datagrid/filter/FileNameFilter.java trunk/source/gridsim/datagrid/filter/Filter.java trunk/source/gridsim/datagrid/filter/FilterDataResult.java trunk/source/gridsim/datagrid/index/AbstractRC.java trunk/source/gridsim/datagrid/index/DataGIS.java trunk/source/gridsim/datagrid/index/DataRegionalGIS.java trunk/source/gridsim/datagrid/index/RegionalRC.java trunk/source/gridsim/datagrid/index/TopRegionalRC.java trunk/source/gridsim/datagrid/storage/HarddriveStorage.java trunk/source/gridsim/datagrid/storage/Storage.java trunk/source/gridsim/datagrid/storage/TapeStorage.java trunk/source/gridsim/filter/FilterCreateAR.java trunk/source/gridsim/filter/FilterGridlet.java trunk/source/gridsim/filter/FilterQueryTimeAR.java trunk/source/gridsim/filter/FilterResult.java trunk/source/gridsim/index/AbstractGIS.java trunk/source/gridsim/index/RegionalGIS.java trunk/source/gridsim/net/FIFOScheduler.java trunk/source/gridsim/net/FloodAdPack.java trunk/source/gridsim/net/FloodingRouter.java trunk/source/gridsim/net/InfoPacket.java trunk/source/gridsim/net/Input.java trunk/source/gridsim/net/Link.java trunk/source/gridsim/net/NetIO.java trunk/source/gridsim/net/NetPacket.java trunk/source/gridsim/net/Output.java trunk/source/gridsim/net/Packet.java trunk/source/gridsim/net/PacketScheduler.java trunk/source/gridsim/net/RIPAdPack.java trunk/source/gridsim/net/RIPRouter.java trunk/source/gridsim/net/RateControlledRouter.java trunk/source/gridsim/net/RateControlledScheduler.java trunk/source/gridsim/net/Router.java trunk/source/gridsim/net/SCFQScheduler.java trunk/source/gridsim/net/SimpleLink.java trunk/source/gridsim/net/flow/FilterFlow.java trunk/source/gridsim/net/flow/Flow.java trunk/source/gridsim/net/flow/FlowInput.java trunk/source/gridsim/net/flow/FlowLink.java trunk/source/gridsim/net/flow/FlowOutput.java trunk/source/gridsim/net/flow/FlowPacket.java trunk/source/gridsim/net/flow/FlowRouter.java trunk/source/gridsim/net/fnb/ARED.java trunk/source/gridsim/net/fnb/FIFO.java trunk/source/gridsim/net/fnb/FnbDroppedPacketInfo.java trunk/source/gridsim/net/fnb/FnbDroppedUserObject.java trunk/source/gridsim/net/fnb/FnbEndToEndPath.java trunk/source/gridsim/net/fnb/FnbInput.java trunk/source/gridsim/net/fnb/FnbMessage.java trunk/source/gridsim/net/fnb/FnbMessageDropFile.java trunk/source/gridsim/net/fnb/FnbMessageDropGridlet.java trunk/source/gridsim/net/fnb/FnbNetPacket.java trunk/source/gridsim/net/fnb/FnbNetworkReader.java trunk/source/gridsim/net/fnb/FnbOutput.java trunk/source/gridsim/net/fnb/FnbRIPRouter.java trunk/source/gridsim/net/fnb/FnbSCFQScheduler.java trunk/source/gridsim/net/fnb/FnbWhiteList.java trunk/source/gridsim/net/fnb/GridletPackets.java trunk/source/gridsim/net/fnb/RED.java trunk/source/gridsim/net/fnb/firstLastPacketsGridlet.java trunk/source/gridsim/net/fnb/source_pktNum.java trunk/source/gridsim/parallel/ParallelResource.java trunk/source/gridsim/parallel/ResourceDynamics.java trunk/source/gridsim/parallel/SSGridletList.java trunk/source/gridsim/parallel/gui/AbstractVisualizer.java trunk/source/gridsim/parallel/gui/ActionType.java trunk/source/gridsim/parallel/gui/AllocationAction.java trunk/source/gridsim/parallel/gui/AllocationListener.java trunk/source/gridsim/parallel/gui/GUISettings.java trunk/source/gridsim/parallel/gui/JobTypePanel.java trunk/source/gridsim/parallel/gui/ParallelVisualizer.java trunk/source/gridsim/parallel/gui/ResourceWindow.java trunk/source/gridsim/parallel/gui/Visualizer.java trunk/source/gridsim/parallel/gui/VisualizerAdaptor.java trunk/source/gridsim/parallel/log/LogFormatter.java trunk/source/gridsim/parallel/log/LoggerEnum.java trunk/source/gridsim/parallel/log/Logging.java trunk/source/gridsim/parallel/profile/PERange.java trunk/source/gridsim/parallel/profile/PERangeList.java trunk/source/gridsim/parallel/profile/PartProfile.java trunk/source/gridsim/parallel/profile/PartProfileEntry.java trunk/source/gridsim/parallel/profile/PartitionPredicate.java trunk/source/gridsim/parallel/profile/Profile.java trunk/source/gridsim/parallel/profile/ProfileEntry.java trunk/source/gridsim/parallel/profile/ResourcePartition.java trunk/source/gridsim/parallel/profile/ScheduleItem.java trunk/source/gridsim/parallel/profile/SingleProfile.java trunk/source/gridsim/parallel/profile/SingleProfileEntry.java trunk/source/gridsim/parallel/profile/TimeSlot.java trunk/source/gridsim/parallel/reservation/ErrorType.java trunk/source/gridsim/parallel/reservation/FilterARMessage.java trunk/source/gridsim/parallel/reservation/MessageType.java trunk/source/gridsim/parallel/reservation/Reservation.java trunk/source/gridsim/parallel/reservation/ReservationMessage.java trunk/source/gridsim/parallel/reservation/ReservationPolicy.java trunk/source/gridsim/parallel/reservation/ReservationRequester.java trunk/source/gridsim/parallel/reservation/ReservationStatus.java trunk/source/gridsim/parallel/reservation/ServerReservation.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/PrioritySelector.java trunk/source/gridsim/parallel/scheduler/RuntimePredicate.java trunk/source/gridsim/parallel/scheduler/SelectiveBackfill.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 trunk/source/gridsim/parallel/util/WorkloadModel.java trunk/source/gridsim/resFailure/AllocPolicyWithFailure.java trunk/source/gridsim/resFailure/AvailabilityInfo.java trunk/source/gridsim/resFailure/FailureMsg.java trunk/source/gridsim/resFailure/GridResourceWithFailure.java trunk/source/gridsim/resFailure/RegionalGISWithFailure.java trunk/source/gridsim/resFailure/SpaceSharedWithFailure.java trunk/source/gridsim/resFailure/TimeSharedWithFailure.java trunk/source/gridsim/util/NetworkReader.java trunk/source/gridsim/util/SimReport.java trunk/source/gridsim/util/TrafficGenerator.java trunk/source/gridsim/util/Workload.java Added Paths: ----------- trunk/jars/gridsim.jar trunk/jars/package-list Modified: trunk/examples/ResFailure/example01/GridUserFailureEx01.java =================================================================== --- trunk/examples/ResFailure/example01/GridUserFailureEx01.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example01/GridUserFailureEx01.java 2009-09-23 17:22:45 UTC (rev 273) @@ -5,7 +5,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example01/GridletSubmission.java =================================================================== --- trunk/examples/ResFailure/example01/GridletSubmission.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example01/GridletSubmission.java 2009-09-23 17:22:45 UTC (rev 273) @@ -5,7 +5,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example01/ResFailureEx01.java =================================================================== --- trunk/examples/ResFailure/example01/ResFailureEx01.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example01/ResFailureEx01.java 2009-09-23 17:22:45 UTC (rev 273) @@ -5,7 +5,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example01/readme.txt =================================================================== --- trunk/examples/ResFailure/example01/readme.txt 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example01/readme.txt 2009-09-23 17:22:45 UTC (rev 273) @@ -3,7 +3,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example02/GridUserFailureEx02.java =================================================================== --- trunk/examples/ResFailure/example02/GridUserFailureEx02.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example02/GridUserFailureEx02.java 2009-09-23 17:22:45 UTC (rev 273) @@ -5,7 +5,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example02/GridletSubmission.java =================================================================== --- trunk/examples/ResFailure/example02/GridletSubmission.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example02/GridletSubmission.java 2009-09-23 17:22:45 UTC (rev 273) @@ -5,7 +5,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example02/ResFailureEx02.java =================================================================== --- trunk/examples/ResFailure/example02/ResFailureEx02.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example02/ResFailureEx02.java 2009-09-23 17:22:45 UTC (rev 273) @@ -5,7 +5,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example02/readme.txt =================================================================== --- trunk/examples/ResFailure/example02/readme.txt 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example02/readme.txt 2009-09-23 17:22:45 UTC (rev 273) @@ -3,7 +3,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example03/GridUserFailureEx03.java =================================================================== --- trunk/examples/ResFailure/example03/GridUserFailureEx03.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example03/GridUserFailureEx03.java 2009-09-23 17:22:45 UTC (rev 273) @@ -5,7 +5,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example03/GridletSubmission.java =================================================================== --- trunk/examples/ResFailure/example03/GridletSubmission.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example03/GridletSubmission.java 2009-09-23 17:22:45 UTC (rev 273) @@ -5,7 +5,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example03/ResFailureEx03.java =================================================================== --- trunk/examples/ResFailure/example03/ResFailureEx03.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example03/ResFailureEx03.java 2009-09-23 17:22:45 UTC (rev 273) @@ -5,7 +5,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/ResFailure/example03/readme.txt =================================================================== --- trunk/examples/ResFailure/example03/readme.txt 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/ResFailure/example03/readme.txt 2009-09-23 17:22:45 UTC (rev 273) @@ -3,7 +3,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) Modified: trunk/examples/datagrid/example01/DataExample1.java =================================================================== --- trunk/examples/datagrid/example01/DataExample1.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example01/DataExample1.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import gridsim.*; Modified: trunk/examples/datagrid/example01/DummyUser.java =================================================================== --- trunk/examples/datagrid/example01/DummyUser.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example01/DummyUser.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import gridsim.GridSim; Modified: trunk/examples/datagrid/example02/DataExample2.java =================================================================== --- trunk/examples/datagrid/example02/DataExample2.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example02/DataExample2.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import gridsim.*; Modified: trunk/examples/datagrid/example02/FileUser.java =================================================================== --- trunk/examples/datagrid/example02/FileUser.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example02/FileUser.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import gridsim.GridSim; Modified: trunk/examples/datagrid/example03/DataGridletExample.java =================================================================== --- trunk/examples/datagrid/example03/DataGridletExample.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example03/DataGridletExample.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import gridsim.*; Modified: trunk/examples/datagrid/example03/DataGridletUser.java =================================================================== --- trunk/examples/datagrid/example03/DataGridletUser.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example03/DataGridletUser.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import eduni.simjava.Sim_event; Modified: trunk/examples/datagrid/example04/DataGridSim.java =================================================================== --- trunk/examples/datagrid/example04/DataGridSim.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example04/DataGridSim.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import eduni.simjava.Sim_system; Modified: trunk/examples/datagrid/example04/FilesReader.java =================================================================== --- trunk/examples/datagrid/example04/FilesReader.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example04/FilesReader.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import gridsim.datagrid.File; Modified: trunk/examples/datagrid/example04/ParameterReader.java =================================================================== --- trunk/examples/datagrid/example04/ParameterReader.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example04/ParameterReader.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import java.io.BufferedReader; Modified: trunk/examples/datagrid/example04/ResourceReader.java =================================================================== --- trunk/examples/datagrid/example04/ResourceReader.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example04/ResourceReader.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import gridsim.*; Modified: trunk/examples/datagrid/example04/SimUser.java =================================================================== --- trunk/examples/datagrid/example04/SimUser.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example04/SimUser.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import gridsim.GridSim; Modified: trunk/examples/datagrid/example04/UserReader.java =================================================================== --- trunk/examples/datagrid/example04/UserReader.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/datagrid/example04/UserReader.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ import gridsim.net.*; Modified: trunk/examples/network/FiniteBuffer/FnbUser.java =================================================================== --- trunk/examples/network/FiniteBuffer/FnbUser.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/network/FiniteBuffer/FnbUser.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Authors: Agustin Caminero and Anthony Sulistio * Organization: Universidad de Castilla La Mancha (UCLM), Spain. Modified: trunk/examples/network/FiniteBuffer/GridletSubmission.java =================================================================== --- trunk/examples/network/FiniteBuffer/GridletSubmission.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/network/FiniteBuffer/GridletSubmission.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero * Organization: Universidad de Castilla La Mancha (UCLM), Spain. Modified: trunk/examples/network/FiniteBuffer/mainExample.java =================================================================== --- trunk/examples/network/FiniteBuffer/mainExample.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/network/FiniteBuffer/mainExample.java 2009-09-23 17:22:45 UTC (rev 273) @@ -4,7 +4,7 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: Universidad de Castilla La Mancha (UCLM), Spain. Modified: trunk/examples/network/FiniteBuffer/readme.txt =================================================================== --- trunk/examples/network/FiniteBuffer/readme.txt 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/network/FiniteBuffer/readme.txt 2009-09-23 17:22:45 UTC (rev 273) @@ -3,7 +3,7 @@ * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * An example of how to use the failure functionality. - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: Universidad de Castilla La Mancha (UCLM), Spain. Modified: trunk/examples/parallel/agressive/ExampleEASY01.java =================================================================== --- trunk/examples/parallel/agressive/ExampleEASY01.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/parallel/agressive/ExampleEASY01.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,11 +1,17 @@ /* * Author Marcos Dias de Assuncao + * Date: May 2009 * * Description: This example shows how to create a resource using an aggressive * backfilling policy without advance reservation features. The jobs are * read from a trace file. To test this example, you can use one of the traces - * included in the workloads directory. + * included in the parallel directory (e.g. sdsc_blue_01.txt). + * + * For example, in order to run the example on Linux, you should use: + * + * java -cp $GRIDSIM/jars/gridsim.jar;. parallel.agressive.ExampleEASY01 \ + * $GRIDSIM/examples/parallel/sdsc_blue_01.txt */ package parallel.agressive; Modified: trunk/examples/parallel/conservative/ExampleCB01.java =================================================================== --- trunk/examples/parallel/conservative/ExampleCB01.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/parallel/conservative/ExampleCB01.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,11 +1,17 @@ /* * Author Marcos Dias de Assuncao + * Date: May 2009 * * Description: This example shows how to create a resource using a conservative * backfilling policy without advance reservation features. The jobs are * read from a trace file. To test this example, you can use one of the traces * included in the workloads directory. + * + * For example, in order to run the example on Linux, you should use: + * + * java -cp $GRIDSIM/jars/gridsim.jar;. parallel.conservative.ExampleCB01 \ + * $GRIDSIM/examples/parallel/sdsc_blue_01.txt */ package parallel.conservative; Modified: trunk/examples/readme.txt =================================================================== --- trunk/examples/readme.txt 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/examples/readme.txt 2009-09-23 17:22:45 UTC (rev 273) @@ -1,6 +1,6 @@ /** - * Last update: May 2009 + * Last update: September 2009 */ This directory contains examples on how to use the GridSim toolkit. The classes @@ -15,8 +15,8 @@ where $GRIDSIM or %GRIDSIM% is the location of the gridsim toolkit package. To run the class file (in the examples directory): - In Unix/Linux: java -cp $GRIDSIM/jars/gridsim.jar:. path/to/example/MainClass > file.txt - In Windows: java -cp %GRIDSIM%\jars\gridsim.jar;. path\to\example\MainClass > file.txt + In Unix/Linux: java -cp $GRIDSIM/jars/gridsim.jar:. MainClass > file.txt + In Windows: java -cp %GRIDSIM%\jars\gridsim.jar;. MainClass > file.txt The above command means run the program and output the results into a file named "file.txt" rather than into screen or standard output. To prevent from @@ -104,6 +104,13 @@ shows few examples how to use workload traces from a file in GridSim. parallel: - Illustrates how to model clusters/supercomputers that process parallel jobs. + Illustrates how to model clusters/supercomputers that process + parallel jobs. To run most examples, you will need to inform the + path to a workload file that contains the information on the jobs + submitted to the cluster. For example, in order to run the EASY + backfilling example on Linux, you should use: + + java -cp $GRIDSIM/jars/gridsim.jar;. \ + parallel.agressive.ExampleEASY01 parallel/sdsc_blue_01.txt NOTE: Detailed explanations are provided in the source file(s). Added: trunk/jars/gridsim.jar =================================================================== (Binary files differ) Property changes on: trunk/jars/gridsim.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/jars/package-list =================================================================== --- trunk/jars/package-list (rev 0) +++ trunk/jars/package-list 2009-09-23 17:22:45 UTC (rev 273) @@ -0,0 +1,2 @@ +eduni.simjava +eduni.simjava.distributions Property changes on: trunk/jars/package-list ___________________________________________________________________ Added: svn:executable + * Modified: trunk/source/gridsim/ARGridResource.java =================================================================== --- trunk/source/gridsim/ARGridResource.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ARGridResource.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2004, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/ARObject.java =================================================================== --- trunk/source/gridsim/ARObject.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ARObject.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2004, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/ARPolicy.java =================================================================== --- trunk/source/gridsim/ARPolicy.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ARPolicy.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2004, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/ARSimpleSpaceShared.java =================================================================== --- trunk/source/gridsim/ARSimpleSpaceShared.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ARSimpleSpaceShared.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2004, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/Accumulator.java =================================================================== --- trunk/source/gridsim/Accumulator.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/Accumulator.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/AdvanceReservation.java =================================================================== --- trunk/source/gridsim/AdvanceReservation.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/AdvanceReservation.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2004, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/AllocPolicy.java =================================================================== --- trunk/source/gridsim/AllocPolicy.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/AllocPolicy.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2003, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/GridInformationService.java =================================================================== --- trunk/source/gridsim/GridInformationService.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridInformationService.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/GridResource.java =================================================================== --- trunk/source/gridsim/GridResource.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridResource.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/GridSim.java =================================================================== --- trunk/source/gridsim/GridSim.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridSim.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,15 +1,16 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; import eduni.simjava.Sim_event; + import eduni.simjava.Sim_exception; import eduni.simjava.Sim_port; import eduni.simjava.Sim_system; @@ -17,7 +18,6 @@ import gridsim.filter.FilterGridlet; import gridsim.filter.FilterResult; import gridsim.net.Link; -import gridsim.parallel.gui.AbstractVisualizer; import gridsim.parallel.gui.ParallelVisualizer; import gridsim.parallel.gui.Visualizer; import gridsim.parallel.gui.VisualizerAdaptor; Modified: trunk/source/gridsim/GridSimCore.java =================================================================== --- trunk/source/gridsim/GridSimCore.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridSimCore.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2004, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/GridSimRandom.java =================================================================== --- trunk/source/gridsim/GridSimRandom.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridSimRandom.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/GridSimShutdown.java =================================================================== --- trunk/source/gridsim/GridSimShutdown.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridSimShutdown.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/GridSimStandardPE.java =================================================================== --- trunk/source/gridsim/GridSimStandardPE.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridSimStandardPE.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/GridSimTags.java =================================================================== --- trunk/source/gridsim/GridSimTags.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridSimTags.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/GridStatistics.java =================================================================== --- trunk/source/gridsim/GridStatistics.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridStatistics.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,11 +1,9 @@ /* * Title: GridSim Toolkit - * Date: May 2003 + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html - * - * Copyright (c) 2002, The University of Melbourne, Australia + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ package gridsim; Modified: trunk/source/gridsim/GridUser.java =================================================================== --- trunk/source/gridsim/GridUser.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridUser.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,9 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html - * - * Copyright (c) 2005, The University of Melbourne, Australia + * License: GPL - http://www.gnu.org/copyleft/gpl.html */ package gridsim; Modified: trunk/source/gridsim/Gridlet.java =================================================================== --- trunk/source/gridsim/Gridlet.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/Gridlet.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/GridletList.java =================================================================== --- trunk/source/gridsim/GridletList.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/GridletList.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/IO_data.java =================================================================== --- trunk/source/gridsim/IO_data.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/IO_data.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/Machine.java =================================================================== --- trunk/source/gridsim/Machine.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/Machine.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ @@ -56,7 +56,7 @@ * @param id the machine ID * @param list list of PEs * @deprecated as of GridSim version 5.0, you should - * use {@link Machine(int,int,int)} + * use {@link #Machine(int,int,int)} * @pre id > 0 * @pre list != null * @post $none Modified: trunk/source/gridsim/MachineList.java =================================================================== --- trunk/source/gridsim/MachineList.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/MachineList.java 2009-09-23 17:22:45 UTC (rev 273) @@ -1,10 +1,10 @@ /* * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/PE.java =================================================================== --- trunk/source/gridsim/PE.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/PE.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,9 +2,8 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/PEList.java =================================================================== --- trunk/source/gridsim/PEList.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/PEList.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,9 +2,8 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/ParameterException.java =================================================================== --- trunk/source/gridsim/ParameterException.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ParameterException.java 2009-09-23 17:22:45 UTC (rev 273) @@ -7,7 +7,7 @@ * National University of Singapore * October 2004 * - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * Copyright (c) 2004, The University of Melbourne, Australia and * National University of Singapore * ParameterException.java - Thrown for illegal parameters Modified: trunk/source/gridsim/ResGridlet.java =================================================================== --- trunk/source/gridsim/ResGridlet.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ResGridlet.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,9 +2,8 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/ResGridletList.java =================================================================== --- trunk/source/gridsim/ResGridletList.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ResGridletList.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,9 +2,8 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/ResourceCalendar.java =================================================================== --- trunk/source/gridsim/ResourceCalendar.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ResourceCalendar.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,12 +2,10 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ - package gridsim; import java.util.*; Modified: trunk/source/gridsim/ResourceCharacteristics.java =================================================================== --- trunk/source/gridsim/ResourceCharacteristics.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ResourceCharacteristics.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,9 +2,8 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/ResourceUserList.java =================================================================== --- trunk/source/gridsim/ResourceUserList.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/ResourceUserList.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,9 +2,8 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/Sim_from_port.java =================================================================== --- trunk/source/gridsim/Sim_from_port.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/Sim_from_port.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,9 +2,8 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/SpaceShared.java =================================================================== --- trunk/source/gridsim/SpaceShared.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/SpaceShared.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,9 +2,8 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2003, The University of Melbourne, Australia */ package gridsim; Modified: trunk/source/gridsim/Stat.java =================================================================== --- trunk/source/gridsim/Stat.java 2009-09-23 16:56:07 UTC (rev 272) +++ trunk/source/gridsim/Stat.java 2009-09-23 17:22:45 UTC (rev 273) @@ -2,9 +2,8 @@ * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * License: GPL - http://www.gnu.org/copyleft/gpl.html * - * Copyright (c) 2002, The University of Melbourne, Australia */ package gridsim; @@ -31,11 +30,11 @@ /** * Allocat... [truncated message content] |
From: <mar...@us...> - 2009-09-23 16:56:54
|
Revision: 272 http://gridsim.svn.sourceforge.net/gridsim/?rev=272&view=rev Author: marcos_dias Date: 2009-09-23 16:56:07 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Changes in documentation and script details to release GridSim as version 5 Modified Paths: -------------- trunk/build.xml trunk/changelog.txt trunk/faq.txt trunk/readme.txt trunk/release_note.txt Added Paths: ----------- trunk/release.sh trunk/roadmap.txt Removed Paths: ------------- trunk/javadoc.sh Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-09-22 10:44:29 UTC (rev 271) +++ trunk/build.xml 2009-09-23 16:56:07 UTC (rev 272) @@ -1,6 +1,7 @@ <?xml version="1.0"?> -<!-- September 2004 +<!-- + Build file or Makefile for GridSim. NOTE: Make sure you have installed 'ant' and put the location of it into your path so you can access it anywhere. @@ -11,15 +12,9 @@ classes/ directory * type 'ant makejar' to compile the source files (if necessary) and to create a jar file into jar/ directory - -NOTE: rule for javadoc is not included yet. Use javadoc.sh script instead under - Unix/Linux environment. - -Acknowledgement: Thank to Uros Cibej for providing this file and instruction on - how to use it. + --> - <project name="GridSim" basedir="." default="build"> <description> This is the build file for GridSim @@ -42,9 +37,11 @@ <property name="doc.dir" location="./doc" /> <!-- location to use SimJava libraries --> - <property name="classpath" location="${jar.dir}/simjava2.jar" /> + <property name="classpath" location="${jar.dir}/simjava2.jar" /> + + <!-- the website where the SimJava2 documentation is maintained --> + <property name="sjdoc" value="http://www.icsa.informatics.ed.ac.uk/research/groups/hase/simjava/doc" /> - <target name="prepare"> <mkdir dir="${class.dir}" /> </target> @@ -102,12 +99,14 @@ doctitle="GridSim ${version} API Specification" header="GridSim ${version}" bottom="The University of Melbourne, Australia, ${year}" - destdir="${doc.dir}"> + destdir="${doc.dir}" classpath="${classpath}"> <tag name="invariant" scope="all" description="Invariant:"/> <tag name="pre" scope="all" description="Pre Condition:"/> <tag name="post" scope="all" description="Post Condition:"/> - <fileset dir="${src.dir}" includes="**/*.java" /> + + <link href="${sjdoc}" offline="true" packagelistLoc="${jar.dir}"/> + <fileset dir="${src.dir}" includes="**/*.java"/> </javadoc> </target> Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2009-09-22 10:44:29 UTC (rev 271) +++ trunk/changelog.txt 2009-09-23 16:56:07 UTC (rev 272) @@ -1,4 +1,4 @@ -#Changelog for GridSim Toolkit +#Change log for GridSim Toolkit Changes from 4.2 to 5.0 - Improvements to make GridSim more compatible with Java 5 and 6 Modified: trunk/faq.txt =================================================================== --- trunk/faq.txt 2009-09-22 10:44:29 UTC (rev 271) +++ trunk/faq.txt 2009-09-23 16:56:07 UTC (rev 272) @@ -10,8 +10,7 @@ --------------------------------------------------------- Q: Where can I find gridbroker, visual modeler, ... ? -A: Gridbroker and Visual Modeler are no longer supported. The can be found at: -http://www.gridbus.org/gridsim/release.html, but their use is not encouraged. +A: Gridbroker and Visual Modeler are no longer supported. --------------------------------------------------------- Q: I would like to do some experiments for my research work on grid computing @@ -20,9 +19,6 @@ administrators, etc. on a PC environment? Please pass on some resources, links, and white papers and links where from I should download. -Q: Please help me by sending GridSim Package, give instructions and - also technical help to complete my project successfully. - A: The best way to learn GridSim is by downloading it from the link below: http://www.gridbus.org/gridsim/ @@ -44,17 +40,17 @@ * to compile type: javac -cp $GRIDSIM/jars/gridsim.jar:. gridsim/example01/Example1.java * to run type: - java -cp $GRIDSIM/jars/gridsim.jar:. gridsim/example01/Example1 + java -cp $GRIDSIM/jars/gridsim.jar:. gridsim.example01.Example1 In Windows: * go to the examples directory, i.e. at command prompt type: cd %GRIDSIM%\examples * to compile type: javac -cp %GRIDSIM%\jars\gridsim.jar;. gridsim\example01\Example1.java - * to run type: java -cp %GRIDSIM%\jars\gridsim.jar;. gridsim\example01\Example1 + * to run type: java -cp %GRIDSIM%\jars\gridsim.jar;. gridsim.example01.Example1 The main difference is the use of ":" for Unix/Linux, and ";" for Windows NOTE: $GRIDSIM or %GRIDSIM% is the location of the GridSim Toolkit package. - Also, inside gridsim.jar contains SimJava v2.0 classes. Hence, + Also, gridsim.jar contains SimJava v2.0 classes. Hence, you do not need to install SimJava libraries. --------------------------------------------------------- @@ -63,9 +59,9 @@ A: You need the classpath to refer to the directory where Example1.java located. For Example, to run in Windows: - java -classpath gridsim.jar;. Example1 + java -classpath gridsim.jar;. gridsim.example01.Example1 - where Example1 is the classname you want to execute + where gridsim.example01.Example1 is the classname you want to execute --------------------------------------------------------- Q: My GridSim application runs perfectly, however, after the end of simulation @@ -167,7 +163,7 @@ Q: How do I create Gridlets with compute I/O requirements? A: Gridlets with compute I/O requirements are simulated through their file - sizes (input) and output sizez (output) parameters. + sizes (input) and output size (output) parameters. See Figure 16 of the GridSim paper. --------------------------------------------------------- @@ -182,11 +178,11 @@ A: Not supported in the older versions. Currently GridSim uses very simple network model. - Since GridSim ver3.1, it has a realistic network model. However, + Since GridSim 3.1, it has a realistic network model. However, advanced network features are not supported. --------------------------------------------------------- -Q: Is GridSim tool kit provides any help in solving problems for dynamical +Q: Is GridSim tool kit provides any help in solving problems for dynamic resource allocation upon failure? A: GridSim provides mechanism to reserve, but policy of reservation and @@ -203,7 +199,7 @@ Q: Does each gridlet can only be processed by only one PE? A: For older GridSim versions, it runs one PE. - Since GridSim ver3.0, each Gridlet can ask to be run on multiple PEs. + Since GridSim 3.0, each Gridlet can ask to be run on multiple PEs. However, it is up to the scheduler to handle this. At the moment, by default, TimeShared and SpaceShared scheduler executes an incoming Gridlet to only 1 PE. Deleted: trunk/javadoc.sh =================================================================== --- trunk/javadoc.sh 2009-09-22 10:44:29 UTC (rev 271) +++ trunk/javadoc.sh 2009-09-23 16:56:07 UTC (rev 272) @@ -1,44 +0,0 @@ - -## A script to run javadoc (Anthony Sept 2004). - -year="2008" # year -ver="v4.2 beta" # version number - -dir=./source # source directory that contains Java files -doc=./doc # output directory - -# Only creates GridSim javadoc. -javadoc -author -version -package -noqualifier java.* \ - -windowtitle 'GridSim '$ver' API Specification' \ - -doctitle '<b>GridSim</b> '$ver' API Specification' \ - -header '<b>GridSim</b><br><font size='-1'>'$ver'</font>' \ - -bottom 'The University of Melbourne, Australia, '$year \ - -d $doc -breakiterator \ - -tag pre:a:"Pre Condition:" \ - -tag post:a:"Post Condition:" \ - -tag invariant:t:"Invariant:" \ - $dir/eduni/simjava/*.java \ - $dir/eduni/simjava/distributions/*.java \ - $dir/gridsim/*.java \ - $dir/gridsim/util/*.java \ - $dir/gridsim/net/*.java \ - $dir/gridsim/net/flow/*.java \ - $dir/gridsim/net/fnb/*.java \ - $dir/gridsim/filter/*.java \ - $dir/gridsim/index/*.java \ - $dir/gridsim/resFailure/*.java \ - $dir/gridsim/auction/*.java \ - $dir/gridsim/datagrid/*.java \ - $dir/gridsim/datagrid/filter/*.java \ - $dir/gridsim/datagrid/index/*.java \ - $dir/gridsim/datagrid/storage/*.java \ - $dir/gridsim/parallel/*.java \ - $dir/gridsim/parallel/gui/*.java \ - $dir/gridsim/parallel/log/*.java \ - $dir/gridsim/parallel/profile/*.java \ - $dir/gridsim/parallel/reservation/*.java \ - $dir/gridsim/parallel/scheduler/*.java \ - $dir/gridsim/parallel/*.java \ - -echo "javadoc is done ...." - Modified: trunk/readme.txt =================================================================== --- trunk/readme.txt 2009-09-22 10:44:29 UTC (rev 271) +++ trunk/readme.txt 2009-09-23 16:56:07 UTC (rev 272) @@ -23,7 +23,7 @@ GridSim APIs and examples are also available on the GridSim website. -Software Requirements : Java version 1.50 or newer +Software Requirements : Java version 1.5 or newer --------------------- GridSim has been tested and run on Sun's Java version 1.5.0 or newer. Older versions of Java are not compatible. You also need to install Ant to compile Added: trunk/release.sh =================================================================== --- trunk/release.sh (rev 0) +++ trunk/release.sh 2009-09-23 16:56:07 UTC (rev 272) @@ -0,0 +1,24 @@ +#!/bin/sh + +# Pack the files for a GridSim release +# Usage example: +# sh release.sh 5beta + +VERSION=$1 +FILES="./source ./examples ./jars ./build.xml *.txt" +CURRDIR=`pwd` + +mkdir -p ./release/gridsim + +for file in $FILES; do + cp -r $file release/gridsim +done + +cd ./release + +tar cfzv gridsim-toolkit${VERSION}.tar.gz gridsim --exclude=**/.svn +zip -r gridsim-toolkit${VERSION}.zip gridsim -x *.svn* + +rm -rf gridsim + +cd $CURRDIR Modified: trunk/release_note.txt =================================================================== --- trunk/release_note.txt 2009-09-22 10:44:29 UTC (rev 271) +++ trunk/release_note.txt 2009-09-23 16:56:07 UTC (rev 272) @@ -1,10 +1,11 @@ - Gridbus Project to Release GridSim Toolkit 5.0 - June 2009 + CLOUDS Lab to Release GridSim Toolkit 5.0 + September 2009 -The Gridbus Project at The University of Melbourne, Australia has released the -next-version of Grid simulation software, the GridSim Toolkit 5.0. +The Cloud Computing and Distributed Systems (CLOUDS) Laboratory at +the University of Melbourne, Australia has released the next-version of +Grid simulation software, the GridSim Toolkit 5.0. This new version of GridSim brings a new package (i.e. gridsim.parallel) that provides: @@ -33,15 +34,15 @@ * An implementation of the workload model by Lublin and Feitelson for modelling -the workload of resources. Details about the workload model are available in: +the workload of clusters and supercomputers. Details about the workload model +are available in the following publication: Uri Lublin and Dror G. Feitelson, The Workload on Parallel Supercomputers: Modeling the Characteristics of Rigid Jobs. J. Parallel & Distributed Comput. 63(11), pp. 1105-1122, Nov 2003. * A data structure to facilitate the scheduling of jobs and advance reservations. -This data structure is decribed as an appendix on Marcos Dias de -Assuncao's PhD thesis. +This data structure is described as an appendix on Marcos Assuncao's PhD thesis. * Logging features using Java logging API. @@ -62,21 +63,22 @@ Tsinghua University (China), Sun Microsystems, IBM Research, Unisys, HP, Northrop Grumman Information Technology, British Telecom and EMC Corp. -The contributors to the GridSim software (from early to new version) are: -* Rajkumar Buyya, GRIDS Lab @ The University of Melbourne. +The contributors to the GridSim software (from early to new versions) are: +* Rajkumar Buyya, CLOUDS Lab @ The University of Melbourne. * Manzur Murshed, GSCIT @ Monash University, Australia. -* Anthony Sulistio, GRIDS Lab @ The University of Melbourne. +* Anthony Sulistio, CLOUDS Lab @ The University of Melbourne. * Gokul Poduval and Chen-Khong Tham, Dept. of Electrical & Computer Engineering @ National University of Singapore. -* Marcos Dias de Assuncao, GRIDS Lab @ The University of Melbourne. +* Marcos Dias de Assuncao, INRIA Lyon @ Ecole Normale Superieure de Lyon * Uros Cibej and Borut Robic, Faculty of Computer and Information Service, The University of Ljubljana, Slovenia. * Agustin Caminero, Department of Computing Systems, Universidad de Castilla La Mancha (UCLM), Spain. +* James Broberg, CLOUDS Lab @ The University of Melbourne. +* Saurabh Garg, CLOUDS Lab @ The University of Melbourne. +To download the GridSim software, please visit the CLOUDS Lab web site at +http://www.cloudbus.org/gridsim/ -To download the GridSim software, please visit the Gridbus Project web site at -http://www.gridbus.org/gridsim/ - Join the GridSim mailing lists at http://sourceforge.net/projects/gridsim Added: trunk/roadmap.txt =================================================================== --- trunk/roadmap.txt (rev 0) +++ trunk/roadmap.txt 2009-09-23 16:56:07 UTC (rev 272) @@ -0,0 +1,11 @@ +Short term goals: ++ Make lists typed to be compliant with Java 1.5+ ++ Check which packages are in use ++ Remove the dependency on entities that wait for particular events. For example, +the advance reservation class waits for the response of a given reservation request +and ignores other events. This creates a dependency on multi-threading for +entities. That becomes a bottleneck. ++ Not every entity should be a thread. Work with the idea of thread-pool. + +For version 6.0: ++ Complete new design for the simulation core. Remove dependency on SimJava \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-09-22 10:44:39
|
Revision: 271 http://gridsim.svn.sourceforge.net/gridsim/?rev=271&view=rev Author: marcos_dias Date: 2009-09-22 10:44:29 +0000 (Tue, 22 Sep 2009) Log Message: ----------- Testing SVN. Modified Paths: -------------- trunk/changelog.txt Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2009-09-22 10:43:48 UTC (rev 270) +++ trunk/changelog.txt 2009-09-22 10:44:29 UTC (rev 271) @@ -1,4 +1,4 @@ ---Changelog for GridSim Toolkit +#Changelog for GridSim Toolkit Changes from 4.2 to 5.0 - Improvements to make GridSim more compatible with Java 5 and 6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-09-22 10:43:55
|
Revision: 270 http://gridsim.svn.sourceforge.net/gridsim/?rev=270&view=rev Author: marcos_dias Date: 2009-09-22 10:43:48 +0000 (Tue, 22 Sep 2009) Log Message: ----------- Testing SVN. Modified Paths: -------------- trunk/changelog.txt Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2009-05-22 05:47:14 UTC (rev 269) +++ trunk/changelog.txt 2009-09-22 10:43:48 UTC (rev 270) @@ -1,4 +1,4 @@ -# Changelog for GridSim Toolkit +--Changelog for GridSim Toolkit Changes from 4.2 to 5.0 - Improvements to make GridSim more compatible with Java 5 and 6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-05-22 05:49:28
|
Revision: 269 http://gridsim.svn.sourceforge.net/gridsim/?rev=269&view=rev Author: marcos_dias Date: 2009-05-22 05:47:14 +0000 (Fri, 22 May 2009) Log Message: ----------- * Changes in the build.xml file to include the SimJava2 classes into gridsim.jar. * Updated readme.txt file. Modified Paths: -------------- trunk/build.xml Added Paths: ----------- trunk/readme.txt Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-05-22 05:18:22 UTC (rev 268) +++ trunk/build.xml 2009-05-22 05:47:14 UTC (rev 269) @@ -62,8 +62,31 @@ --> <target name="makejar" depends="build"> <echo>Compiling a new jar file, named: "gridsim.jar".</echo> + + <!-- <echo>This jar file only contains GridSim classes but not SimJava2.</echo> - <jar destfile="${jar.dir}/gridsim.jar" basedir="${class.dir}" /> + --> + + <echo>Unpacking SimJava2 jar file.</echo> + <delete file="${jar.dir}/gridsim.jar"/> + <delete dir="tmp"/> + <mkdir dir="tmp"/> + + <unjar dest="tmp"> + <fileset dir="jars" includes="simjava2.jar"/> + </unjar> + + <echo>Creating GridSim jar file including SimJava2 classes.</echo> + <delete dir="tmp/META-INF"/> + <jar jarfile="${jar.dir}/gridsim.jar" basedir="${class.dir}"> + <fileset dir="tmp"/> + </jar> + <delete dir="tmp"/> + + <!-- + <jar destfile="${jar.dir}/gridsim.jar" basedir="${class.dir}"/> + --> + </target> <target name="clean" description="clean up" > Added: trunk/readme.txt =================================================================== --- trunk/readme.txt (rev 0) +++ trunk/readme.txt 2009-05-22 05:47:14 UTC (rev 269) @@ -0,0 +1,65 @@ +Readme file + +Directory Structure of GridSim Toolkit +-------------------------------------- + +$GRIDSIM/ -- the current GridSim directory (top level) + classes/ -- The GridSim class files + doc/ -- GridSim and SimJava API Documentation + eduni/ + gridsim/ + examples/ -- GridSim examples, see examples/readme.txt for details + jars/ -- jar archives + source/ -- The GridSim Java source code + gridsim/*.java + gridsim/auction/*.java -- framework for the auction model + gridsim/datagrid/*.java -- framework for the Data Grids model + gridsim/filter/*.java -- filters incoming events + gridsim/index/*.java -- framework for the Grid Info Service model + gridsim/net/*.java -- framework for the network model + gridsim/resFailure/*.java -- framework for the resource failure model + gridsim/util/*.java -- includes some statistics classes. + gridsim/parallel/*.java -- includes scheduling of parallel jobs + +GridSim APIs and examples are also available on the GridSim website. + +Software Requirements : Java version 1.50 or newer +--------------------- +GridSim has been tested and run on Sun's Java version 1.5.0 or newer. Older +versions of Java are not compatible. You also need to install Ant to compile +GridSim (explained in more details later). + + +Installation and Running GridSim Toolkit +---------------------------------------- +There is no special program to install GridSim. You just need to +unzip the GridSim file to install. +If you want to remove GridSim, then remove the whole $GRIDSIM directory. + +NOTE: You do not need to compile GridSim source code. The JAR file is + provided to compile and to run GridSim applications. + +Description of the following jar files: +* gridsim.jar -- contains both GridSim and SimJava v2.0 class files +* simjava2.jar -- contains SimJava v2.0 class files only + +To compile and run GridSim applications, do the following step: +1) Go the directory where the GridSim's examples reside + In Unix or Linux: cd $GRIDSIM/examples/ + In Windows: cd %GRIDSIM%\examples\ + +2) Compile the Java source file (e.g. example01) + In Unix or Linux: javac -cp $GRIDSIM/jars/gridsim.jar:. gridsim/example01/Example1.java + In Windows: javac -cp %GRIDSIM%\jars\gridsim.jar;. gridsim\example01\Example1.java + +3) Running the Java class file + In Unix or Linux: java -cp $GRIDSIM/jars/gridsim.jar:. gridsim/example01/Example1 + In Windows: java -cp %GRIDSIM%\jars\gridsim.jar;. gridsim\example01\Example1 + +NOTE: +* $GRIDSIM or %GRIDSIM% is the location of the GridSim Toolkit package. +* Running GridSim of this version requires a lot of memory since there are many + objects to be created. Therefore, it is recommended to have at least 512MB RAM + or increase JVM heap size when running Java for large simulation experiments. + For example: java -Xmx300m -classpath $GRIDSIM/jars/gridsim.jar:. gridsim/example01/Example1 + (max. heap size is 300MB). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-05-22 05:18:58
|
Revision: 268 http://gridsim.svn.sourceforge.net/gridsim/?rev=268&view=rev Author: marcos_dias Date: 2009-05-22 05:18:22 +0000 (Fri, 22 May 2009) Log Message: ----------- Updating the documentation. I will include another readme.txt in the next commit. Removed Paths: ------------- trunk/README.txt Deleted: trunk/README.txt =================================================================== --- trunk/README.txt 2009-05-22 05:16:40 UTC (rev 267) +++ trunk/README.txt 2009-05-22 05:18:22 UTC (rev 268) @@ -1,199 +0,0 @@ - -README file -Author: Anthony Sulistio (September 2007) - - -Directory Structure of GridSim Toolkit --------------------------------------- - -$GRIDSIM/ -- the current GridSim directory (top level) - classes/ -- The GridSim class files - doc/ -- GridSim and SimJava API Documentation - eduni/ - gridsim/ - examples/ -- GridSim examples, see examples/README.txt for details - jars/ -- jar archives - source/ -- The GridSim Java source code - gridsim/*.java - gridsim/auction/*.java -- framework for the auction model - gridsim/datagrid/*.java -- framework for the Data Grids model - gridsim/filter/*.java -- filters incoming events - gridsim/index/*.java -- framework for the Grid Info Service model - gridsim/net/*.java -- framework for the network model - gridsim/resFailure/*.java -- framework for the resource failure model - gridsim/util/*.java -- includes some statistics classes. - -GridSim APIs and examples are also available on the GridSim website. -If you are looking for applications or programs built on top of GridSim, -such as gridbroker or Visual Modeler, they can be found below: -http://www.gridbus.org/gridsim/release.html - - -Software Requirements : Java version 1.50 or newer ---------------------- -GridSim has been tested and ran on Sun's Java version 1.5.0 or newer. -Older versions of Java are not compatible. -If you have non-Sun Java version, such as gcj or J++, they may not be compatible. -You also need to install Ant to compile GridSim (explained in more details later). - - -Installation and Running GridSim Toolkit ----------------------------------------- -There is no special program to install GridSim. You just need to -unzip the GridSim file to install. -If you want to remove GridSim, then remove the whole $GRIDSIM directory. - -NOTE: You do not need to compile GridSim source code. The JAR file is - provided to compile and to run GridSim applications. - -Description of the following jar files: -* gridsim.jar -- contains both GridSim and SimJava v2.0 class files -* simjava2.jar -- contains SimJava v2.0 class files only - -To compile and run GridSim applications, do the following step: -1) Go the directory where the GridSim's Example1 reside - In Unix or Linux: cd $GRIDSIM/examples/Example01 - In Windows: cd %GRIDSIM%\examples\Example01 - -2) Compile the Java source file - In Unix or Linux: javac -classpath $GRIDSIM/jars/gridsim.jar:. Example1.java - In Windows: javac -classpath %GRIDSIM%\jars\gridsim.jar;. Example1.java - -3) Running the Java class file - In Unix or Linux: java -classpath $GRIDSIM/jars/gridsim.jar:. Example1 - In Windows: java -classpath %GRIDSIM%\jars\gridsim.jar;. Example1 - -NOTE: -* $GRIDSIM or %GRIDSIM% is the location of the GridSim Toolkit package. -* If you are using Java IDEs, such as Eclipse, JBuilder and JCreator, - their instructions (with screenshots) are found on the GridSim website. -* Running GridSim of this version requires a lot of memory since there are many - objects to be created. Therefore, it is recommended to have at least 512MB RAM - or increase JVM heap size when running Java for large simulation experiments. - For example: java -Xmx300m -classpath $GRIDSIM/jars/gridsim.jar:. Example1 - (max. heap size is 300MB). - - -Learning GridSim ----------------- -To understand on how to use GridSim, please go through the examples provided -in the $GRIDSIM/examples/ directory. Example 1 - 6 are mainly for beginners, -whereas the rest describes more complex GridSim functionalities. -The same examples are also hosted in the GridSim website. - -At the moment, GridSim has two allocation policies or scheduling algorithms, -i.e. First Come First Service (as described in SpaceShared.java) and Round -Robin (as described in TimeShared.java). -If you are interested in writing a new scheduling algorithm of a resource, -then look closely on $GRIDSIM/examples/Example08/ directory. -We are certainly welcomed new additions of allocation policies into GridSim. - - -Compiling GridSim : Using Ant ------------------ -This release contains a simple buildfile for compiling GridSim classes. -You need to have ant installed (http://ant.apache.org/). -Ant can be used in both Windows and Unix/Linux environment. - -Usage: -* type 'ant' to compile all gridsim source files and put them into - classes/ directory -* type 'ant makejar' to compile the source files (if necessary) and to create - a new jar file called "new_gridsim.jar" into jars/ directory. - The "new_gridsim.jar" however only contains GridSim classes not SimJava2. - -NOTE: -* You need to set up PATH for ant in Windows and/or Unix. -* rule for javadoc is not included yet. Use javadoc.sh script on Unix instead. - Alternatively, the GridSim API can be found below: - http://www.gridbus.org/gridsim/doc/ - - -Contacting Us : subscribe to Mailing Lists at SourceForge.net -------------- -Please read FAQ, examples, API and other documents in the GridSim website -before contacting us. - -GridSim mailing lists can be found below: -http://sourceforge.net/projects/gridsim/ then click on the "Mailing Lists" tab. - - -Please subscribe to the following mailing lists: -* For general queries and feedbacks: - gridsim-users (at) lists.sourceforge.net - -* For contributing to GridSim or questions related to the existing GridSim code: - gridsim-developers (at) lists.sourceforge.net - - -To subscribe, go to - https://lists.sourceforge.net/lists/listinfo/gridsim-users - https://lists.sourceforge.net/lists/listinfo/gridsim-developers - - -Contributors are always needed to improve and maintain GridSim. -Another option is to integrate your work/project into future GridSim releases. -If you want to contribute, advertise yourself to us. -Benefits of your contributions: -- you help future Grid researchers and students like you and us; -- you can proudly write your contributions in the resume or CV; -- you gain knowledge and skills in using SVN version control, Java, and OO; and -- more importantly, you are dealing with a real software engineering development - and working with collaborators or developers from other parts of the world - (at the moment, they are from "down under"). - You can not get this kind of unique experience by doing it yourself or - in university assignments or projects. - -NOTE: -* If you experience some problems when compiling/running GridSim, - write a detailed email. The more information you provide, the better - we analyze your problem. Hence, the sooner we can reply. -* Please send your questions to these mailing lists so that other people can - read and reply them. -* Please only send to one of the mailing lists. -* We have hectic schedules, so do not expect an instant reply. - - -Bugs Reporting --------------- -If you found any bugs, please report them to: -http://sourceforge.net/projects/gridsim/ then click on the "Tracker" tab. - -To prevent any false reports, it is recommended that you email us first on -gridsim-developers (at) lists.sourceforge.net -to identify whether the problem is caused by bugs in the GridSim code -or something else, such as using Java version 1.3. - -Please be specific when you report a bug. We need information such as -GridSim version number, Java version number, detailed descriptions, -snippets of the (buggy) code and any exception errors. -A 'nobody' report in the tracker will probably be ignored. - - -Requesting New Features ------------------------ -If you decide to implement any new features, we will try our best to help you -with directions on where to start and how to design and implement without -breaking the existing design and code respectively. - - -Acknowledgement ---------------- - -For their outstanding contributions to GridSim : -* Agustin Caminero from The University of Castilla La Mancha, Spain - for his work on the gridsim.resFailure package. - -* Uros Cibej from The University of Ljubljana, Slovenia - for providing build.xml file and instruction on how to - use ant. In addition, he worked on the gridsim.datagrid package. - -* Gokul Poduval from National University of Singapore - for his work on the gridsim.net package. - -* Marcos Dias de Assuncao from Grids Lab, The University of Melbourne, Australia - for his work on the gridsim.auction package - -We also thank the following people for finding bugs in GridSim : -Gokul Poduval, Uros Cibej, Agustin Caminero, Sai Rahul Reddy, Jakub Milkiewicz, -Mads Mbuso Sibeko, Felipe Ramos. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-05-22 05:16:50
|
Revision: 267 http://gridsim.svn.sourceforge.net/gridsim/?rev=267&view=rev Author: marcos_dias Date: 2009-05-22 05:16:40 +0000 (Fri, 22 May 2009) Log Message: ----------- Changes in the documentation of some classes and examples. Modified Paths: -------------- trunk/examples/ResFailure/example01/ResFailureEx01.java trunk/examples/ResFailure/example01/readme.txt trunk/examples/ResFailure/example02/ResFailureEx02.java trunk/examples/ResFailure/example02/readme.txt trunk/examples/ResFailure/example03/ResFailureEx03.java trunk/examples/ResFailure/example03/readme.txt trunk/examples/WorkloadTrace/example01/TraceEx01.java trunk/examples/WorkloadTrace/example01/readme.txt trunk/examples/WorkloadTrace/example02/TraceEx02.java trunk/examples/WorkloadTrace/example02/readme.txt trunk/examples/WorkloadTrace/example03/TraceEx03.java trunk/examples/WorkloadTrace/example03/readme.txt trunk/examples/auction/example01/ExampleAuction.java trunk/examples/auction/example02/ExampleAuction.java trunk/examples/auction/example03/ExampleAuction.java trunk/examples/datagrid/example01/DataExample1.java trunk/examples/datagrid/example02/DataExample2.java trunk/examples/datagrid/example03/DataGridletExample.java trunk/examples/datagrid/example04/readme.txt trunk/examples/gridsim/example01/Example1.java trunk/examples/gridsim/example03/readme.txt trunk/examples/gridsim/example04/Example4.java trunk/examples/gridsim/example04/readme.txt trunk/examples/gridsim/example05/Example5.java trunk/examples/gridsim/example05/readme.txt trunk/examples/gridsim/example06/Example6.java trunk/examples/gridsim/example06/readme.txt trunk/examples/gridsim/example07/Test.java trunk/examples/gridsim/example07/readme.txt trunk/examples/gridsim/example08/Example8.java trunk/examples/gridsim/example09/Example9.java trunk/examples/gridsim/example10/Example10.java trunk/examples/gridsim/example10/readme.txt trunk/examples/gridsim/regionalGIS/ExampleGIS.java trunk/examples/gridsim/regionalGIS/readme.txt trunk/examples/network/FiniteBuffer/mainExample.java trunk/examples/network/FiniteBuffer/readme.txt trunk/examples/network/example02/NetEx02.java trunk/examples/network/example03/NetEx03.java trunk/examples/network/flow/example02/FlowNetEx02.java trunk/examples/network/rate/RateExample.java trunk/examples/network/scfq/SCFQExample.java trunk/examples/network/scfq/readme.txt trunk/examples/readme.txt trunk/faq.txt trunk/jars/simjava2.jar trunk/javadoc.sh trunk/source/gridsim/ARSimpleSpaceShared.java trunk/source/gridsim/AdvanceReservation.java trunk/source/gridsim/Gridlet.java trunk/source/gridsim/GridletList.java trunk/source/gridsim/ResGridlet.java trunk/source/gridsim/SpaceShared.java trunk/source/gridsim/Stat.java trunk/source/gridsim/TimeShared.java trunk/source/gridsim/datagrid/FileAttribute.java trunk/source/gridsim/net/Input.java trunk/source/gridsim/net/NetIO.java trunk/source/gridsim/net/Output.java trunk/source/gridsim/net/flow/FlowInput.java trunk/source/gridsim/net/flow/FlowOutput.java trunk/source/gridsim/net/fnb/FnbNetworkReader.java trunk/source/gridsim/net/fnb/firstLastPacketsGridlet.java trunk/source/gridsim/resFailure/AllocPolicyWithFailure.java trunk/source/gridsim/resFailure/SpaceSharedWithFailure.java trunk/source/gridsim/resFailure/TimeSharedWithFailure.java trunk/source/gridsim/util/HyperExponential.java trunk/source/gridsim/util/LCGRandom.java trunk/source/gridsim/util/NetworkReader.java trunk/source/gridsim/util/Poisson.java trunk/source/gridsim/util/SimReport.java trunk/source/gridsim/util/TrafficGenerator.java trunk/source/gridsim/util/Variate.java trunk/source/gridsim/util/Weibull.java Added Paths: ----------- trunk/source/gridsim/net/fnb/GridletPackets.java Removed Paths: ------------- trunk/examples/datagrid/example01/readme.txt trunk/examples/datagrid/example02/readme.txt trunk/examples/datagrid/example03/readme.txt trunk/examples/gridsim/example01/readme.txt trunk/examples/gridsim/example08/readme.txt trunk/examples/gridsim/example09/readme.txt trunk/examples/network/example01/readme.txt trunk/examples/network/example02/readme.txt trunk/examples/network/example03/readme.txt trunk/examples/network/flow/example01/readme.txt trunk/examples/network/flow/example02/readme.txt trunk/examples/network/rate/readme.txt Modified: trunk/examples/ResFailure/example01/ResFailureEx01.java =================================================================== --- trunk/examples/ResFailure/example01/ResFailureEx01.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/ResFailure/example01/ResFailureEx01.java 2009-05-22 05:16:40 UTC (rev 267) @@ -257,24 +257,11 @@ MachineList mList = new MachineList(); for (int i = 0; i < totalMachine; i++) { - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList = new PEList(); - - // 3. Create PEs and add these into an object of PEList. - for (int k = 0; k < totalPE; k++) - { - // need to store PE id and MIPS Rating - peList.add( new PE(k, rating) ); - } - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(i, peList) ); + // 2. Create one Machine with its id, number of PEs and rating + mList.add( new Machine(i, totalPE, rating)); } - - // 5. Create a ResourceCharacteristics object that stores the + // 3. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -296,7 +283,7 @@ arch, os, mList, scheduling_alg, time_zone, cost); - // 6. Finally, we need to create a GridResource object. + // 4. Finally, we need to create a GridResource object. long seed = 11L*13*17*19*23+1; double peakLoad = 0.0; // the resource load during peak hour double offPeakLoad = 0.0; // the resource load during off-peak hr Modified: trunk/examples/ResFailure/example01/readme.txt =================================================================== --- trunk/examples/ResFailure/example01/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/ResFailure/example01/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -30,16 +30,6 @@ When running the example file, it will produce the following files: - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - Ex01_Regional_GIS -> contains one line describing each registering/removing an event that takes place at the GIS. Resources register in the begining of simulations, and after recovering from a Modified: trunk/examples/ResFailure/example02/ResFailureEx02.java =================================================================== --- trunk/examples/ResFailure/example02/ResFailureEx02.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/ResFailure/example02/ResFailureEx02.java 2009-05-22 05:16:40 UTC (rev 267) @@ -265,24 +265,11 @@ MachineList mList = new MachineList(); for (int i = 0; i < totalMachine; i++) { - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList = new PEList(); - - // 3. Create PEs and add these into an object of PEList. - for (int k = 0; k < totalPE; k++) - { - // need to store PE id and MIPS Rating - peList.add( new PE(k, rating) ); - } - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(i, peList) ); + // 2. Create one Machine with its id, number of PEs and rating + mList.add( new Machine(i, totalPE, rating)); } - - // 5. Create a ResourceCharacteristics object that stores the + // 3. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -304,7 +291,7 @@ arch, os, mList, scheduling_alg, time_zone, cost); - // 6. Finally, we need to create a GridResource object. + // 4. Finally, we need to create a GridResource object. long seed = 11L*13*17*19*23+1; double peakLoad = 0.0; // the resource load during peak hour double offPeakLoad = 0.0; // the resource load during off-peak hr Modified: trunk/examples/ResFailure/example02/readme.txt =================================================================== --- trunk/examples/ResFailure/example02/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/ResFailure/example02/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -29,16 +29,6 @@ When running the example file, it will produce the following files: - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - Ex02_Regional_GIS -> contains one line describing each registering/removing an event that takes place at the GIS. Resources register in the begining of simulations, and after recovering from a Modified: trunk/examples/ResFailure/example03/ResFailureEx03.java =================================================================== --- trunk/examples/ResFailure/example03/ResFailureEx03.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/ResFailure/example03/ResFailureEx03.java 2009-05-22 05:16:40 UTC (rev 267) @@ -311,24 +311,11 @@ MachineList mList = new MachineList(); for (int i = 0; i < totalMachine; i++) { - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList = new PEList(); - - // 3. Create PEs and add these into an object of PEList. - for (int k = 0; k < totalPE; k++) - { - // need to store PE id and MIPS Rating - peList.add( new PE(k, rating) ); - } - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(i, peList) ); + // 2. Create one Machine with its id, number of PEs and rating + mList.add( new Machine(i, totalPE, rating)); } - - // 5. Create a ResourceCharacteristics object that stores the + // 3. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -350,7 +337,7 @@ arch, os, mList, scheduling_alg, time_zone, cost); - // 6. Finally, we need to create a GridResource object. + // 4. Finally, we need to create a GridResource object. long seed = 11L*13*17*19*23+1; double peakLoad = 0.0; // the resource load during peak hour double offPeakLoad = 0.0; // the resource load during off-peak hr Modified: trunk/examples/ResFailure/example03/readme.txt =================================================================== --- trunk/examples/ResFailure/example03/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/ResFailure/example03/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -29,16 +29,6 @@ When running the example file, it will produce the following files: - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - Ex03_Regional_GIS_0, ..., Ex03_Regional_GIS_2 -> contains one line describing each registering/removing an event that takes place at the GIS. Resources register in the begining of simulations, and after recovering from a Modified: trunk/examples/WorkloadTrace/example01/TraceEx01.java =================================================================== --- trunk/examples/WorkloadTrace/example01/TraceEx01.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/WorkloadTrace/example01/TraceEx01.java 2009-05-22 05:16:40 UTC (rev 267) @@ -168,27 +168,12 @@ int rating = peRating; for (int i = 0; i < totalMachine; i++) { - ////////////////////////////////////////// - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList = new PEList(); - - ////////////////////////////////////////// - // 3. Create PEs and add these into an object of PEList. - for (int k = 0; k < totalPE; k++) - { - // need to store PE id and MIPS Rating - peList.add( new PE(k, rating) ); - } - - ////////////////////////////////////////// - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(i, peList) ); + // 2. Create one Machine with its id, number of PEs and rating + mList.add( new Machine(i, totalPE, rating)); } ////////////////////////////////////////// - // 5. Create a ResourceCharacteristics object that stores the + // 3. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -202,7 +187,7 @@ time_zone, cost); ////////////////////////////////////////// - // 6. Finally, we need to create a GridResource object. + // 4. Finally, we need to create a GridResource object. double baud_rate = 10000.0; // communication speed long seed = 11L*13*17*19*23+1; double peakLoad = 0.0; // the resource load during peak hour Modified: trunk/examples/WorkloadTrace/example01/readme.txt =================================================================== --- trunk/examples/WorkloadTrace/example01/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/WorkloadTrace/example01/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -27,20 +27,5 @@ TimeShared and SpaceShared, only process 1 PE for each Gridlet. You are welcome to write your own scheduler that incorporates this QoS (Quality of Service) requirement. - -When running the example file, it will produce the following files: - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - -NOTE: sim_trace and sim_report will be overwritten if running - a new experiment. - Modified: trunk/examples/WorkloadTrace/example02/TraceEx02.java =================================================================== --- trunk/examples/WorkloadTrace/example02/TraceEx02.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/WorkloadTrace/example02/TraceEx02.java 2009-05-22 05:16:40 UTC (rev 267) @@ -195,27 +195,12 @@ int rating = peRating; for (int i = 0; i < totalMachine; i++) { - ////////////////////////////////////////// - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList = new PEList(); - - ////////////////////////////////////////// - // 3. Create PEs and add these into an object of PEList. - for (int k = 0; k < totalPE; k++) - { - // need to store PE id and MIPS Rating - peList.add( new PE(k, rating) ); - } - - ////////////////////////////////////////// - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(i, peList) ); + // 2. Create one Machine with its id, number of PEs and rating + mList.add( new Machine(i, totalPE, rating)); } ////////////////////////////////////////// - // 5. Create a ResourceCharacteristics object that stores the + // 3. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -229,7 +214,7 @@ time_zone, cost); ////////////////////////////////////////// - // 6. Finally, we need to create a GridResource object. + // 4. Finally, we need to create a GridResource object. double baud_rate = 10000.0; // communication speed long seed = 11L*13*17*19*23+1; double peakLoad = 0.0; // the resource load during peak hour Modified: trunk/examples/WorkloadTrace/example02/readme.txt =================================================================== --- trunk/examples/WorkloadTrace/example02/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/WorkloadTrace/example02/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -29,19 +29,3 @@ You are welcome to write your own scheduler that incorporates this QoS (Quality of Service) requirement. - -When running the example file, it will produce the following files: - - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - -NOTE: sim_trace and sim_report will be overwritten if running - a new experiment. - Modified: trunk/examples/WorkloadTrace/example03/TraceEx03.java =================================================================== --- trunk/examples/WorkloadTrace/example03/TraceEx03.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/WorkloadTrace/example03/TraceEx03.java 2009-05-22 05:16:40 UTC (rev 267) @@ -285,63 +285,25 @@ // 1. We need to create an object of MachineList to store one or more // Machines MachineList mList = new MachineList(); - //System.out.println("Creates a Machine list"); + // 2. Create one Machine with its id, number of PEs and MIPS rating per PE + // In this example, we are using a resource from + // hpc420.hpcc.jp, AIST, Tokyo, Japan + // Note: these data are taken the from GridSim paper, page 25. + // In this example, all PEs has the same MIPS (Millions + // Instruction Per Second) Rating for a Machine. + int mipsRating = 377; + mList.add( new Machine(0, 4, mipsRating)); // First Machine - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList1 = new PEList(); - //System.out.println("Creates a PE list for the 1st Machine"); - - - // 3. Create PEs and add these into an object of PEList. - peList1.add( new PE(0,rating) ); // need to store PE id and MIPS Rating - peList1.add( new PE(1,rating) ); - peList1.add( new PE(2,rating) ); - peList1.add( new PE(3,rating) ); - //System.out.println("Creates 4 PEs with same MIPS Rating and put them"+ - // " into the PE list"); - - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(0, peList1) ); // First Machine - //System.out.println("Creates the 1st Machine that has 4 PEs and " + - // "stores it into the Machine list"); - //System.out.println(); - - // 5. Repeat the process from 2 if we want to create more Machines + // 3. Repeat the process from 2 if we want to create more Machines + // In this example, the AIST in Japan has 3 Machines with same + // MIPS Rating but different PEs. // NOTE: if you only want to create one Machine for one Grid resource, // then you could skip this step. - PEList peList2 = new PEList(); - //System.out.println("Creates a PE list for the 2nd Machine"); + mList.add( new Machine(1, 4, mipsRating)); // Second Machine + mList.add( new Machine(2, 2, mipsRating)); // Third Machine - peList2.add( new PE(0, rating) ); - peList2.add( new PE(1, rating) ); - peList2.add( new PE(2, rating) ); - peList2.add( new PE(3, rating) ); - //System.out.println("Creates 4 PEs with same MIPS Rating and put them"+ - // " into the PE list"); - - mList.add( new Machine(1, peList2) ); // Second Machine - //System.out.println("Creates the 2nd Machine that has 4 PEs and " + - // "stores it into the Machine list"); - //System.out.println(); - - PEList peList3 = new PEList(); - //System.out.println("Creates a PE list for the 3rd Machine"); - - peList3.add( new PE(0, rating) ); - peList3.add( new PE(1, rating) ); - //System.out.println("Creates 2 PEs with same MIPS Rating and put them"+ - // " into the PE list"); - - mList.add( new Machine(2, peList3) ); // Third Machine - //System.out.println("Creates the 3rd Machine that has 2 PEs and " + - // "stores it into the Machine list"); - //System.out.println(); - - // 6. Create a ResourceCharacteristics object that stores the + // 4. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -357,7 +319,7 @@ //System.out.println("Creates the properties of a Grid resource and " + // "stores the Machine list"); - // 7. Finally, we need to create a GridResource object. + // 5. Finally, we need to create a GridResource object. long seed = 11L*13*17*19*23+1; double peakLoad = 0.0; // the resource load during peak hour double offPeakLoad = 0.0; // the resource load during off-peak hr Modified: trunk/examples/WorkloadTrace/example03/readme.txt =================================================================== --- trunk/examples/WorkloadTrace/example03/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/WorkloadTrace/example03/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -28,20 +28,5 @@ TimeShared and SpaceShared, only process 1 PE for each Gridlet. You are welcome to write your own scheduler that incorporates this QoS (Quality of Service) requirement. - + -When running the example file, it will produce the following files: - - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - -NOTE: sim_trace and sim_report will be overwritten if running - a new experiment. - Modified: trunk/examples/auction/example01/ExampleAuction.java =================================================================== --- trunk/examples/auction/example01/ExampleAuction.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/auction/example01/ExampleAuction.java 2009-05-22 05:16:40 UTC (rev 267) @@ -143,15 +143,9 @@ // Object of MachineList to store one or more Machines MachineList mList = new MachineList(); - // A Machine contains one or more PEs or CPUs. - PEList peList = new PEList(); + // Create one Machine with its id, number of PEs and MIPS rating + mList.add( new Machine(0, 1, 500) ); - // Create PEs and add these into an object of PEList. - peList.add( new PE(0, 500) ); // need to store PE id and MIPS Rating - - // Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(0, peList) ); - // Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone and @@ -171,10 +165,10 @@ double offPeakLoad = 0.0; double holidayLoad = 0.0; - LinkedList weekends = new LinkedList(); + LinkedList<Integer> weekends = new LinkedList<Integer>(); weekends.add(new Integer(Calendar.SATURDAY)); weekends.add(new Integer(Calendar.SUNDAY)); - LinkedList holidays = new LinkedList(); + LinkedList<Integer> holidays = new LinkedList<Integer>(); ResourceCalendar calendar = new ResourceCalendar(time_zone, peakLoad, offPeakLoad, holidayLoad, weekends, holidays, seed); Modified: trunk/examples/auction/example02/ExampleAuction.java =================================================================== --- trunk/examples/auction/example02/ExampleAuction.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/auction/example02/ExampleAuction.java 2009-05-22 05:16:40 UTC (rev 267) @@ -67,68 +67,14 @@ MachineList mList = new MachineList(); //System.out.println("Creates a Machine list"); + // 2. Create a Machine with id, number of PEs and MIPS rating per PE + mList.add( new Machine(0, 4, mips)); // First Machine - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList1 = new PEList(); - //System.out.println("Creates a PE list for the 1st Machine"); + // 3. Repeat the process from 2 if we want to create more Machines + mList.add( new Machine(1, 4, mips)); // Second Machine + mList.add( new Machine(2, 2, mips)); // Third Machine - - // 3. Create PEs and add these into an object of PEList. - // In this example, we are using a resource from - // hpc420.hpcc.jp, AIST, Tokyo, Japan - // Note: these data are taken the from GridSim paper, page 25. - // In this example, all PEs has the same MIPS (Millions - // Instruction Per Second) Rating for a Machine. - peList1.add( new PE(0, mips) ); // need to store PE id and MIPS Rating - peList1.add( new PE(1, mips) ); - peList1.add( new PE(2, mips) ); - peList1.add( new PE(3, mips) ); - //System.out.println("Creates 4 PEs with same MIPS Rating and put them"+ - // " into the PE list"); - - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(0, peList1) ); // First Machine - //System.out.println("Creates the 1st Machine that has 4 PEs and " + - // "stores it into the Machine list"); - //System.out.println(); - - // 5. Repeat the process from 2 if we want to create more Machines - // In this example, the AIST in Japan has 3 Machines with same - // MIPS Rating but different PEs. - // NOTE: if you only want to create one Machine for one Grid resource, - // then you could skip this step. - PEList peList2 = new PEList(); - //System.out.println("Creates a PE list for the 2nd Machine"); - - peList2.add( new PE(0, mips) ); - peList2.add( new PE(1, mips) ); - peList2.add( new PE(2, mips) ); - peList2.add( new PE(3, mips) ); - //System.out.println("Creates 4 PEs with same MIPS Rating and put them"+ - // " into the PE list"); - - mList.add( new Machine(1, peList2) ); // Second Machine - //System.out.println("Creates the 2nd Machine that has 4 PEs and " + - // "stores it into the Machine list"); - //System.out.println(); - - PEList peList3 = new PEList(); - //System.out.println("Creates a PE list for the 3rd Machine"); - - peList3.add( new PE(0, mips) ); - peList3.add( new PE(1, mips) ); - //System.out.println("Creates 2 PEs with same MIPS Rating and put them"+ - // " into the PE list"); - - mList.add( new Machine(2, peList3) ); // Third Machine - //System.out.println("Creates the 3rd Machine that has 2 PEs and " + - // "stores it into the Machine list"); - //System.out.println(); - - // 6. Create a ResourceCharacteristics object that stores the + // 4. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -140,10 +86,7 @@ arch, os, mList, ResourceCharacteristics.TIME_SHARED, time_zone, cost); - //System.out.println("Creates the properties of a Grid resource and " + - // "stores the Machine list"); - - // 7. Finally, we need to create a GridResource object. + // 5. Finally, we need to create a GridResource object. long seed = 11L*13*17*19*23+1; double peakLoad = 0.0; // the resource load during peak hour double offPeakLoad = 0.0; // the resource load during off-peak hr @@ -230,11 +173,6 @@ Broker broker = new Broker("Broker_" + i, baud_rate, propDelay, mtu); - // if trace_flag is set to "true", then this experiment will - // create User_i.csv where i = 0 ... (num_user-1) -// NetUser user = new NetUser(name, num_gridlet, -// broker.getLink(), broker); - NetUser user = new NetUser("User_" + i, num_gridlet, baud_rate, propDelay, mtu, broker); Modified: trunk/examples/auction/example03/ExampleAuction.java =================================================================== --- trunk/examples/auction/example03/ExampleAuction.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/auction/example03/ExampleAuction.java 2009-05-22 05:16:40 UTC (rev 267) @@ -67,68 +67,14 @@ MachineList mList = new MachineList(); //System.out.println("Creates a Machine list"); + // 2. Create a Machine with id, number of PEs and MIPS rating per PE + mList.add( new Machine(0, 4, mips)); // First Machine - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList1 = new PEList(); - //System.out.println("Creates a PE list for the 1st Machine"); + // 3. Repeat the process from 2 if we want to create more Machines + mList.add( new Machine(1, 4, mips)); // Second Machine + mList.add( new Machine(2, 2, mips)); // Third Machine - - // 3. Create PEs and add these into an object of PEList. - // In this example, we are using a resource from - // hpc420.hpcc.jp, AIST, Tokyo, Japan - // Note: these data are taken the from GridSim paper, page 25. - // In this example, all PEs has the same MIPS (Millions - // Instruction Per Second) Rating for a Machine. - peList1.add( new PE(0, mips) ); // need to store PE id and MIPS Rating - peList1.add( new PE(1, mips) ); - peList1.add( new PE(2, mips) ); - peList1.add( new PE(3, mips) ); - //System.out.println("Creates 4 PEs with same MIPS Rating and put them"+ - // " into the PE list"); - - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(0, peList1) ); // First Machine - //System.out.println("Creates the 1st Machine that has 4 PEs and " + - // "stores it into the Machine list"); - //System.out.println(); - - // 5. Repeat the process from 2 if we want to create more Machines - // In this example, the AIST in Japan has 3 Machines with same - // MIPS Rating but different PEs. - // NOTE: if you only want to create one Machine for one Grid resource, - // then you could skip this step. - PEList peList2 = new PEList(); - //System.out.println("Creates a PE list for the 2nd Machine"); - - peList2.add( new PE(0, mips) ); - peList2.add( new PE(1, mips) ); - peList2.add( new PE(2, mips) ); - peList2.add( new PE(3, mips) ); - //System.out.println("Creates 4 PEs with same MIPS Rating and put them"+ - // " into the PE list"); - - mList.add( new Machine(1, peList2) ); // Second Machine - //System.out.println("Creates the 2nd Machine that has 4 PEs and " + - // "stores it into the Machine list"); - //System.out.println(); - - PEList peList3 = new PEList(); - //System.out.println("Creates a PE list for the 3rd Machine"); - - peList3.add( new PE(0, mips) ); - peList3.add( new PE(1, mips) ); - //System.out.println("Creates 2 PEs with same MIPS Rating and put them"+ - // " into the PE list"); - - mList.add( new Machine(2, peList3) ); // Third Machine - //System.out.println("Creates the 3rd Machine that has 2 PEs and " + - // "stores it into the Machine list"); - //System.out.println(); - - // 6. Create a ResourceCharacteristics object that stores the + // 4. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -143,7 +89,7 @@ //System.out.println("Creates the properties of a Grid resource and " + // "stores the Machine list"); - // 7. Finally, we need to create a GridResource object. + // 5. Finally, we need to create a GridResource object. long seed = 11L*13*17*19*23+1; double peakLoad = 0.0; // the resource load during peak hour double offPeakLoad = 0.0; // the resource load during off-peak hr Modified: trunk/examples/datagrid/example01/DataExample1.java =================================================================== --- trunk/examples/datagrid/example01/DataExample1.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/datagrid/example01/DataExample1.java 2009-05-22 05:16:40 UTC (rev 267) @@ -146,50 +146,18 @@ MachineList mList = new MachineList(); //System.out.println("Creates a Machine list"); - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList1 = new PEList(); - //System.out.println("Creates a PE list for the 1st Machine"); + // 2. Create a Machine with id, number of PEs and MIPS rating per PE + mList.add(new Machine(0, 4, 377)); // First Machine - // 3. Create PEs and add these into an object of PEList. - // In this example, we are using a resource from - // hpc420.hpcc.jp, AIST, Tokyo, Japan - // Note: these data are taken the from GridSim paper, page 25. - // In this example, all PEs has the same MIPS (Millions - // Instruction Per Second) Rating for a Machine. - peList1.add(new PE(0, 377)); // need to store PE id and MIPS Rating - peList1.add(new PE(1, 377)); - peList1.add(new PE(2, 377)); - peList1.add(new PE(3, 377)); - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add(new Machine(0, peList1)); // First Machine - - // 5. Repeat the process from 2 if we want to create more Machines + // 3. Repeat the process from 2 if we want to create more Machines // In this example, the AIST in Japan has 3 Machines with same // MIPS Rating but different PEs. // NOTE: if you only want to create one Machine for one Grid resource, // then you could skip this step. - PEList peList2 = new PEList(); + mList.add(new Machine(1, 4, 377)); // Second Machine + mList.add(new Machine(2, 2, 377)); // Third Machine - peList2.add(new PE(0, 377)); - peList2.add(new PE(1, 377)); - peList2.add(new PE(2, 377)); - peList2.add(new PE(3, 377)); - - mList.add(new Machine(1, peList2)); // Second Machine - - PEList peList3 = new PEList(); - - peList3.add(new PE(0, 377)); - peList3.add(new PE(1, 377)); - - - mList.add(new Machine(2, peList3)); // Third Machine - - - // 6. Create a ResourceCharacteristics object that stores the + // 4. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -202,7 +170,7 @@ os, mList, ResourceCharacteristics.TIME_SHARED, time_zone, cost); - // 7. Finally, we need to create a GridResource object. + // 5. Finally, we need to create a GridResource object. long seed = 11L * 13 * 17 * 19 * 23 + 1; double peakLoad = 0.0; // the resource load during peak hour double offPeakLoad = 0.0; // the resource load during off-peak hr Deleted: trunk/examples/datagrid/example01/readme.txt =================================================================== --- trunk/examples/datagrid/example01/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/datagrid/example01/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -1,22 +0,0 @@ -/** - * Author: Anthony Sulistio - * Date: March 2006 - */ - -NOTE: When you open "output.txt" file, it tells you that grid user entities - sending Gridlets to a selected grid resource. - -When running the example file, it will produce the following files: - - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - -NOTE: sim_trace and sim_report file will be overwritten if running - a new experiment. Modified: trunk/examples/datagrid/example02/DataExample2.java =================================================================== --- trunk/examples/datagrid/example02/DataExample2.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/datagrid/example02/DataExample2.java 2009-05-22 05:16:40 UTC (rev 267) @@ -136,51 +136,22 @@ // Here are the steps needed to create a Grid resource: // 1. We need to create an object of MachineList to store one or more - // Machines + // Machines MachineList mList = new MachineList(); + //System.out.println("Creates a Machine list"); - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList1 = new PEList(); + // 2. Create a Machine with id, number of PEs and MIPS rating per PE + mList.add(new Machine(0, 4, 377)); // First Machine - // 3. Create PEs and add these into an object of PEList. - // In this example, we are using a resource from - // hpc420.hpcc.jp, AIST, Tokyo, Japan - // Note: these data are taken the from GridSim paper, page 25. - // In this example, all PEs has the same MIPS (Millions - // Instruction Per Second) Rating for a Machine. - peList1.add(new PE(0, 377)); // need to store PE id and MIPS Rating - peList1.add(new PE(1, 377)); - peList1.add(new PE(2, 377)); - peList1.add(new PE(3, 377)); - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add(new Machine(0, peList1)); // First Machine - - // 5. Repeat the process from 2 if we want to create more Machines - // In this example, the AIST in Japan has 3 Machines with same - // MIPS Rating but different PEs. + // 3. Repeat the process from 2 if we want to create more Machines + // In this example, the AIST in Japan has 3 Machines with same + // MIPS Rating but different PEs. // NOTE: if you only want to create one Machine for one Grid resource, - // then you could skip this step. - PEList peList2 = new PEList(); + // then you could skip this step. + mList.add(new Machine(1, 4, 377)); // Second Machine + mList.add(new Machine(2, 2, 377)); // Third Machine - peList2.add(new PE(0, 377)); - peList2.add(new PE(1, 377)); - peList2.add(new PE(2, 377)); - peList2.add(new PE(3, 377)); - - mList.add(new Machine(1, peList2)); // Second Machine - - PEList peList3 = new PEList(); - // System.out.println("Creates a PE list for the 3rd Machine"); - - peList3.add(new PE(0, 377)); - peList3.add(new PE(1, 377)); - - mList.add(new Machine(2, peList3)); // Third Machine - - // 6. Create a ResourceCharacteristics object that stores the + // 4. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -195,7 +166,7 @@ // System.out.println("Creates the properties of a Grid resource and " + // "stores the Machine list"); - // 7. Finally, we need to create a GridResource object. + // 5. Finally, we need to create a GridResource object. long seed = 11L * 13 * 17 * 19 * 23 + 1; double peakLoad = 0.0; // the resource load during peak hour double offPeakLoad = 0.0; // the resource load during off-peak hr Deleted: trunk/examples/datagrid/example02/readme.txt =================================================================== --- trunk/examples/datagrid/example02/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/datagrid/example02/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -1,22 +0,0 @@ -/** - * Author: Anthony Sulistio - * Date: March 2006 - */ - -NOTE: When you open "output.txt" file, it tells you that grid user entities - sending Gridlets to a selected grid resource. - -When running the example file, it will produce the following files: - - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - -NOTE: sim_trace and sim_report file will be overwritten if running - a new experiment. Modified: trunk/examples/datagrid/example03/DataGridletExample.java =================================================================== --- trunk/examples/datagrid/example03/DataGridletExample.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/datagrid/example03/DataGridletExample.java 2009-05-22 05:16:40 UTC (rev 267) @@ -140,51 +140,22 @@ // Here are the steps needed to create a Grid resource: // 1. We need to create an object of MachineList to store one or more - // Machines + // Machines MachineList mList = new MachineList(); + //System.out.println("Creates a Machine list"); - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList1 = new PEList(); + // 2. Create a Machine with id, number of PEs and MIPS rating per PE + mList.add(new Machine(0, 4, 377)); // First Machine - // 3. Create PEs and add these into an object of PEList. - // In this example, we are using a resource from - // hpc420.hpcc.jp, AIST, Tokyo, Japan - // Note: these data are taken the from GridSim paper, page 25. - // In this example, all PEs has the same MIPS (Millions - // Instruction Per Second) Rating for a Machine. - peList1.add(new PE(0, 377)); // need to store PE id and MIPS Rating - peList1.add(new PE(1, 377)); - peList1.add(new PE(2, 377)); - peList1.add(new PE(3, 377)); - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add(new Machine(0, peList1)); // First Machine - - // 5. Repeat the process from 2 if we want to create more Machines - // In this example, the AIST in Japan has 3 Machines with same - // MIPS Rating but different PEs. + // 3. Repeat the process from 2 if we want to create more Machines + // In this example, the AIST in Japan has 3 Machines with same + // MIPS Rating but different PEs. // NOTE: if you only want to create one Machine for one Grid resource, - // then you could skip this step. - PEList peList2 = new PEList(); + // then you could skip this step. + mList.add(new Machine(1, 4, 377)); // Second Machine + mList.add(new Machine(2, 2, 377)); // Third Machine - peList2.add(new PE(0, 377)); - peList2.add(new PE(1, 377)); - peList2.add(new PE(2, 377)); - peList2.add(new PE(3, 377)); - - mList.add(new Machine(1, peList2)); // Second Machine - - PEList peList3 = new PEList(); - // System.out.println("Creates a PE list for the 3rd Machine"); - - peList3.add(new PE(0, 377)); - peList3.add(new PE(1, 377)); - - mList.add(new Machine(2, peList3)); // Third Machine - - // 6. Create a ResourceCharacteristics object that stores the + // 4. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -199,7 +170,7 @@ // System.out.println("Creates the properties of a Grid resource and " + // "stores the Machine list"); - // 7. Finally, we need to create a GridResource object. + // 5. Finally, we need to create a GridResource object. long seed = 11L * 13 * 17 * 19 * 23 + 1; double peakLoad = 0.0; // the resource load during peak hour double offPeakLoad = 0.0; // the resource load during off-peak hr Deleted: trunk/examples/datagrid/example03/readme.txt =================================================================== --- trunk/examples/datagrid/example03/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/datagrid/example03/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -1,23 +0,0 @@ -/** - * Author: Anthony Sulistio - * Date: March 2006 - */ - -NOTE: When you open "output.txt" file, it tells you that grid user entities - sending Gridlets to a selected grid resource. - - -When running the example file, it will produce the following files: - - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - -NOTE: sim_trace and sim_report file will be overwritten if running - a new experiment. Modified: trunk/examples/datagrid/example04/readme.txt =================================================================== --- trunk/examples/datagrid/example04/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/datagrid/example04/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -14,22 +14,3 @@ Each of these two users must execute a small set of tasks. A more detailed description of this package can be found in the tutorial. - -NOTE: When you open "output.txt" file, it tells you that grid user entities - sending Gridlets to a selected grid resource. - - -When running the example file, it will produce the following files: - - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - -NOTE: sim_trace and sim_report file will be overwritten if running - a new experiment. Modified: trunk/examples/gridsim/example01/Example1.java =================================================================== --- trunk/examples/gridsim/example01/Example1.java 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/gridsim/example01/Example1.java 2009-05-22 05:16:40 UTC (rev 267) @@ -12,7 +12,9 @@ * $Id: Example1.java,v 1.6 2004/05/29 05:24:00 anthony Exp $ */ -import java.util.*; +import java.util.Calendar; +import java.util.LinkedList; + import gridsim.*; /** @@ -99,70 +101,31 @@ MachineList mList = new MachineList(); System.out.println("Creates a Machine list"); - - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList1 = new PEList(); - System.out.println("Creates a PE list for the 1st Machine"); - - - // 3. Create PEs and add these into an object of PEList. + // 2. Create one Machine with its id, number of PEs and MIPS rating per PE // In this example, we are using a resource from // hpc420.hpcc.jp, AIST, Tokyo, Japan // Note: these data are taken the from GridSim paper, page 25. // In this example, all PEs has the same MIPS (Millions // Instruction Per Second) Rating for a Machine. - int MIPSRating = 377; - peList1.add( new PE(0, MIPSRating) ); // store PE id and MIPS Rating - peList1.add( new PE(1, MIPSRating) ); - peList1.add( new PE(2, MIPSRating) ); - peList1.add( new PE(3, MIPSRating) ); - System.out.println("Creates 4 PEs with same MIPS Rating and put " + - "them into the PE list"); - - - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add( new Machine(0, peList1) ); // First Machine + int mipsRating = 377; + mList.add( new Machine(0, 4, mipsRating)); // First Machine System.out.println("Creates the 1st Machine that has 4 PEs and " + "stores it into the Machine list"); - - // 5. Repeat the process from 2 if we want to create more Machines + // 3. Repeat the process from 2 if we want to create more Machines // In this example, the AIST in Japan has 3 Machines with same // MIPS Rating but different PEs. // NOTE: if you only want to create one Machine for one Grid resource, // then you could skip this step. - PEList peList2 = new PEList(); - System.out.println(); - System.out.println("Creates a PE list for the 2nd Machine"); - - peList2.add( new PE(0, MIPSRating) ); - peList2.add( new PE(1, MIPSRating) ); - peList2.add( new PE(2, MIPSRating) ); - peList2.add( new PE(3, MIPSRating) ); - System.out.println("Creates 4 PEs with same MIPS Rating and put " + - "them into the PE list"); - - mList.add( new Machine(1, peList2) ); // Second Machine + mList.add( new Machine(1, 4, mipsRating)); // Second Machine System.out.println("Creates the 2nd Machine that has 4 PEs and " + "stores it into the Machine list"); - PEList peList3 = new PEList(); - System.out.println(); - System.out.println("Creates a PE list for the 3rd Machine"); - - peList3.add( new PE(0, MIPSRating) ); - peList3.add( new PE(1, MIPSRating) ); - System.out.println("Creates 2 PEs with same MIPS Rating and put " + - "them into the PE list"); - - mList.add( new Machine(2, peList3) ); // Third Machine + mList.add( new Machine(2, 2, mipsRating)); // Third Machine System.out.println("Creates the 3rd Machine that has 2 PEs and " + "stores it into the Machine list"); - - // 6. Create a ResourceCharacteristics object that stores the + // 4. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of // Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit). @@ -179,8 +142,7 @@ System.out.println("Creates the properties of a Grid resource and " + "stores the Machine list"); - - // 7. Finally, we need to create a GridResource object. + // 5. Finally, we need to create a GridResource object. String name = "Resource_0"; // resource name double baud_rate = 100.0; // communication speed long seed = 11L*13*17*19*23+1; @@ -189,12 +151,12 @@ double holidayLoad = 0.0; // the resource load during holiday // incorporates weekends so the grid resource is on 7 days a week - LinkedList Weekends = new LinkedList(); + LinkedList<Integer> Weekends = new LinkedList<Integer>(); Weekends.add(new Integer(Calendar.SATURDAY)); Weekends.add(new Integer(Calendar.SUNDAY)); // incorporates holidays. However, no holidays are set in this example - LinkedList Holidays = new LinkedList(); + LinkedList<Integer> Holidays = new LinkedList<Integer>(); GridResource gridRes = null; try @@ -212,6 +174,5 @@ return gridRes; } +} -} // end class - Deleted: trunk/examples/gridsim/example01/readme.txt =================================================================== --- trunk/examples/gridsim/example01/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/gridsim/example01/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -1,20 +0,0 @@ - -/** - * Author: Anthony Sulistio - * Date: April 2003 - */ - -When running the example file, it will produce the following files: - - GridSim_stat.txt -> created by the GridSim version 2.2 onwards - during GridSim.init() to create - GridStatistics object for statistical purposes. Since this example only - shows how to create one Grid resource, therefore, this file is empty. - We don't simulate anything yet. - - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. Inside this file is empty since we don't simulate anything yet. - - Modified: trunk/examples/gridsim/example03/readme.txt =================================================================== --- trunk/examples/gridsim/example03/readme.txt 2009-05-21 01:59:34 UTC (rev 266) +++ trunk/examples/gridsim/example03/readme.txt 2009-05-22 05:16:40 UTC (rev 267) @@ -9,20 +9,3 @@ "Gridlet.SUCCESS". Therefore, the output is correct as expected with all the Gridlets have the same status. -When running the example file, it will produce the following files: - - GridSim_stat.txt -> created by the GridSim version 2.2 onwards - during GridSim.init() to create - GridStatistics object for statistical purposes. Since this example only - shows how to create one Grid resource, therefore, this file is empty. - We don't simulate anything yet. - - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to w... [truncated message content] |
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. |
From: <mar...@us...> - 2009-05-19 12:43:32
|
Revision: 265 http://gridsim.svn.sourceforge.net/gridsim/?rev=265&view=rev Author: marcos_dias Date: 2009-05-19 12:18:14 +0000 (Tue, 19 May 2009) Log Message: ----------- Changes from 4.2 to 5.0 - Improvements to make GridSim more compatible with Java 5 and 6 - Changes in SimJava to enable a simulation to be paused and resumed. - Add a new package (i.e. gridsim.parallel) that provides: * A graphical user interface for debugging resource allocation policies * several allocation policies for scheduling parallel jobs on clusters and and supercomputers. The policies include aggressive backfilling, conservative backfilling, advance reservation with conservative backfilling, selective backfilling and agressive backfilling with multiple resource partitions. * A workload model by Lublin and Feitelson for generating jobs for grid resources. * A data structure to facilitate the scheduling of jobs and advance reservations. * Logging features using Java logging API. Modified Paths: -------------- trunk/build.xml trunk/changelog.txt trunk/jars/simjava2.jar trunk/release_note.txt trunk/source/gridsim/ARGridResource.java trunk/source/gridsim/ARObject.java trunk/source/gridsim/ARPolicy.java trunk/source/gridsim/ARSimpleSpaceShared.java trunk/source/gridsim/Accumulator.java trunk/source/gridsim/AdvanceReservation.java trunk/source/gridsim/AllocPolicy.java trunk/source/gridsim/GridInformationService.java trunk/source/gridsim/GridResource.java trunk/source/gridsim/GridSim.java trunk/source/gridsim/GridSimCore.java trunk/source/gridsim/GridSimRandom.java trunk/source/gridsim/GridSimShutdown.java trunk/source/gridsim/GridSimStandardPE.java trunk/source/gridsim/GridSimTags.java trunk/source/gridsim/GridStatistics.java trunk/source/gridsim/GridUser.java trunk/source/gridsim/Gridlet.java trunk/source/gridsim/GridletList.java trunk/source/gridsim/IO_data.java trunk/source/gridsim/Machine.java trunk/source/gridsim/MachineList.java trunk/source/gridsim/PE.java trunk/source/gridsim/PEList.java trunk/source/gridsim/ParameterException.java trunk/source/gridsim/ResGridlet.java trunk/source/gridsim/ResGridletList.java trunk/source/gridsim/ResourceCalendar.java trunk/source/gridsim/ResourceCharacteristics.java trunk/source/gridsim/ResourceUserList.java trunk/source/gridsim/Sim_from_port.java trunk/source/gridsim/Stat.java trunk/source/gridsim/auction/AuctionTags.java trunk/source/gridsim/datagrid/DataGridResource.java trunk/source/gridsim/datagrid/DataGridTags.java trunk/source/gridsim/datagrid/DataGridUser.java trunk/source/gridsim/datagrid/DataGridlet.java trunk/source/gridsim/datagrid/File.java trunk/source/gridsim/datagrid/FileAttribute.java trunk/source/gridsim/datagrid/ReplicaManager.java trunk/source/gridsim/datagrid/SimpleReplicaManager.java trunk/source/gridsim/datagrid/filter/FileNameFilter.java trunk/source/gridsim/datagrid/filter/Filter.java trunk/source/gridsim/datagrid/filter/FilterDataResult.java trunk/source/gridsim/datagrid/index/AbstractRC.java trunk/source/gridsim/datagrid/index/DataGIS.java trunk/source/gridsim/datagrid/index/DataRegionalGIS.java trunk/source/gridsim/datagrid/index/RegionalRC.java trunk/source/gridsim/datagrid/index/TopRegionalRC.java trunk/source/gridsim/datagrid/storage/HarddriveStorage.java trunk/source/gridsim/datagrid/storage/Storage.java trunk/source/gridsim/datagrid/storage/TapeStorage.java trunk/source/gridsim/filter/FilterCreateAR.java trunk/source/gridsim/filter/FilterGridlet.java trunk/source/gridsim/filter/FilterQueryTimeAR.java trunk/source/gridsim/filter/FilterResult.java trunk/source/gridsim/net/fnb/FIFO.java trunk/source/gridsim/net/fnb/FnbSCFQScheduler.java trunk/source/gridsim/net/fnb/FnbWhiteList.java trunk/source/gridsim/net/fnb/RED.java trunk/source/gridsim/resFailure/AllocPolicyWithFailure.java trunk/source/gridsim/resFailure/AvailabilityInfo.java trunk/source/gridsim/resFailure/FailureMsg.java trunk/source/gridsim/resFailure/GridResourceWithFailure.java trunk/source/gridsim/resFailure/RegionalGISWithFailure.java trunk/source/gridsim/resFailure/SpaceSharedWithFailure.java trunk/source/gridsim/resFailure/TimeSharedWithFailure.java trunk/source/gridsim/util/HyperExponential.java trunk/source/gridsim/util/LCGRandom.java trunk/source/gridsim/util/NetworkReader.java trunk/source/gridsim/util/Workload.java Added Paths: ----------- trunk/examples/ResFailure/ trunk/examples/ResFailure/example01/ trunk/examples/ResFailure/example01/Ex01_Regional_GIS trunk/examples/ResFailure/example01/Ex01_Res_0 trunk/examples/ResFailure/example01/Ex01_Res_1 trunk/examples/ResFailure/example01/Ex01_Res_2 trunk/examples/ResFailure/example01/Ex01_User0 trunk/examples/ResFailure/example01/Ex01_User0_Fin trunk/examples/ResFailure/example01/GridUserFailureEx01.java trunk/examples/ResFailure/example01/GridletSubmission.java trunk/examples/ResFailure/example01/ResFailureEx01.java trunk/examples/ResFailure/example01/network_ex01.txt trunk/examples/ResFailure/example01/output.txt trunk/examples/ResFailure/example01/readme.txt trunk/examples/ResFailure/example02/ trunk/examples/ResFailure/example02/Ex02_Regional_GIS trunk/examples/ResFailure/example02/Ex02_Res_0 trunk/examples/ResFailure/example02/Ex02_Res_1 trunk/examples/ResFailure/example02/Ex02_Res_2 trunk/examples/ResFailure/example02/Ex02_Res_3 trunk/examples/ResFailure/example02/Ex02_Res_4 trunk/examples/ResFailure/example02/Ex02_Res_5 trunk/examples/ResFailure/example02/Ex02_User_0 trunk/examples/ResFailure/example02/GridUserFailureEx02.java trunk/examples/ResFailure/example02/GridletSubmission.java trunk/examples/ResFailure/example02/ResFailureEx02.java trunk/examples/ResFailure/example02/network_ex02.txt trunk/examples/ResFailure/example02/output.txt trunk/examples/ResFailure/example02/readme.txt trunk/examples/ResFailure/example03/ trunk/examples/ResFailure/example03/Ex03_Regional_GIS_0 trunk/examples/ResFailure/example03/Ex03_Regional_GIS_1 trunk/examples/ResFailure/example03/Ex03_Regional_GIS_2 trunk/examples/ResFailure/example03/Ex03_Res_0 trunk/examples/ResFailure/example03/Ex03_Res_10 trunk/examples/ResFailure/example03/Ex03_Res_12 trunk/examples/ResFailure/example03/Ex03_Res_14 trunk/examples/ResFailure/example03/Ex03_Res_2 trunk/examples/ResFailure/example03/Ex03_Res_4 trunk/examples/ResFailure/example03/Ex03_Res_6 trunk/examples/ResFailure/example03/Ex03_Res_8 trunk/examples/ResFailure/example03/Ex03_User_0 trunk/examples/ResFailure/example03/GridUserFailureEx03.java trunk/examples/ResFailure/example03/GridletSubmission.java trunk/examples/ResFailure/example03/ResFailureEx03.java trunk/examples/ResFailure/example03/network_ex03.txt trunk/examples/ResFailure/example03/output.txt trunk/examples/ResFailure/example03/readme.txt trunk/examples/ResFailure/readme.txt trunk/examples/WorkloadTrace/ trunk/examples/WorkloadTrace/custom_trace.txt trunk/examples/WorkloadTrace/example01/ trunk/examples/WorkloadTrace/example01/TraceEx01.java trunk/examples/WorkloadTrace/example01/output.txt trunk/examples/WorkloadTrace/example01/readme.txt trunk/examples/WorkloadTrace/example02/ trunk/examples/WorkloadTrace/example02/TraceEx02.java trunk/examples/WorkloadTrace/example02/User.java trunk/examples/WorkloadTrace/example02/output.txt trunk/examples/WorkloadTrace/example02/readme.txt trunk/examples/WorkloadTrace/example03/ trunk/examples/WorkloadTrace/example03/NetUser.java trunk/examples/WorkloadTrace/example03/TraceEx03.java trunk/examples/WorkloadTrace/example03/output.txt trunk/examples/WorkloadTrace/example03/readme.txt trunk/examples/WorkloadTrace/l_lanl_o2k.swf.txt trunk/examples/WorkloadTrace/l_sdsc_blue.swf.txt trunk/examples/WorkloadTrace/readme.txt trunk/examples/auction/ trunk/examples/auction/example01/ trunk/examples/auction/example01/AuctionResource.java trunk/examples/auction/example01/Broker.java trunk/examples/auction/example01/ExampleAuction.java trunk/examples/auction/example01/ResponderImpl.java trunk/examples/auction/example01/output.txt trunk/examples/auction/example02/ trunk/examples/auction/example02/AuctionResource.java trunk/examples/auction/example02/Broker.java trunk/examples/auction/example02/ExampleAuction.java trunk/examples/auction/example02/NetUser.java trunk/examples/auction/example02/ResponderImpl.java trunk/examples/auction/example02/output.txt trunk/examples/auction/example03/ trunk/examples/auction/example03/AuctionResource.java trunk/examples/auction/example03/Broker.java trunk/examples/auction/example03/ExampleAuction.java trunk/examples/auction/example03/NetUser.java trunk/examples/auction/example03/ResponderImpl.java trunk/examples/auction/example03/output.txt trunk/examples/auction/example_of_use.pdf trunk/examples/auction/readme.txt trunk/examples/datagrid/ trunk/examples/datagrid/example01/ trunk/examples/datagrid/example01/DataExample1.java trunk/examples/datagrid/example01/DummyUser.java trunk/examples/datagrid/example01/output.txt trunk/examples/datagrid/example01/readme.txt trunk/examples/datagrid/example02/ trunk/examples/datagrid/example02/DataExample2.java trunk/examples/datagrid/example02/FileUser.java trunk/examples/datagrid/example02/output.txt trunk/examples/datagrid/example02/readme.txt trunk/examples/datagrid/example03/ trunk/examples/datagrid/example03/DataGridletExample.java trunk/examples/datagrid/example03/DataGridletUser.java trunk/examples/datagrid/example03/output.txt trunk/examples/datagrid/example03/readme.txt trunk/examples/datagrid/example04/ trunk/examples/datagrid/example04/DataGridSim.java trunk/examples/datagrid/example04/FilesReader.java trunk/examples/datagrid/example04/ParameterReader.java trunk/examples/datagrid/example04/ResourceReader.java trunk/examples/datagrid/example04/SimUser.java trunk/examples/datagrid/example04/UserReader.java trunk/examples/datagrid/example04/files.txt trunk/examples/datagrid/example04/network.txt trunk/examples/datagrid/example04/output.txt trunk/examples/datagrid/example04/parameters.txt trunk/examples/datagrid/example04/readme.txt trunk/examples/datagrid/example04/resources.txt trunk/examples/datagrid/example04/users.txt trunk/examples/datagrid/tutorial/ trunk/examples/datagrid/tutorial/Simulation.html trunk/examples/datagrid/tutorial/connectEntities.html trunk/examples/datagrid/tutorial/createNetwork.html trunk/examples/datagrid/tutorial/createTopLevelRC.html trunk/examples/datagrid/tutorial/createUsers.html trunk/examples/datagrid/tutorial/creatingResources.html trunk/examples/datagrid/tutorial/design_architecture.html trunk/examples/datagrid/tutorial/getting_started.html trunk/examples/datagrid/tutorial/img/ trunk/examples/datagrid/tutorial/img/CentralRC.png trunk/examples/datagrid/tutorial/img/ExampleTopology.png trunk/examples/datagrid/tutorial/img/Resource.png trunk/examples/datagrid/tutorial/img/TwoLevelRC1.png trunk/examples/datagrid/tutorial/img/TwoLevelRC2.png trunk/examples/datagrid/tutorial/img/logo.png trunk/examples/datagrid/tutorial/index.html trunk/examples/datagrid/tutorial/initialization.html trunk/examples/datagrid/tutorial/writingRC.html trunk/examples/datagrid/tutorial/writingRM.html trunk/examples/gridsim/ trunk/examples/gridsim/example01/ trunk/examples/gridsim/example01/Example1.java trunk/examples/gridsim/example01/readme.txt trunk/examples/gridsim/example02/ trunk/examples/gridsim/example02/Example2.java trunk/examples/gridsim/example02/readme.txt trunk/examples/gridsim/example03/ trunk/examples/gridsim/example03/Example3.java trunk/examples/gridsim/example03/Test.java trunk/examples/gridsim/example03/output.txt trunk/examples/gridsim/example03/readme.txt trunk/examples/gridsim/example04/ trunk/examples/gridsim/example04/Example4.java trunk/examples/gridsim/example04/GridSim_stat.txt trunk/examples/gridsim/example04/output.txt trunk/examples/gridsim/example04/readme.txt trunk/examples/gridsim/example05/ trunk/examples/gridsim/example05/Example5.java trunk/examples/gridsim/example05/GridSim_stat.txt trunk/examples/gridsim/example05/output.txt trunk/examples/gridsim/example05/readme.txt trunk/examples/gridsim/example06/ trunk/examples/gridsim/example06/Example6.java trunk/examples/gridsim/example06/GridSim_stat.txt trunk/examples/gridsim/example06/output.txt trunk/examples/gridsim/example06/readme.txt trunk/examples/gridsim/example07/ trunk/examples/gridsim/example07/Test.java trunk/examples/gridsim/example07/TestCase1.java trunk/examples/gridsim/example07/TestCase2.java trunk/examples/gridsim/example07/TestCase3.java trunk/examples/gridsim/example07/TestCase4.java trunk/examples/gridsim/example07/TestCase5.java trunk/examples/gridsim/example07/TestCase6.java trunk/examples/gridsim/example07/TestCase7.java trunk/examples/gridsim/example07/TestCase8.java trunk/examples/gridsim/example07/outputSpaceCase8.txt trunk/examples/gridsim/example07/outputTimeCase5.txt trunk/examples/gridsim/example07/readme.txt trunk/examples/gridsim/example08/ trunk/examples/gridsim/example08/Example8.java trunk/examples/gridsim/example08/NewPolicy.java trunk/examples/gridsim/example08/output.txt trunk/examples/gridsim/example08/readme.txt trunk/examples/gridsim/example09/ trunk/examples/gridsim/example09/Example9.java trunk/examples/gridsim/example09/NewGIS.java trunk/examples/gridsim/example09/NewGridResource.java trunk/examples/gridsim/example09/output.txt trunk/examples/gridsim/example09/readme.txt trunk/examples/gridsim/example10/ trunk/examples/gridsim/example10/ARTest.java trunk/examples/gridsim/example10/Example10.java trunk/examples/gridsim/example10/readme.txt trunk/examples/gridsim/regionalGIS/ trunk/examples/gridsim/regionalGIS/ExampleGIS.java trunk/examples/gridsim/regionalGIS/NetUserGIS.java trunk/examples/gridsim/regionalGIS/output.txt trunk/examples/gridsim/regionalGIS/readme.txt trunk/examples/network/ trunk/examples/network/FiniteBuffer/ trunk/examples/network/FiniteBuffer/FnbUser.java trunk/examples/network/FiniteBuffer/GridletSubmission.java trunk/examples/network/FiniteBuffer/mainExample.java trunk/examples/network/FiniteBuffer/network_example.txt trunk/examples/network/FiniteBuffer/readme.txt trunk/examples/network/example01/ trunk/examples/network/example01/NetEx01.java trunk/examples/network/example01/NetUser.java trunk/examples/network/example01/Test.java trunk/examples/network/example01/output.txt trunk/examples/network/example01/readme.txt trunk/examples/network/example01/test.csv trunk/examples/network/example02/ trunk/examples/network/example02/NetEx02.java trunk/examples/network/example02/NetUser.java trunk/examples/network/example02/User_0.csv trunk/examples/network/example02/User_1.csv trunk/examples/network/example02/output.txt trunk/examples/network/example02/readme.txt trunk/examples/network/example02/router1_report.csv trunk/examples/network/example02/router2_report.csv trunk/examples/network/example03/ trunk/examples/network/example03/NetEx03.java trunk/examples/network/example03/NetUser.java trunk/examples/network/example03/User_0.csv trunk/examples/network/example03/User_1.csv trunk/examples/network/example03/output.txt trunk/examples/network/example03/readme.txt trunk/examples/network/example03/router1_report.csv trunk/examples/network/example03/router2_report.csv trunk/examples/network/flow/ trunk/examples/network/flow/example01/ trunk/examples/network/flow/example01/FlowNetEx01.java trunk/examples/network/flow/example01/FlowNetUser.java trunk/examples/network/flow/example01/FlowTest.java trunk/examples/network/flow/example01/output.txt trunk/examples/network/flow/example01/readme.txt trunk/examples/network/flow/example01/test1.csv trunk/examples/network/flow/example01/test2.csv trunk/examples/network/flow/example02/ trunk/examples/network/flow/example02/FlowNetEx02.java trunk/examples/network/flow/example02/FlowNetUser.java trunk/examples/network/flow/example02/User_0.csv trunk/examples/network/flow/example02/User_1.csv trunk/examples/network/flow/example02/output.txt trunk/examples/network/flow/example02/readme.txt trunk/examples/network/flow/example02/router1_report.csv trunk/examples/network/flow/example02/router2_report.csv trunk/examples/network/rate/ trunk/examples/network/rate/NetUser.java trunk/examples/network/rate/R1_report.csv trunk/examples/network/rate/RateExample.java trunk/examples/network/rate/network.txt trunk/examples/network/rate/output.txt trunk/examples/network/rate/readme.txt trunk/examples/network/readme.txt trunk/examples/network/scfq/ trunk/examples/network/scfq/NetUser.java trunk/examples/network/scfq/R1_report.csv trunk/examples/network/scfq/SCFQExample.java trunk/examples/network/scfq/network.txt trunk/examples/network/scfq/output.txt trunk/examples/network/scfq/readme.txt trunk/examples/parallel/ trunk/examples/parallel/agressive/ trunk/examples/parallel/agressive/ExampleEASY01.java trunk/examples/parallel/conservative/ trunk/examples/parallel/conservative/ExampleCB01.java trunk/examples/parallel/partitions/ trunk/examples/parallel/partitions/ExampleMulti01.java trunk/examples/parallel/partitions/ExampleMulti02.java trunk/examples/parallel/reservation/ trunk/examples/parallel/reservation/ARExample01.java trunk/examples/parallel/reservation/ARUser.java trunk/examples/parallel/sdsc_blue_01.txt trunk/examples/parallel/sdsc_blue_02.txt trunk/examples/parallel/selective/ trunk/examples/parallel/selective/ExampleSelective01.java trunk/examples/parallel/selective/ExampleSelective02.java trunk/examples/parallel/util/ trunk/examples/parallel/util/ExampleLublin99.java trunk/examples/readme.txt trunk/source/gridsim/parallel/ trunk/source/gridsim/parallel/ParallelResource.java trunk/source/gridsim/parallel/ResourceDynamics.java trunk/source/gridsim/parallel/SSGridlet.java trunk/source/gridsim/parallel/SSGridletList.java trunk/source/gridsim/parallel/gui/ trunk/source/gridsim/parallel/gui/AbstractVisualizer.java trunk/source/gridsim/parallel/gui/ActionType.java trunk/source/gridsim/parallel/gui/AllocationAction.java trunk/source/gridsim/parallel/gui/AllocationListener.java trunk/source/gridsim/parallel/gui/GUISettings.java trunk/source/gridsim/parallel/gui/JobTypePanel.java trunk/source/gridsim/parallel/gui/ParallelVisualizer.java trunk/source/gridsim/parallel/gui/ResourceWindow.java trunk/source/gridsim/parallel/gui/Visualizer.java trunk/source/gridsim/parallel/gui/VisualizerAdaptor.java trunk/source/gridsim/parallel/gui/gui.properties trunk/source/gridsim/parallel/log/ trunk/source/gridsim/parallel/log/LogFormatter.java trunk/source/gridsim/parallel/log/LoggerEnum.java trunk/source/gridsim/parallel/log/Logging.java trunk/source/gridsim/parallel/profile/ trunk/source/gridsim/parallel/profile/LinkedTreeMap.java trunk/source/gridsim/parallel/profile/PERange.java trunk/source/gridsim/parallel/profile/PERangeList.java trunk/source/gridsim/parallel/profile/PartProfile.java trunk/source/gridsim/parallel/profile/PartProfileEntry.java trunk/source/gridsim/parallel/profile/PartitionPredicate.java trunk/source/gridsim/parallel/profile/Profile.java trunk/source/gridsim/parallel/profile/ProfileEntry.java trunk/source/gridsim/parallel/profile/ResourcePartition.java trunk/source/gridsim/parallel/profile/ScheduleItem.java trunk/source/gridsim/parallel/profile/SingleProfile.java trunk/source/gridsim/parallel/profile/SingleProfileEntry.java trunk/source/gridsim/parallel/profile/TimeSlot.java trunk/source/gridsim/parallel/reservation/ trunk/source/gridsim/parallel/reservation/ErrorType.java trunk/source/gridsim/parallel/reservation/FilterARMessage.java trunk/source/gridsim/parallel/reservation/MessageType.java trunk/source/gridsim/parallel/reservation/Reservation.java trunk/source/gridsim/parallel/reservation/ReservationMessage.java trunk/source/gridsim/parallel/reservation/ReservationPolicy.java trunk/source/gridsim/parallel/reservation/ReservationRequester.java trunk/source/gridsim/parallel/reservation/ReservationStatus.java trunk/source/gridsim/parallel/reservation/ServerReservation.java trunk/source/gridsim/parallel/scheduler/ 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/PrioritySelector.java trunk/source/gridsim/parallel/scheduler/RuntimePredicate.java trunk/source/gridsim/parallel/scheduler/SelectiveBackfill.java trunk/source/gridsim/parallel/util/ 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 trunk/source/gridsim/parallel/util/WorkloadModel.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-05-19 11:41:03 UTC (rev 264) +++ trunk/build.xml 2009-05-19 12:18:14 UTC (rev 265) @@ -26,8 +26,8 @@ </description> <!-- GridSim version number and release year for javadoc --> - <property name="version" value="4.2 beta"/> - <property name="year" value="2008"/> + <property name="version" value="5.0 beta"/> + <property name="year" value="2009"/> <!-- location to store Java classes --> <property name="class.dir" location="./classes" /> @@ -45,7 +45,6 @@ <property name="classpath" location="${jar.dir}/simjava2.jar" /> - <target name="prepare"> <mkdir dir="${class.dir}" /> </target> @@ -62,9 +61,9 @@ * The new jar file only contains gridsim classes NOT SimJava2. --> <target name="makejar" depends="build"> - <echo>Compiling a new jar file, named: "new_gridsim.jar".</echo> + <echo>Compiling a new jar file, named: "gridsim.jar".</echo> <echo>This jar file only contains GridSim classes but not SimJava2.</echo> - <jar destfile="${jar.dir}/new_gridsim.jar" basedir="${class.dir}" /> + <jar destfile="${jar.dir}/gridsim.jar" basedir="${class.dir}" /> </target> <target name="clean" description="clean up" > Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2009-05-19 11:41:03 UTC (rev 264) +++ trunk/changelog.txt 2009-05-19 12:18:14 UTC (rev 265) @@ -1,7 +1,17 @@ # Changelog for GridSim Toolkit -# Maintained by Anthony Sulistio -# $Id: changelog.txt,v 1.7 2007/09/01 02:40:12 anthony Exp $ +Changes from 4.2 to 5.0 +- Improvements to make GridSim more compatible with Java 5 and 6 +- Changes in SimJava to enable a simulation to be paused and resumed. +- Add a new package (i.e. gridsim.parallel) that provides: + * A graphical user interface for debugging resource allocation policies + * several allocation policies for scheduling parallel jobs on clusters and + and supercomputers. The policies include aggressive backfilling, conservative + backfilling, advance reservation with conservative backfilling, selective + backfilling and agressive backfilling with multiple resource partitions. + * A workload model by Lublin and Feitelson for generating jobs for grid resources. + * A data structure to facilitate the scheduling of jobs and advance reservations. + * Logging features using Java logging API. Changes from 4.0 to 4.1 - add a new functionality that supports resource failures during runtime. Added: trunk/examples/ResFailure/example01/Ex01_Regional_GIS =================================================================== --- trunk/examples/ResFailure/example01/Ex01_Regional_GIS (rev 0) +++ trunk/examples/ResFailure/example01/Ex01_Regional_GIS 2009-05-19 12:18:14 UTC (rev 265) @@ -0,0 +1,4 @@ +Event ResourceID Clock +Registering 10 10.020000998399999 +Registering 15 10.030000998399998 +Registering 20 10.040000998399998 Added: trunk/examples/ResFailure/example01/Ex01_Res_0 =================================================================== --- trunk/examples/ResFailure/example01/Ex01_Res_0 (rev 0) +++ trunk/examples/ResFailure/example01/Ex01_Res_0 2009-05-19 12:18:14 UTC (rev 265) @@ -0,0 +1 @@ +Event NumMachines Clock Added: trunk/examples/ResFailure/example01/Ex01_Res_1 =================================================================== --- trunk/examples/ResFailure/example01/Ex01_Res_1 (rev 0) +++ trunk/examples/ResFailure/example01/Ex01_Res_1 2009-05-19 12:18:14 UTC (rev 265) @@ -0,0 +1,2 @@ +Event NumMachines Clock +Failure 3 31.205408168820174 Added: trunk/examples/ResFailure/example01/Ex01_Res_2 =================================================================== --- trunk/examples/ResFailure/example01/Ex01_Res_2 (rev 0) +++ trunk/examples/ResFailure/example01/Ex01_Res_2 2009-05-19 12:18:14 UTC (rev 265) @@ -0,0 +1 @@ +Event NumMachines Clock Added: trunk/examples/ResFailure/example01/Ex01_User0 =================================================================== --- trunk/examples/ResFailure/example01/Ex01_User0 (rev 0) +++ trunk/examples/ResFailure/example01/Ex01_User0 2009-05-19 12:18:14 UTC (rev 265) @@ -0,0 +1,11 @@ +User Event GridletID Resource GridletStatus Clock +Ex01_User0 Sending 0 Ex01_Res_2 Created 374.04012479999994 +Ex01_User0 Sending 1 Ex01_Res_1 Created 374.77037439999924 +Ex01_User0 Sending 2 Ex01_Res_2 Created 375.50062399999854 +Ex01_User0 Sending 3 Ex01_Res_2 Created 376.23087359999784 +Ex01_User0 Sending 4 Ex01_Res_0 Created 376.96112319999713 +Ex01_User0 Receiving 0 Ex01_Res_2 Success 1233.4001439999986 +Ex01_User0 Receiving 1 Ex01_Res_1 Success 1234.130393599998 +Ex01_User0 Receiving 2 Ex01_Res_2 Success 1234.8606431999972 +Ex01_User0 Receiving 3 Ex01_Res_2 Success 1235.5306431999966 +Ex01_User0 Receiving 4 Ex01_Res_0 Success 1236.3211423999958 Added: trunk/examples/ResFailure/example01/Ex01_User0_Fin =================================================================== --- trunk/examples/ResFailure/example01/Ex01_User0_Fin (rev 0) +++ trunk/examples/ResFailure/example01/Ex01_User0_Fin 2009-05-19 12:18:14 UTC (rev 265) @@ -0,0 +1,6 @@ +User GridletID Resource Cost CPU time Latency +Ex01_User0 0 Ex01_Res_2 2574.0 858.0 245555.1188510172 +Ex01_User0 1 Ex01_Res_1 2574.0 858.0 245555.1188510172 +Ex01_User0 2 Ex01_Res_2 2574.0 858.0 245555.1188510172 +Ex01_User0 3 Ex01_Res_2 2571.809251200002 857.2697504000007 245555.1188510172 +Ex01_User0 4 Ex01_Res_0 2574.0 858.0 245555.1188510172 Added: trunk/examples/ResFailure/example01/GridUserFailureEx01.java =================================================================== --- trunk/examples/ResFailure/example01/GridUserFailureEx01.java (rev 0) +++ trunk/examples/ResFailure/example01/GridUserFailureEx01.java 2009-05-19 12:18:14 UTC (rev 265) @@ -0,0 +1,747 @@ +package ResFailure.example01; + +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * An example of how to use the failure functionality. + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero and Anthony Sulistio + * Organization: UCLM (Spain) + * Created on: August 2007 + */ + +import gridsim.*; +import gridsim.index.AbstractGIS; +import gridsim.net.Link; +import java.util.Random; +import java.util.ArrayList; +import java.io.FileWriter; +import gridsim.resFailure.RegionalGISWithFailure; +import eduni.simjava.Sim_system; +import eduni.simjava.Sim_event; + + +/** + * Creates a Grid User that also considers what happens if a resource fails. + * @author Agustin Caminero and Anthony Sulistio + * @since GridSim Toolkit 4.1 + */ +public class GridUserFailureEx01 extends GridUser +{ + // the base for our constants (chosen at random) + private static final int BASE = 440000; + + /** This constant is to tell the user when he should submit a gridlet */ + private static final int SUBMIT_GRIDLET = BASE + 1; + + private ArrayList GridletSubmittedList_; // list of submitted Gridlets + private GridletList GridletReceiveList_; // list of received Gridlets + + private int NUM_GRIDLETS; + private double pollingTime_; + + // The sizes of gridlets + private int gridletLength; + private int gridletInput; + private int gridletOutput; + + // we keep here the time when each gridlet is submitted + private double gridletSubmissionTime []; + private double gridletLatencyTime []; + + // a flag that denotes whether to trace GridSim events or not. + private boolean trace_flag; + + + /** + * Creates a GridUserFailure object + * @param name this entity name + * @param link a network link connecting this entity + * @param pollTime the time between polls + * @param glLength length (MI) for the gridlets of this user + * @param glIn input file size for the gridlets of this user + * @param glOut output file size for the gridlets of this user + * @param trace_flag a flag that denotes whether to trace this user events + * or not. + * @throws java.lang.Exception happens if either name or link is empty + */ + public GridUserFailureEx01(String name, Link link, double pollTime, + int glLength, int glIn, int glOut, boolean trace_flag) + throws Exception + { + super(name, link); + + this.GridletSubmittedList_ = new ArrayList(); + this.GridletReceiveList_ = new GridletList(); + pollingTime_ = pollTime; + + gridletLength = glLength; + gridletInput = glIn; + gridletOutput = glOut; + this.trace_flag = trace_flag; + } + + /** + * Sets the number of gridlets that this user has to submit. + * Also, create the submission and reception times arrays. + * @param gridlet_num the number of gridlets + */ + public void setGridletNumber(int gridlet_num) + { + NUM_GRIDLETS = gridlet_num; + + gridletSubmissionTime = new double[NUM_GRIDLETS]; + gridletLatencyTime = new double[NUM_GRIDLETS]; + } + + /** + * Handles incoming requests to this entity. + * This method specifies the behaviours and/or scenarios of a user. + */ + public void body() + { + initializeResultsFile(); + createGridlet(super.get_id(), NUM_GRIDLETS); + + // schedule the initial sending of gridlets. + // The sending will start in a ramdom time within 5 min + Random random = new Random(); + int init_time = random.nextInt(5*60); + + // sends a reminder to itself + super.send(super.get_id(), init_time, SUBMIT_GRIDLET); + System.out.println(super.get_name() + + ": initial SUBMIT_GRIDLET event will be at clock: " + + init_time + ". Current clock: " + GridSim.clock()); + + + //////////////////////////////////////////////////////////// + // Now, we have the framework of the entity: + while (Sim_system.running()) + { + Sim_event ev = new Sim_event(); + super.sim_get_next(ev); // get the next event in the queue + + switch (ev.get_tag()) + { + // submit a gridlet + case SUBMIT_GRIDLET: + processGridletSubmission(ev); // process the received event + break; + + // Receive a gridlet back + case GridSimTags.GRIDLET_RETURN: + processGridletReturn(ev); + break; + + case GridSimTags.END_OF_SIMULATION: + System.out.println("\n============== " + super.get_name() + + ". Ending simulation..."); + break; + + default: + System.out.println(super.get_name() + + ": Received an event: " + ev.get_tag()); + break; + + } // switch + + } // while + + // remove I/O entities created during construction of this entity + super.terminateIOEntities(); + + // prints the completed gridlets + printGridletList(GridletReceiveList_, super.get_name(), false, + gridletLatencyTime); + } // body() + + ///////////////////////////////////////////////////////////////////////// + + /** + * This functions process the submission of a gridlet. We have to get the + * list of available resources from the RegGIS, choose one of them, and + * submit the gridlet. + * @param ev an incoming event + */ + private void processGridletSubmission(Sim_event ev) + { + if (trace_flag) + { + System.out.println(super.get_name() + + ": received an SUBMIT_GRIDLET event. Clock: " + GridSim.clock()); + } + + /*********** + We have to submit: + - the gridlet whose id comes with the event + - all the gridlets with the "gridletSub.getSubmitted() == false" + + So, set the gridletSub.getSubmitted() to false for the gridlet whose + id comes with the event + ***********/ + + int i = 0; + GridletSubmission gridletSub; + int resourceID[]; + Random random = new Random(5); // a random generator with a random seed + int index; + Gridlet gl; + Integer obj; + int glID; + + // This is because the initial GRIDLET_SUBMIT event, at the beginning + // of sims, does not have any gridlet id. We have to submit + // all the gridlets. + if (ev.get_data() instanceof Integer) + { + obj = (Integer) ev.get_data(); + glID = obj.intValue(); // get the gridlet id. + } + else { + glID = 99; // a value at random, not used at all in this case + } + + while (i < GridletSubmittedList_.size()) + { + gridletSub = (GridletSubmission)GridletSubmittedList_.get(i); + + if ( (gridletSub.getGridlet()).getGridletID() == glID ) + { + // set this gridlet whose id comes with the event as not submitted, + // so that it is submitted as soon as possible. + ((GridletSubmission) GridletSubmittedList_.get(i)).setSubmitted(false); + } + + // Submit the gridlets with the "gridletSub.getSubmitted() == false" + if ( (gridletSub.getSubmitted() == false)) + { + // we have to resubmit this gridlet + gl = ((GridletSubmission) GridletSubmittedList_.get(i)).getGridlet(); + resourceID = getResList(); // Get list of resources from GIS + + // If we have resources in the list + if ((resourceID != null) && (resourceID.length != 0)) + { + index = random.nextInt(resourceID.length); + + // make sure the gridlet will be executed from the begining + resetGridlet(gl); + + // submits this gridlet to a resource + super.gridletSubmit(gl, resourceID[index]); + gridletSubmissionTime[gl.getGridletID()] = GridSim.clock(); + + // set this gridlet as submitted + ((GridletSubmission) GridletSubmittedList_.get(i)).setSubmitted(true); + + if (trace_flag) + { + System.out.println(super.get_name() + + ": Sending Gridlet #" + i + " to " + + GridSim.getEntityName(resourceID[index]) + + " at clock: " + GridSim.clock()); + + // Write into a results file + write(super.get_name(), "Sending", gl.getGridletID(), + GridSim.getEntityName(resourceID[index]), + gl.getGridletStatusString(), GridSim.clock()); + } + + } + // No resources available at this moment, so schedule an event + // in the future. The event wil be in 15 min (900 sec), as + // resource failures may last several hours. + // This event includes the gridletID, so that the user will + // try to submit only this gridlet + else + { + super.send(super.get_id(), GridSimTags.SCHEDULE_NOW + 900, + SUBMIT_GRIDLET, new Integer(gl.getGridletID()) ); + } + + }// if (gridletSub.getSubmitted() == false) + + i++; + } // while (i < GridletSubmittedList_.size()) + + } // processGridletSubmission + + /** + * This functions process the return of a gridlet. + * We pay attention to the status of the gridlet + * and then decide what we have to do the next + * @param ev an incoming event + */ + private void processGridletReturn(Sim_event ev) + { + if (trace_flag) + { + System.out.println(super.get_name() + + ": received an GRIDLET_RETURN event. Clock: " + GridSim.clock()); + } + + Object obj = (Object) ev.get_data(); + Gridlet gl = null; + Random random = new Random(5); // a random generator with a random seed + + if (obj instanceof Gridlet) + { + gl = (Gridlet) obj; + gridletLatencyTime[gl.getGridletID()] = GridSim.clock(); + + // Write into a results file + if (trace_flag) + { + write(super.get_name(), "Receiving", gl.getGridletID(), + GridSim.getEntityName(gl.getResourceID()), + gl.getGridletStatusString(), GridSim.clock()); + } + + ///////////////////////// Gridlet Success + if (gl.getGridletStatusString().compareTo("Success") == 0) + { + System.out.println(super.get_name() + ": Receiving Gridlet #" + + gl.getGridletID() + " with status Success at time = " + + GridSim.clock() + " from resource " + + GridSim.getEntityName(gl.getResourceID())); + + this.GridletReceiveList_.add(gl); // add into the received list + gridletLatencyTime[gl.getGridletID()] = + gridletLatencyTime[gl.getGridletID()] - + gridletSubmissionTime[gl.getGridletID()]; + + // We have received all the gridlets. So, finish the simulation. + if (GridletReceiveList_.size() == GridletSubmittedList_.size()) + { + super.finishSimulation(); + } + + } // if (gl.getGridletStatusString() == "Success") + + //////////////////////// Gridlet Failed + else if (gl.getGridletStatusString().compareTo("Failed") == 0) + { + System.out.println(super.get_name() + ": Receiving Gridlet #" + + gl.getGridletID() + " with status Failed at time = " + + GridSim.clock() + " from resource " + + GridSim.getEntityName(gl.getResourceID())); + + // Send the gridlet as soon as we have resources available. + // This gridlet will be resend as soon as possible, + // in the first loop. + int pos = findGridletInGridletSubmittedList(gl); + if (pos == -1) { + System.out.println(super.get_name() + + ". Gridlet not found in GridletSubmittedList."); + } + else + { + // set this gridlet as submitted, because otherwise + // this gridlet may be submitted several times. + // A gridlet will only be submitted when the event carrying + // its id reaches the user + ((GridletSubmission) GridletSubmittedList_.get(pos)).setSubmitted(true); + + // Now, schedule an event to itself to submit the gridlet + // The gridlet will be sent as soon as possible + Integer glID_Int = new Integer(gl.getGridletID()); + + // This event includes the gridletID, so that the user + // will try to submit only this gridlet + super.send(super.get_id(), GridSimTags.SCHEDULE_NOW, + SUBMIT_GRIDLET, glID_Int); + } + } // if (gl.getGridletStatusString() == "Failed") + + ////////////////////////////// Gridlet Failed_resource + else if (gl.getGridletStatusString().compareTo("Failed_resource_unavailable") == 0) + { + int pos = findGridletInGridletSubmittedList(gl); + if (pos == -1) { + System.out.println(super.get_name() + + ". Gridlet not found in GridletSubmittedList."); + } + else + { + // Now, set its submission time for a random time between + // 1 and the polling time + double resubmissionTime = random.nextDouble() * pollingTime_; + + // this is to prevent the gridlet from being submitted + // before its resubmission time. + // This is different from the FAILED case, because + // in that case, the gridlet should be resubmited as soon + // as possible. As oppossed to that, this gridlet should + // not be resubmited before its resubmission time. + ((GridletSubmission) GridletSubmittedList_.get(pos)).setSubmitted(true); + + + System.out.println(super.get_name() + ": Receiving Gridlet #" + + gl.getGridletID() + + " with status Failed_resource_unavailable at time = " + + GridSim.clock() + " from resource " + + GridSim.getEntityName(gl.getResourceID()) + + "(resID: " + gl.getResourceID() + + "). Resubmission time will be: " + + resubmissionTime + GridSim.clock()); + + // Now, we have to inform the GIS about this failure, so it + // can keep the list of resources up-to-date. + informGIS(gl.getResourceID()); + + // Now, schedule an event to itself to submit the gridlet + Integer glID_Int = new Integer(gl.getGridletID()); + + // This event includes the gridletID, so that the user + // will try to submit only this gridlet + super.send(super.get_id(), resubmissionTime, + SUBMIT_GRIDLET, glID_Int); + } + } // else if + else + { + System.out.println(super.get_name() + ": Receiving Gridlet #" + + gl.getGridletID() + " with status " + + gl.getGridletStatusString() + " at time = " + + GridSim.clock() + " from resource " + + GridSim.getEntityName(gl.getResourceID()) + + " resID: " + gl.getResourceID()); + } + + } // if (obj instanceof Gridlet) + } + + /** + * Prints the Gridlet objects + * @param list the list of gridlets + * @param name the name of the user + * @param detail if we want the gridlet's history or not + * @param gridletLatencyTime array containing the latencies of gridlets. + * Latencies are from the moment when the gridlet is sent, till + * the moment they are back at the user. + * They take into account the last submission of a gridlet + * (when the gridlet is successfully run) + */ + private void printGridletList(GridletList list, String name, + boolean detail, double gridletLatencyTime[]) + { + int size = list.size(); + Gridlet gridlet = null; + + String indent = " "; + System.out.println(); + System.out.println("============= OUTPUT for " + name + " =========="); + System.out.println("Gridlet ID" + indent + "STATUS" + indent + + "Resource ID" + indent + "Cost" + indent + + "CPU Time"+ indent + "Latency"); + + // a loop to print the overall result + int i = 0; + for (i = 0; i < size; i++) + { + gridlet = (Gridlet) list.get(i); + System.out.print(indent + gridlet.getGridletID() + indent + + indent); + + System.out.print(gridlet.getGridletStatusString()); + + System.out.println(indent + indent + gridlet.getResourceID() + + indent + indent + gridlet.getProcessingCost() + + indent + indent + gridlet.getActualCPUTime()+ + indent + indent + + gridletLatencyTime[gridlet.getGridletID()]); + + writeFin(name, gridlet.getGridletID(), + GridSim.getEntityName(gridlet.getResourceID()), + gridlet.getProcessingCost(), gridlet.getActualCPUTime(), + GridSim.clock()); + + + + } + + + if (detail == true) + { + // a loop to print each Gridlet's history + for (i = 0; i < size; i++) + { + gridlet = (Gridlet) list.get(i); + System.out.println(gridlet.getGridletHistory()); + + System.out.print("Gridlet #" + gridlet.getGridletID()); + System.out.println(", length = " + gridlet.getGridletLength() + + ", finished so far = " + + gridlet.getGridletFinishedSoFar()); + System.out.println("======================================\n"); + } + } + + System.out.println("================================================="); + + } + + /** + * This method will show you on how to create Gridlets + * @param userID owner ID of a Gridlet + * @param numGridlet number of Gridlet to be created + */ + private void createGridlet(int userID, int numGridlet) + { + for (int i = 0; i < numGridlet; i++) + { + // Creates a Gridlet + Gridlet gl = new Gridlet(i, gridletLength, gridletInput, gridletOutput); + gl.setUserID(userID); + + // Originally, gridlets are created to be submitted + // as soon as possible (the 0.0 param) + GridletSubmission gst = new GridletSubmission(gl, false); + + // add this gridlet into a list + this.GridletSubmittedList_.add(gst); + } + } + + /** + * Gets a list of received Gridlets + * @return a list of received/completed Gridlets + */ + public GridletList getGridletList() { + return GridletReceiveList_; + } + + /** + * Tells you the possition of this gridlet in the GridletSubmittedList_ + * @param gl the gridlet + * @return the position of this gridlet in the list of submitted gridlets + */ + private int findGridletInGridletSubmittedList(Gridlet gl) + { + Gridlet g = null; + GridletSubmission gst = null; + for (int i = 0; i< GridletSubmittedList_.size(); i++) + { + gst = (GridletSubmission)GridletSubmittedList_.get(i); + g = gst.getGridlet(); + + if ( g.getGridletID() == gl.getGridletID() ) + return i; + } + + return -1; + } + + /** This function resets the gridlet into its original values of + * length and gridletFinishedSoFar + * @param gl the gridlet to be resetted + */ + private void resetGridlet (Gridlet gl) + { + gl.setGridletLength(gridletLength); + gl.setGridletFinishedSoFar(0); + + } + + /** + * Write some data into the final results file. + * @param user user name + * @param glID gridlet id + * @param resName Name of the resource + * @param cost the processing cost of the gridlet + * @param cpu the cpu time + * @param clock Current time + */ + private void writeFin(String user, int glID, String resName, + double cost, double cpu, double clock) + { + if (trace_flag == false) { + return; + } + + // Write into a results file + FileWriter fwriter = null; + try + { + fwriter = new FileWriter(user+"_Fin", true); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while opening file " + user+"_Fin"); + } + + try + { + fwriter.write(user +"\t "+ glID + "\t" + + resName + "\t" + cost + "\t"+ cpu + "\t" + + clock + "\n"); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while writing on file " + user+"_Fin"); + } + + try + { + fwriter.close(); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while closing file " + user+"_Fin"); + } + + } + + /** + * Write some data into a results file. + * @param user user name + * @param event Values: "Sending" or "Receive" a gridlet + * @param glID gridlet id + * @param resName Name of the resource + * @param status Status of the gridlet + * @param clock Current time + * */ + private void write(String user, String event, int glID, String resName, + String status, double clock) + { + if (trace_flag == false) { + return; + } + + // Write into a results file + FileWriter fwriter = null; + try + { + fwriter = new FileWriter(super.get_name(), true); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while opening file " + super.get_name()); + } + + try + { + fwriter.write(user + "\t " + event + "\t" + glID + "\t" + + resName + "\t" + status + "\t\t" + clock + "\t" + "\n"); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while writing on file " + super.get_name()); + } + + + try + { + fwriter.close(); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while closing file " + super.get_name()); + } + + } + + /** + * This function informs the GIS of this user about the failure of a resource + * @param resID the id of the resource which has failed + */ + private void informGIS(int resID) + { + Integer resID_Int = new Integer(resID); + + super.send(super.output, 0.0, AbstractGIS.NOTIFY_GIS_RESOURCE_FAILURE, + new IO_data(resID_Int, Link.DEFAULT_MTU, super.getRegionalGISId()) ); + } + + /** + * Initialize the results files (put headers over each column) + * */ + private void initializeResultsFile() + { + if (trace_flag == false) { + return; + } + + // Initialize the results file + FileWriter fwriter = null; + FileWriter fwriterFin = null; + try + { + fwriter = new FileWriter(super.get_name(), true); + fwriterFin = new FileWriter(super.get_name() + "_Fin", true); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while opening file " + super.get_name() + + " or " + super.get_name()+"_Fin"); + } + + try + { + fwriter.write( + "User \t\t Event \t GridletID \t Resource \t GridletStatus \t\t\t Clock\n"); + fwriterFin.write( + "User \t\t GridletID \t Resource \t Cost \t CPU time \t Latency\n"); + + + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while writing on file " + super.get_name()+ + " or " + super.get_name()+"_Fin"); + } + + try + { + fwriter.close(); + fwriterFin.close(); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while closing file " + super.get_name()+ + " or " + super.get_name()+"_Fin"); + } + } + + /** + * This function retrieves a list of available resources from the GIS. + * @return an array containing the ids of the resources + */ + private int[] getResList() + { + Object[] resList = super.getLocalResourceList(); + int resourceID[] = null; + + // if we have any resource + if ((resList != null) && (resList.length != 0)) + { + resourceID = new int[resList.length]; + for (int x = 0; x < resList.length; x++) + { + // Resource list contains list of resource IDs + resourceID[x] = ((Integer) resList[x]).intValue(); + + if (trace_flag == true) + { + System.out.println(super.get_name() + + ": resource[" + x + "] = " + resourceID[x]); + } + } + + } + + return resourceID; + } + +} // end class Added: trunk/examples/ResFailure/example01/GridletSubmission.java =================================================================== --- trunk/examples/ResFailure/example01/GridletSubmission.java (rev 0) +++ trunk/examples/ResFailure/example01/GridletSubmission.java 2009-05-19 12:18:14 UTC (rev 265) @@ -0,0 +1,56 @@ +package ResFailure.example01; + +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * An example of how to use the failure functionality. + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero and Anthony Sulistio + * Organization: UCLM (Spain) + * Created on: August 2007 + */ + + +import gridsim.Gridlet; + +/** + * This class is just a wrapper to denote + * whether this gridlet has been already submitted or not + * @author Agustin Caminero and Anthony Sulistio + * @since GridSim Toolkit 4.1 + */ +public class GridletSubmission +{ + private Gridlet gl; + private boolean submitted; + + + public GridletSubmission(Gridlet gl,boolean submitted) + { + this.gl = gl; + this.submitted = submitted; + } + + public Gridlet getGridlet() + { + return gl; + } + + public boolean getSubmitted() + { + return submitted; + } + + public void setGridlet(Gridlet g) + { + this.gl = g; + } + + public void setSubmitted(boolean submitted) + { + this.submitted = submitted; + } + +} // end class Added: trunk/examples/ResFailure/example01/ResFailureEx01.java =================================================================== --- trunk/examples/ResFailure/example01/ResFailureEx01.java (rev 0) +++ trunk/examples/ResFailure/example01/ResFailureEx01.java 2009-05-19 12:18:14 UTC (rev 265) @@ -0,0 +1,328 @@ +package ResFailure.example01; + +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * An example of how to use the failure functionality. + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero and Anthony Sulistio + * Organization: UCLM (Spain) + * Created on: August 2007 + */ + +import gridsim.resFailure.*; +import gridsim.*; +import gridsim.net.*; +import java.util.*; +import gridsim.util.NetworkReader; +import gridsim.util.HyperExponential; + + +/** + * This example shows a basic topology with 1 user, 3 resources and 1 GIS. + * All of them are connected by a router. + * There is only one VO in this example. + * @author Agustin Caminero and Anthony Sulistio + * @since GridSim Toolkit 4.1 + */ +public class ResFailureEx01 +{ + public static void main(String[] args) + { + System.out.println("Starting failure example 1..."); + + try + { + if (args.length < 1) + { + System.out.println("Usage: java ResFailureEx01 network_ex01.txt"); + return; + } + + + ////////////////////////////////////////// + // First step: Initialize the GridSim package. It should be called + // before creating any entities. We can't run this example without + // initializing GridSim first. We will get a run-time exception + // error. + + // a flag that denotes whether to trace GridSim events or not. + boolean trace_flag = false; // dont use SimJava trace + int num_user = 1; // number of grid users + Calendar calendar = Calendar.getInstance(); + + // Initialize the GridSim package + System.out.println("Initializing GridSim package"); + GridSim.init(num_user, calendar, trace_flag); + trace_flag = true; + + + ////////////////////////////////////////// + // Second step: Builds the network topology among Routers. + + String filename = args[0]; // get the network topology + System.out.println("Reading network from " + filename); + LinkedList routerList = NetworkReader.createFIFO(filename); +... [truncated message content] |
From: <mar...@us...> - 2009-05-19 11:41:11
|
Revision: 264 http://gridsim.svn.sourceforge.net/gridsim/?rev=264&view=rev Author: marcos_dias Date: 2009-05-19 11:41:03 +0000 (Tue, 19 May 2009) Log Message: ----------- I am reorganising the examples in packages. The examples will be placed in the repository with the next commit. Removed Paths: ------------- trunk/examples/Auction/ trunk/examples/DataGrid/ trunk/examples/Network/ trunk/examples/ResFailure/ trunk/examples/WorkloadTrace/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-05-19 11:37:48
|
Revision: 263 http://gridsim.svn.sourceforge.net/gridsim/?rev=263&view=rev Author: marcos_dias Date: 2009-05-19 11:37:34 +0000 (Tue, 19 May 2009) Log Message: ----------- I am reorganising the examples in packages. The examples will be placed in the repository with the next commit. Removed Paths: ------------- trunk/examples/Auction/README.txt trunk/examples/Auction/example_of_use.pdf trunk/examples/Network/README.txt trunk/examples/README.txt Deleted: trunk/examples/Auction/README.txt =================================================================== --- trunk/examples/Auction/README.txt 2009-05-19 11:36:57 UTC (rev 262) +++ trunk/examples/Auction/README.txt 2009-05-19 11:37:34 UTC (rev 263) @@ -1,11 +0,0 @@ - -This directory contains few GridSim auction extension examples. -Here are the summary of what each example does: -./AuctionEx01 : shows how to use reverse auctions, i.e. the lowest bid - is the better and auctions are started by buyers. - -./AuctionEx02 : shows how to use different auctions, such as English, Ducth - and First Price Seal Bid. - -NOTE: Detailed explanations are provided in the source file(s). - Deleted: trunk/examples/Auction/example_of_use.pdf =================================================================== --- trunk/examples/Auction/example_of_use.pdf 2009-05-19 11:36:57 UTC (rev 262) +++ trunk/examples/Auction/example_of_use.pdf 2009-05-19 11:37:34 UTC (rev 263) @@ -1,1373 +0,0 @@ -%PDF-1.4 -%äüöß -2 0 obj -<< /Length 3 0 R - /Filter /FlateDecode ->> -stream -x\x9C\xBD]ێ\xE68n\xBEo\xA0\xDF\xE1\xBF^ \xB5:ْ\x80\xC6\xD5u\xC8\xF5$ -\xE4\x92M\xF4,\xB0{\xB3\xAF\x89\xB6$J\xA4h\xB9\xAA'\xA0\xA7쟢$\x8A\xFCx\x90-\xAB\xC7?\xBF~\xF9\xFBC=\xFEE=\xE9ǮM\xFA\xD7\xC7\xFC\xEF?\xFE\xEB\xF1z\xFC\xED\xF85\xFF\xF7\x8F\xFF\xFE\xFA\xE5\xFB\x8F\xAF_\xB4\xF1O\xF1\xE1\xD5\xF6\xF8\xF1\x9F\x8F?\xBF\xEB\x87\xDE?\xFE\xFA\xF8\xA6\xF4_?\xFE\xF7\xEB\x97\xF8u\xFA\xED\x9B2\xCA*w\xDCM\x8D\xB6r{S\xFBq3u\xE7\xCAM\xAF\x82\x8A\xEA\xF9\xA4v\x8D:\xA8\xEF'\xF5\xD6n\xBE\xB7\xF6'\xB3\xD0\xFE\xF5\xB8Zgo@\xFE~ܷ\xEAɟ?h\xA5u!ױ\xF2\xD0清\xB8FmU\xD0No'\xD7FR\xE7\x8C8(\xAF˜C\xED-19\x9Bk\xFBdK_yd\xE74\xB4\xAF\xB7;\xDA:\x8F\xA0\x91M\xA1\xDBK2|\x8Bux#\xAB\xFCω\xBC\xA5e\xFF\x8Dj\x82\xB16+\x8DϪSt\xC1\x81.\xE8ge\xC9t\xCB\xC0\\xBB\xA3\xC92\xA6\x81\xA5Y\x9D+n\xF6ah6i^\x912i\x9AF\xE5Ϧ\xA6\xFDPW:\x89no\xD4/i\xB5\xAD>\xE5`u\x9A\xC4\xD9\xD9+\x95(\xED\xF74\xA5}\xDB\xD2\xE8\x8A\xCC!\x87PT\xAF \xA1̥\xADmu\xD0oi꧸-2\x8BM\xAB\xAA\x90tE\x91\xDAX\xFD\x9E&zJŨ\xCA!\xFD\x91D\x9B\x8F\xDA\xD9KY\xA0*\xA5ב\x86\xBFQ\xEC \xCBRl\xDDD\x8D\xAE\x84E&\xC6Tml\xA6غ\x9E\xF3+\x8B\xD2\x82\xB1\x95\xB9\xB4gCs\xC8V\xE5\xA7[D\x990 -9\xC8:\xB1\xEB\xD4`w\xD9Ʃ\xDFG\x9D`&VG\xA2\xDBH\xD2\xF0^\x8B\xE8G\x8D\x92\xD4mi\x87\xE4`9\xA8b«]\xE3\xDD\xD4\xAD(\xD2-M\x89\xC6r-\xEDЬi\x9FM\xCDn\x8At+-_\xC3\xD84\xCD\xD7:\xC0J\xBF\x93E *\x91\xE6\xE6\x89tCqs\xBA3\xB1\xF72?\xDD\xC9\xDD\xD3i\xDD4\x8B\xC2e\xE8M\xDD\xEF\x8F\xDDd \xF4\xEAeё74\x8A\xDF\xEBMߺ5\xE3\x8C͆Z\xA3e)\xF0\x84\x98p6\x9BS\xF1\x9E+\xD6 f\xB0\xD9LUY\x95\xADE?\xEEꑗQK\xF0Ҭ?2\xF4\xD8\xCA+\xE5bv:;\xDF~\xA5ҺP\xBB\xA4\xA8\xB7\xA2\x85&\x8C\xC3jw\xE6\xDE\xEE\xECS\x93*W\x85\xD4;\x82n@\xF9\x97\xEA][\x8B\x8C\x87\xEA\xAAUxl\xDE\xFF\xC8)+U\xC1\xEA\xD5\xFB\xD7\xE9\xD6\xE0%\xA3\x98&r\xAD\xAAc\xA2cB\xB9O\xFBH\xA8\xB8\xA9h\xAAxL\xE7\xD9[_7;4\xB2\xA1\xB3\xA5\xB6FL\x85\xDE\xF9\x80!\xCC\xF5\x92B\x87\xDB|\xC6U*c(:\xCBzD\x8C\x94XM_\xA0N;\x89\xF0C\xAB\xD3Z\xD5\xD1+γ 2E\xB1F\x99\xB6Y҇[Z\xB4\x9D.p\xA2+\x91\xE1}(\x9A]\x986\xB7<Z\x8E\xD5S\xE4\xC6"\xD1E8\xD5c\xDB\x8D\xEFcC\xABy\xCADC\xD8w\xD2P\xF0\x88%\xF1d\xE2\xADB\xFE\xDFts<\x84 \x93!:\x9A<F\xD1Q\xD4)X\xCDα -\xFC\xBA\xF13ʀ\xAD\xEE\x92!\xABg\xF4ܠg\xE5+19\x8D?\xB3\xF5\xE6\xD4ޔ\xC0\xCD\xFBm^\xF3\xAE\x88h,mXe&PK6H\xCF}\xC1A\xA7\HH^to\xC0C!\x80\xF3\xA8-\xEE\xD4\xEARā-*\xFB\x92gj(\xD0E\xFF1 \x83)H\xE4<E"\x92U6\xA8\x8D\xCCz\xB4x\xAB\xCB²\xAD\x8E'[և\xFD\x99\xD0#\x8C\xA2\xBE\x96\xD3sV\xC9\xD7\xD7z\xA3\xA5\xA12\x84\xC0/D`k\x83m\xE6H\x8762wRуuqU(e\xDCPQ\x8Fn\xED\x83F\xB1\x95ks\xF1ZC\x8C2faY\xB5Y\x99gS\xD2P\xE4ߋ\xDE\xD2(\xB26|1\xAFf7o\xE6\xBDB\xE6\xDEV\x84\x90_\xF4\xECI\xCFs\xF9\xCD\xEBf\xA2\xD4+(\xCDU5!c2\xAB\x8EJޥd7\xA2\xF1\xA60谀)\xD6\xD1V\x90ء\x9A\x82<\x92\xA4Y -\x95Du\x99r\xA2\xEC{Ǽ eR\xF7b#Qdc\xC5\xE7n\xCF\UFH\xF2v\xA2\xACh\xB0\xBF\xC2\xD0Q\xD2\x91\xA5>\xAE\x{18ACDC}\x8D"$\xFE>\xF9\xEA\xEF\xA7\xA4\xBB$uLĀJM\xB8\xBB\x9A\xD4\pe\x9A\xB7k\xC5BT\xB6\xB2rB\x86!\xEB\xE7\xAA\xF0\x97\xB9\x9A\xB3F\xCD\xE03!\xCB'\xEDP\xC25\xAE\xB1&A iErff\xC1\xE2\xB0ˁ\xCAS\xB2\x92\xC9e\xF2;\xB6\xF4P!\xB0fqG\x96\xD8,\xD8;fĨ\xE4\xFCR\x90\x88\xDD1\x99o\xD6H;&\xB4H\xD5*z\xE2B-O\x85\xA5Z -\x83\x88\x91\xCFGDm\x8E\xE6\x9C՝\xACa\xCE\xC5\x8A\xC0\x9C\x98c\x98\xBD\xB8|58 H=e\xBE0\xBBia\x8AF_\x95Gv\xE7-U\x89\xD8N\x98\xB9l5\xA4Sw\x86!gK~\xDF\xDC\xE9\xAFi\xCAl\x99p\xE1\x9Er\xAE\x94d\x84\xCA\xEB\xDC\x93x\xF7\xA2\x89\xD3\xD9ʉ\x850\xDB_[\x80\xAC}\xA2\x823\xA1\xF3\xCE¨8_\xFA\xA1\xA5\x93\Q\xC9E\xBA\x89\x9F7>\xE0\x96\xF0^x\xDB\xA3\xA9\x87nܪ\x86\xD2Zf!K\xBD\x90Rb\xB2\xD6\xC8\x9F\xDB}+\xA0M\xEBU3\xD9^\xB8\xF9\xD2\\x89A\xA8\xF7\xBCWe\xC2\xD5\xFB\xEB\xC4\xE4\x94%I6\x8D\x80Gc\xD5@\x99\xFB&\xF9\xF4\xB5M\xF0\xDANX=jJB&g\xA6\xFD_ڐעFe62*\xAEJJ\xC6mi/o\xF0J\xE3*\xF2\xBF\xA4T$\x88\xBA\xDF˙\xB6ݎZ\xDD\xE3v\xDE\xE3\xF5\xEA^\xECv mŻ\x92\xBBG\xBBB\xB7\xD38A\x80Aɰ\x86\xC2-Y3{\xB5\xF3 -\xE3\x98\xB4\xB5\xE2wCS\xC8"ͧ\xD6\x84\xB1>\xE30\xFC\xF6 ρm\x8D\x90\xF7\xA1W\x8Eݖ\xF4\xD2W\x86zGR*\xA3\xD3p\xDC4\xE8\xD6 |
From: <mar...@us...> - 2009-05-19 11:37:04
|
Revision: 262 http://gridsim.svn.sourceforge.net/gridsim/?rev=262&view=rev Author: marcos_dias Date: 2009-05-19 11:36:57 +0000 (Tue, 19 May 2009) Log Message: ----------- I am reorganising the examples in packages. The examples will be placed in the repository with the next commit. Removed Paths: ------------- trunk/examples/ResFailure/README.txt trunk/examples/WorkloadTrace/README.txt trunk/examples/WorkloadTrace/custom_trace.txt trunk/examples/WorkloadTrace/l_lanl_o2k.swf.txt trunk/examples/WorkloadTrace/l_sdsc_blue.swf.txt Deleted: trunk/examples/ResFailure/README.txt =================================================================== --- trunk/examples/ResFailure/README.txt 2009-05-19 11:24:54 UTC (rev 261) +++ trunk/examples/ResFailure/README.txt 2009-05-19 11:36:57 UTC (rev 262) @@ -1,18 +0,0 @@ - -This directory contains few examples regarding to -resource failure functionalities. -Here are the summary of what each example does: -./ResFailureEx01 : shows a very basic example, - dealing with 1 user, 3 resources and 1 GIS entities. - -./ResFailureEx02 : shows a basic example, - dealing with 20 users, 6 resources and 1 GIS entities. - -./ResFailureEx03 : shows a more complex example, - dealing with 30 users, 15 resources and 3 GIS entities. - However, you can modify these parameters as you wish, - but keep in mind that the simulation might run longer - if you increase the numbers. - -NOTE: Detailed explanations are provided in the source file(s). - Deleted: trunk/examples/WorkloadTrace/README.txt =================================================================== --- trunk/examples/WorkloadTrace/README.txt 2009-05-19 11:24:54 UTC (rev 261) +++ trunk/examples/WorkloadTrace/README.txt 2009-05-19 11:36:57 UTC (rev 262) @@ -1,29 +0,0 @@ - -This directory contains many GridSim examples. -Here are the summary of what each example does: -./TraceEx01 : shows how to use the GridSim workload trace functionality. - This example shows each Workload entity sends Gridlets to - a particular grid resource. - No other GridSim user entities are created. - -./TraceEx02 : shows how to use the GridSim workload trace functionality. - This example creates three entities: User, Workload and GridResource - WITHOUT a network topology. The User and Workload entity sends Gridlets - to a particular GridResource entity. - -./TraceEx03 : shows how to use the GridSim workload trace functionality. - This example creates three entities: NetUser, Workload and GridResource - WITH a network topology. The NetUser and Workload entity sends Gridlets - to a particular GridResource entity. - -============================================================ - -This directory contains several files: -./custom_tags.txt : A custom trace file used in the experiments. -./l_lanl_o2k.swf.txt : A trace file from LANL Origin 2000 Cluster (Nirvana) -./l_sdsc_blue.swf.txt : A trace file from SDSC Blue Horizon - -./README.txt : this file - - -NOTE: Detailed explanations are provided in the source file(s). Deleted: trunk/examples/WorkloadTrace/custom_trace.txt =================================================================== --- trunk/examples/WorkloadTrace/custom_trace.txt 2009-05-19 11:24:54 UTC (rev 261) +++ trunk/examples/WorkloadTrace/custom_trace.txt 2009-05-19 11:36:57 UTC (rev 262) @@ -1,33 +0,0 @@ -# -# Nov 2004 - Anthony -# This is a custom tag. -# You need to tell gridsim.util.Workload entity what to expect, by -# calling Workload.setField() and/or Workload.setComment() -# For example: for this file, -# // parameters: maxField, job_num, submit_time, run_time, num_processors -# Workload.setField(4, 1, 2, 3, 4); -# Workload.setComment("#"); -# -# Format of each row is: -# job_num submit_time run_time number_of_processors - -1 5 20 3 -2 8 60 1 -3 10 30 4 -4 12 90 3 -5 15 30 4 -6 20 90 2 -7 20 90 6 -8 20 60 1 -9 21 80 1 -10 22 90 3 -11 23 90 2 -12 23 90 2 -13 23 90 1 -14 24 90 2 -15 25 60 1 -16 26 90 2 -17 27 60 1 -18 28 50 1 -19 29 90 1 -20 30 90 9 Deleted: trunk/examples/WorkloadTrace/l_lanl_o2k.swf.txt =================================================================== --- trunk/examples/WorkloadTrace/l_lanl_o2k.swf.txt 2009-05-19 11:24:54 UTC (rev 261) +++ trunk/examples/WorkloadTrace/l_lanl_o2k.swf.txt 2009-05-19 11:36:57 UTC (rev 262) @@ -1,50 +0,0 @@ -; Version: 2.1 -; Computer: Origin 2000 -; Installation: LANL -; Acknowledge: Fabrizio Petrini -; Information: http://www.acl.lanl.gov/ -; http://www.cs.huji.ac.il/labs/parallel/workload/ -; Conversion: Dror Feitelson (fe...@cs...) Jan 8 2004 -; MaxJobs: 121989 -; MaxRecords: 121989 -; Preemption: No -; UnixStartTime: 943135493 -; TimeZone: 0 -; StartTime: Saturday, 20 Nov 99, 22:04:53 -; EndTime: Thursday, 6 Apr 100, 15:56:52 -; MaxNodes: 2048 -; MaxProcs: 2048 -; Queue: 1 short -; Queue: 2 long -; Queue: 3 small -; Queue: 4 medium -; Queue: 5 large -; Queue: 6 xlarge -; Queue: 7 small-d -; Queue: 8 medium-d -; Queue: 9 large-d -; Queue: 10 xlarge-d -; Queue: 11 chammpq -; Queue: 12 schammpq -; Queue: 13 mchammpq -; Queue: 14 shared -; Queue: 15 ir-shared -; Queue: 16 scavenger -; Queue: 17 test -; -; NOTE (Nov 2004 - Anthony): -; * The original size of this file was 10.1MB uncompressed and 2MB gzip compressed -; With number of Jobs: 121,989. -; * It would take lots of memory and time to run from this trace file. -; * Therefore, I reduce this trace file only to small jobs. -; - 1 0 976745 58 16 1 2496 16 -1 -1 1 9 -1 -1 2 -1 -1 -1 - 2 669758 332343 29880 64 26086 110784064 64 -1 -1 1 58 -1 -1 3 -1 -1 -1 - 3 704837 308807 25446 64 0 -1 64 -1 -1 0 58 -1 -1 3 -1 -1 -1 - 4 704870 536636 35608 64 29285 111324864 64 -1 -1 1 58 -1 -1 3 -1 -1 -1 - 5 751912 347382 10142 128 9381 3149984 128 -1 -1 1 61 -1 -1 3 -1 -1 -1 - 6 755789 776924 67 128 0 2848 128 -1 -1 1 61 -1 -1 3 -1 -1 -1 - 7 756680 322625 44344 48 18348 4793040 48 -1 -1 0 46 -1 -1 3 -1 -1 -1 - 8 757895 507219 39731 64 33816 69612400 64 -1 -1 1 58 -1 -1 3 -1 -1 -1 - 9 761488 1192467 10304 128 9339 3053840 128 -1 -1 1 61 -1 -1 3 -1 -1 -1 - 10 762192 251933 34477 16 33187 2904976 16 -1 -1 1 55 -1 -1 3 -1 -1 -1 \ No newline at end of file Deleted: trunk/examples/WorkloadTrace/l_sdsc_blue.swf.txt =================================================================== --- trunk/examples/WorkloadTrace/l_sdsc_blue.swf.txt 2009-05-19 11:24:54 UTC (rev 261) +++ trunk/examples/WorkloadTrace/l_sdsc_blue.swf.txt 2009-05-19 11:36:57 UTC (rev 262) @@ -1,42 +0,0 @@ -; Version: 2.1 -; Computer: IBM SP -; Installation: SDSC Blue Horizon -; Acknowledge: Travis Earheart and Nancy Wilkins-Diehr -; Information: http://www.sdsc.edu/ -; Information: http://www.cs.huji.ac.il/labs/parallel/workload/ -; Conversion: Dror Feitelson (fe...@cs...) Jan 9 2004 -; UnixStartTime: 956700003 -; TimeZone: -28800 -; StartTime: Tuesday, 25 Apr 2000, 22:00:03 -; EndTime: Wednesday, 1 Jan 2003, 11:25:42 -; MaxNodes: 144 (each an 8-way SMP) -; MaxProcs: 1152 -; MaxJobs: 250440 -; MaxRecords: 250440 -; Queue: 0 interactive -; Queue: 1 express (max 8 nodes 2 hr) -; Queue: 2 high (max 36 hr) -; Queue: 3 normal (max 36 hr) -; Queue: 4 low -; Queue: 5 standby -; Queue: 6 diagnostics/testing -; Queue: 7 other (mainly unknown) -; Information: 375 MHz Power3 processors -; Information: 4 GB memory per node (shared by 8 processors) -; -; NOTE (Nov 2004 - Anthony): -; * The original size of this file was 19.7MB uncompressed and 3.7MB gzip compressed -; With number of Jobs: 250,440. -; * It would take lots of memory and time to run from this trace file. -; * Therefore, I reduce this trace file only to small jobs. -; - 1 0 649886 9227 1152 6890 -1 1152 20000 -1 1 34 -1 -1 2 -1 -1 -1 - 2 111 522045 7622 1120 5584 -1 1120 20000 -1 0 34 -1 -1 2 -1 -1 -1 - 3 68486 573957 710 1024 186 -1 1024 10800 -1 1 14 -1 -1 2 -1 -1 -1 - 4 252418 351149 -1 0 0 -1 1024 600 -1 0 28 -1 -1 3 -1 -1 -1 - 5 263801 340477 -1 0 0 -1 1024 600 -1 0 28 -1 -1 3 -1 -1 -1 - 6 265065 281535 3389 800 49 -1 800 7200 -1 1 22 -1 -1 2 -1 -1 -1 - 7 393152 16 48438 64 48168 -1 64 57600 -1 1 132 -1 -1 3 -1 -1 -1 - 8 412251 12 46744 64 46465 -1 64 64800 -1 1 132 -1 -1 3 -1 -1 -1 - 9 430593 13 50866 256 25381 -1 256 64800 -1 1 95 -1 -1 4 -1 -1 -1 - 10 430730 31 10770 256 5343 -1 256 28800 -1 1 95 -1 -1 4 -1 -1 -1 \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-05-19 11:25:08
|
Revision: 261 http://gridsim.svn.sourceforge.net/gridsim/?rev=261&view=rev Author: marcos_dias Date: 2009-05-19 11:24:54 +0000 (Tue, 19 May 2009) Log Message: ----------- I am reorganising the examples in packages. The examples will be placed in the repository with the next commit. Removed Paths: ------------- trunk/examples/Auction/AuctionEx01/ trunk/examples/Auction/AuctionEx02/ trunk/examples/Auction/AuctionEx03/ trunk/examples/DataGrid/example1/ trunk/examples/DataGrid/example2/ trunk/examples/DataGrid/example3/ trunk/examples/DataGrid/example4/DataGridSim.java trunk/examples/DataGrid/example4/FilesReader.java trunk/examples/DataGrid/example4/ParameterReader.java trunk/examples/DataGrid/example4/README.txt trunk/examples/DataGrid/example4/ResourceReader.java trunk/examples/DataGrid/example4/SimUser.java trunk/examples/DataGrid/example4/UserReader.java trunk/examples/DataGrid/example4/files.txt trunk/examples/DataGrid/example4/network.txt trunk/examples/DataGrid/example4/output.txt trunk/examples/DataGrid/example4/parameters.txt trunk/examples/DataGrid/example4/resources.txt trunk/examples/DataGrid/example4/users.txt trunk/examples/DataGrid/tutorial/Simulation.html trunk/examples/DataGrid/tutorial/connectEntities.html trunk/examples/DataGrid/tutorial/createNetwork.html trunk/examples/DataGrid/tutorial/createTopLevelRC.html trunk/examples/DataGrid/tutorial/createUsers.html trunk/examples/DataGrid/tutorial/creatingResources.html trunk/examples/DataGrid/tutorial/design_architecture.html trunk/examples/DataGrid/tutorial/getting_started.html trunk/examples/DataGrid/tutorial/img/ trunk/examples/DataGrid/tutorial/index.html trunk/examples/DataGrid/tutorial/initialization.html trunk/examples/DataGrid/tutorial/writingRC.html trunk/examples/DataGrid/tutorial/writingRM.html trunk/examples/Example01/ trunk/examples/Example02/ trunk/examples/Example03/ trunk/examples/Example04/ trunk/examples/Example05/ trunk/examples/Example06/ trunk/examples/Example07/ trunk/examples/Example08/ trunk/examples/Example09/ trunk/examples/Example10/ trunk/examples/Network/FiniteBuffer01/ trunk/examples/Network/Flow/Example01/ trunk/examples/Network/Flow/Example02/ trunk/examples/Network/NetEx01/ trunk/examples/Network/NetEx02/ trunk/examples/Network/NetEx03/ trunk/examples/Network/RateExample/ trunk/examples/Network/SCFQExample/ trunk/examples/RegionalGIS/ trunk/examples/ResFailure/ResFailureEx01/ trunk/examples/ResFailure/ResFailureEx02/ trunk/examples/ResFailure/ResFailureEx03/ trunk/examples/WorkloadTrace/TraceEx01/ trunk/examples/WorkloadTrace/TraceEx02/ trunk/examples/WorkloadTrace/TraceEx03/ Deleted: trunk/examples/DataGrid/example4/DataGridSim.java =================================================================== --- trunk/examples/DataGrid/example4/DataGridSim.java 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/DataGridSim.java 2009-05-19 11:24:54 UTC (rev 261) @@ -1,103 +0,0 @@ -/* - * Title: GridSim Toolkit - * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation - * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html - */ - -import eduni.simjava.Sim_system; -import gridsim.*; -import gridsim.datagrid.index.*; -import gridsim.net.FIFOScheduler; -import gridsim.net.Link; -import gridsim.net.Router; -import gridsim.net.SimpleLink; -import gridsim.util.NetworkReader; -import java.util.Calendar; -import java.util.LinkedList; -import gridsim.net.flow.*; // To use the new flow network package - GridSim 4.2 - -/** - * This is the main class of the simulation package. It reads all the parameters - * from a file, constructs the simulation defined in the configuration files, - * and runs the simulation. - * @author Uros Cibej and Anthony Sulistio - */ -public class DataGridSim { - - public static void main(String[] args) { - System.out.println("Starting data grid simulation ..."); - - try { - if (args.length != 1) { - System.out.println("Usage: java Main parameter_file"); - return; - } - - //read parameters - ParameterReader.read(args[0]); - - int num_user = ParameterReader.numUsers; // number of grid users - Calendar calendar = Calendar.getInstance(); - boolean trace_flag = false; // means trace GridSim events - boolean gisFlag = false; // means using DataGIS instead - - // Initialize the GridSim package - System.out.println("Initializing GridSim package"); - GridSim.init(num_user, calendar, trace_flag, gisFlag); - - // NOTE: uncomment this if you want to use the new Flow extension - //GridSim.initNetworkType(GridSimTags.NET_FLOW_LEVEL); - - // set the GIS into DataGIS that handles specifically for data grid - // scenarios - DataGIS gis = new DataGIS(); - GridSim.setGIS(gis); - - //some default values - double baud_rate = 100000000; // 100MB/sec - double propDelay = 10; // propagation delay in millisecond - int mtu = 1500; // max. transmission unit in bytes - - //read available files - LinkedList files = FilesReader.read(ParameterReader.filesFilename); - - //------------------------------------------- - //read topology - LinkedList routerList = NetworkReader.createFIFO(ParameterReader.networkFilename); - - //attach central RC entity to one of the routers - //Create a central RC - Link l = new SimpleLink("rc_link", baud_rate, propDelay, mtu); - - // NOTE: uncomment this if you want to use the new Flow extension - //LinkedList routerList = NetworkReader.createFlow(ParameterReader.networkFilename); - //Link l = new FlowLink("rc_link", baud_rate, propDelay, mtu); - //------------------------------------------- - - TopRegionalRC rc = new TopRegionalRC(l); - - //connect the TopRC to a router specified in the parameters file - Router r1 = NetworkReader.getRouter(ParameterReader.topRCrouter, - routerList); - FIFOScheduler gisSched = new FIFOScheduler(); - r1.attachHost(rc, gisSched); // attach RC - - //create resources - LinkedList resList = ResourceReader.read(ParameterReader.resourceFilename, - routerList, files); - - //create users - LinkedList users = UserReader.read(ParameterReader.usersFilename, - routerList, resList); - - GridSim.startGridSimulation(); - System.out.println("\nFinish data grid simulation ..."); - - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Unwanted errors happen"); - } - } - -} Deleted: trunk/examples/DataGrid/example4/FilesReader.java =================================================================== --- trunk/examples/DataGrid/example4/FilesReader.java 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/FilesReader.java 2009-05-19 11:24:54 UTC (rev 261) @@ -1,60 +0,0 @@ -/* - * Title: GridSim Toolkit - * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation - * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html - */ - -import gridsim.datagrid.File; -import java.io.*; -import java.util.*; - - -/** - * Creates a list of master files from a given file - * @author Uros Cibej - */ -public class FilesReader { - - public static LinkedList read(String filename) { - LinkedList files = null; - - try { - FileReader fRead = new FileReader(filename); - BufferedReader b = new BufferedReader(fRead); - files = createFiles(b); - } catch (Exception exp) { - System.out.println("FilesReader:-File not found"); - System.exit(-1); - } - - return files; - } - - private static LinkedList createFiles(BufferedReader buf) - throws Exception { - String line; - String name; - String size; - StringTokenizer str; - File f; - LinkedList files = new LinkedList(); - - while ((line = buf.readLine()) != null) { - str = new StringTokenizer(line); - - // parse the name and size of file - name = str.nextToken(); - - if (!name.startsWith("#")) { - size = str.nextToken(); - - // size is given in Mb - f = new File(name, Integer.parseInt(size)); - files.add(f); - } - } - - return files; - } -} Deleted: trunk/examples/DataGrid/example4/ParameterReader.java =================================================================== --- trunk/examples/DataGrid/example4/ParameterReader.java 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/ParameterReader.java 2009-05-19 11:24:54 UTC (rev 261) @@ -1,68 +0,0 @@ -/* - * Title: GridSim Toolkit - * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation - * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html - */ - -import java.io.BufferedReader; -import java.io.FileReader; -import java.util.StringTokenizer; - - -/** - * Reads the parameter file and pass each line to its respective reader. - * @author Uros Cibej and Anthony Sulistio - */ -public class ParameterReader { - - public static String filesFilename; - public static String networkFilename; - public static String resourceFilename; - public static String usersFilename; - public static String catalogueFilename; - public static int numUsers; - public static String topRCrouter; - public static boolean useLocalRC = true; - - public static void read(String filename) { - try { - FileReader fRead = new FileReader(filename); - BufferedReader buf = new BufferedReader(fRead); - String line; - String name; - String value; - StringTokenizer str; - - while ((line = buf.readLine()) != null) { - if (!line.startsWith("#")) { //ignore comments - str = new StringTokenizer(line); - - //parse the name and size of file - name = str.nextToken("="); - value = str.nextToken(); - - if (name.equals("files")) { - filesFilename = value; - } else if (name.equals("network")) { - networkFilename = value; - } else if (name.equals("resources")) { - resourceFilename = value; - } else if (name.equals("users")) { - usersFilename = value; - } else if (name.equals("numUsers")) { - numUsers = Integer.parseInt(value); - } else if (name.equals("topRCrouter")) { - topRCrouter = value; - } else if (name.equals("useLocalRC")) { - useLocalRC = Boolean.getBoolean(value); - } else { - System.out.println("Unknown parameter " + name); - } - } - } - } catch (Exception exp) { - System.out.println("File not found"); - } - } -} Deleted: trunk/examples/DataGrid/example4/README.txt =================================================================== --- trunk/examples/DataGrid/example4/README.txt 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/README.txt 2009-05-19 11:24:54 UTC (rev 261) @@ -1,52 +0,0 @@ - -/** - * Author: Uros Cibej and Anthony Sulistio - * Date: March 2006 - */ - -This is an example of the simulation package of GridSim.datagrid. -It demonstrates how a simulation can easily be built using -a set of configuration files. - -A network with 5 routers is described in network.txt -7 files are defined in files.txt -3 resources in resources.txt and -2 users in users.txt. - -Each of these two users must execute a small set of tasks. -A more detailed description of this package can be found in the tutorial. - -To compile the example source code: - In Unix/Linux: javac -classpath $GRIDSIM/jars/gridsim.jar:. DataGridSim.java - In Windows: javac -classpath %GRIDSIM%\jars\gridsim.jar;. DataGridSim.java - -where $GRIDSIM or %GRIDSIM% is the location of the gridsimtoolkit package. - - -To run the class file: - In Unix/Linux: java -classpath $GRIDSIM/jars/gridsim.jar:. DataGridSim parameters.txt > file.txt - In Windows: java -classpath %GRIDSIM%\jars\gridsim.jar;. DataGridSim parameters.txt > file.txt - - -The above command means run the program and output the results into a file -named "file.txt" rather than into screen or standard output. -To prevent from overwriting an existing file, I renamed "file.txt" into -"output.txt" -NOTE: When you open "output.txt" file, it tells you that grid user entities - sending Gridlets to a selected grid resource. - - -When running the example file, it will produce the following files: - - sim_trace -> created by the SimJava2 package (lower-level) to trace every - events (performed by SimJava and GridSim) during the simulation. - We don't need to worry about this file. Not to important for our - example. - - sim_report -> created by the SimJava2 package (lower-level) of GridSim. - This is a simulation report that contains general information about - running this experiment. We don't need to worry about this file. - Not to important for our example. - -NOTE: sim_trace and sim_report file will be overwritten if running - a new experiment. Deleted: trunk/examples/DataGrid/example4/ResourceReader.java =================================================================== --- trunk/examples/DataGrid/example4/ResourceReader.java 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/ResourceReader.java 2009-05-19 11:24:54 UTC (rev 261) @@ -1,318 +0,0 @@ -/* - * Title: GridSim Toolkit - * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation - * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html - */ - -import gridsim.*; -import gridsim.datagrid.DataGridResource; -import gridsim.datagrid.File; -import gridsim.datagrid.SimpleReplicaManager; -import gridsim.datagrid.index.TopRegionalRC; -import gridsim.datagrid.storage.HarddriveStorage; -import gridsim.datagrid.storage.Storage; -import gridsim.net.*; -import gridsim.util.NetworkReader; - -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; - -import java.util.Calendar; -import java.util.LinkedList; -import java.util.StringTokenizer; - - -/** - * Creates one or more DataGrid resources with a default set of parameters, - * such as num of CPUs, CPU rating, etc. - * @author Uros Cibej and Anthony Sulistio - */ -public class ResourceReader { - - /** - * Reads a description of resources from a file and creates the - * DataGridResources. - * - * @param filename - * the name of the file where the resources are specified - * @param routers - * the list of routers which have already been created - * @param files - * the list of files which have already been created - * @return the list of resources which have been read from the file - * @throws Exception - */ - public static LinkedList read(String filename, LinkedList routers, - LinkedList files) throws Exception { - LinkedList resourceList = null; - - try { - FileReader fRead = new FileReader(filename); - BufferedReader b = new BufferedReader(fRead); - resourceList = createResources(b, routers, files); - } catch (IOException exp) { - System.out.println("File not found"); - } - - return resourceList; - } - - /** - * Create a set of DataGridResources, described in a files. - * - * @param buf - * buffer with the description of resources - * @param routerList - * the list of available routers - * @param files - * the list of available files - * @return a list of created DataGridResources - * @throws Exception - */ - private static LinkedList createResources(BufferedReader buf, - LinkedList routerList, LinkedList files) throws Exception { - String line; - String routerName; - String resourceName; - String regionalRC; - double storage_size; - double bandwidth; - - DataGridResource r1; - DataGridResource r2; - Router tempRouter; - Link tempLink; - LinkedList resourceList = new LinkedList(); - StringTokenizer str; - - while ((line = buf.readLine()) != null) { - str = new StringTokenizer(line); - resourceName = str.nextToken(); - - if (!(resourceName.startsWith("#"))) { - storage_size = Double.parseDouble(str.nextToken()); - bandwidth = Double.parseDouble(str.nextToken()); - routerName = str.nextToken(); // read the router name - - if (ParameterReader.useLocalRC) { - regionalRC = null; - } else { - regionalRC = str.nextToken(); - } - - r1 = createStandardResource(resourceName, storage_size, - bandwidth, regionalRC); - - // attach the resource to a router - tempRouter = NetworkReader.getRouter(routerName, routerList); - - if (tempRouter != null) { - tempRouter.attachHost(r1, new FIFOScheduler(r1.get_name() - + "_scheduler")); - - } else { - System.out.println( - "ERROR - Resource reader- non existing router"); - } - - // read and add the files to the resource - while (str.hasMoreTokens()) { - String filename = str.nextToken(); - System.out.println("Adding file " + filename); - - File tempFile = findFile(filename, files); - r1.addFile(tempFile); - } - - // add resource to the list - resourceList.add(r1); - } - } - - return resourceList; - } - - /** - * Find a file with filename in a List - * - * @param filename - * the name of the file - * @param files - * the list of files - * @return the searched File or null if not found - */ - private static File findFile(String filename, LinkedList files) { - File temp; - int i = 1; - temp = (File) files.get(0); - - while ((i < files.size()) && (!filename.equals(temp.getName()))) { - temp = (File) files.get(i); - i++; - } - - if (temp.getName().equals(filename)) { - return temp; - } else { - return null; - } - } - - /** - * Creates one Grid resource. A Grid resource contains one or more Machines. - * Similarly, a Machine contains one or more PEs (Processing Elements or - * CPUs). - * <p> - * In this simple example, we are simulating one Grid resource with three - * Machines that contains one or more PEs. - * - * @param name - * a Grid Resource name - * @return a GridResource object - */ - private static DataGridResource createStandardResource(String name, - double storage_size, double bandwidth, String regionalRC) { - System.out.println(); - System.out.println("Starting to create one Grid resource with " + - "3 Machines"); - - // Here are the steps needed to create a Grid resource: - // 1. We need to create an object of MachineList to store one or more - // Machines - MachineList mList = new MachineList(); - - // System.out.println("Creates a Machine list"); - // 2. A Machine contains one or more PEs or CPUs. Therefore, should - // create an object of PEList to store these PEs before creating - // a Machine. - PEList peList1 = new PEList(); - - // System.out.println("Creates a PE list for the 1st Machine"); - // 3. Create PEs and add these into an object of PEList. - // In this example, we are using a resource from - // hpc420.hpcc.jp, AIST, Tokyo, Japan - // Note: these data are taken the from GridSim paper, page 25. - // In this example, all PEs has the same MIPS (Millions - // Instruction Per Second) Rating for a Machine. - peList1.add(new PE(0, 377)); // need to store PE id and MIPS Rating - peList1.add(new PE(1, 377)); - peList1.add(new PE(2, 377)); - peList1.add(new PE(3, 377)); - - // System.out.println("Creates 4 PEs with same MIPS Rating and put - // them"+ - // " into the PE list"); - // 4. Create one Machine with its id and list of PEs or CPUs - mList.add(new Machine(0, peList1)); // First Machine - - // System.out.println("Creates the 1st Machine that has 4 PEs and " + - // "stores it into the Machine list"); - // System.out.println(); - // 5. Repeat the process from 2 if we want to create more Machines - // In this example, the AIST in Japan has 3 Machines with same - // MIPS Rating but different PEs. - // NOTE: if you only want to create one Machine for one Grid resource, - // then you could skip this step. - PEList peList2 = new PEList(); - - // System.out.println("Creates a PE list for the 2nd Machine"); - peList2.add(new PE(0, 377)); - peList2.add(new PE(1, 377)); - peList2.add(new PE(2, 377)); - peList2.add(new PE(3, 377)); - - // System.out.println("Creates 4 PEs with same MIPS Rating and put - // them"+ - // " into the PE list"); - mList.add(new Machine(1, peList2)); // Second Machine - - // System.out.println("Creates the 2nd Machine that has 4 PEs and " + - // "stores it into the Machine list"); - // System.out.println(); - PEList peList3 = new PEList(); - - // System.out.println("Creates a PE list for the 3rd Machine"); - peList3.add(new PE(0, 377)); - peList3.add(new PE(1, 377)); - - // System.out.println("Creates 2 PEs with same MIPS Rating and put - // them"+ - // " into the PE list"); - mList.add(new Machine(2, peList3)); // Third Machine - - // System.out.println("Creates the 3rd Machine that has 2 PEs and " + - // "stores it into the Machine list"); - // System.out.println(); - // 6. Create a ResourceCharacteristics object that stores the - // properties of a Grid resource: architecture, OS, list of - // Machines, allocation policy: time- or space-shared, time zone - // and its price (G$/PE time unit). - String arch = "Sun Ultra"; // system architecture - String os = "Solaris"; // operating system - double time_zone = 9.0; // time zone this resource located - double cost = 3.0; // the cost of using this resource - - ResourceCharacteristics resConfig = new ResourceCharacteristics(arch, - os, mList, ResourceCharacteristics.TIME_SHARED, time_zone, cost); - - // System.out.println("Creates the properties of a Grid resource and " + - // "stores the Machine list"); - // 7. Finally, we need to create a GridResource object. - long seed = (11L * 13 * 17 * 19 * 23) + 1; - double peakLoad = 0.0; // the resource load during peak hour - double offPeakLoad = 0.0; // the resource load during off-peak hr - double holidayLoad = 0.0; // the resource load during holiday - - // incorporates weekends so the grid resource is on 7 days a week - LinkedList Weekends = new LinkedList(); - Weekends.add(new Integer(Calendar.SATURDAY)); - Weekends.add(new Integer(Calendar.SUNDAY)); - - // incorporates holidays. However, no holidays are set in this example - LinkedList Holidays = new LinkedList(); - DataGridResource gridRes = null; - - try { - // create the replica manager - SimpleReplicaManager rm = new SimpleReplicaManager("RM_" + name, - name); - - // create the resource calendar - ResourceCalendar cal = new ResourceCalendar(time_zone, peakLoad, - offPeakLoad, holidayLoad, Weekends, Holidays, seed); - - // create a storage, which demands the storage size in MB, but the - // description we get is in GB. (We need to multiply by 1000 to get - // MB) - Storage storage = new HarddriveStorage("storage", - storage_size * 1000); - - // create a grid resource, connected to a router. The bandwith is - // defined as bit/s, but we - // get the bandwidth ad GB/s (multiply by 10^9) - gridRes = new DataGridResource(name, - new SimpleLink(name + "_link", bandwidth * 1000000000, 10, - 1500), resConfig, cal, rm); - gridRes.addStorage(storage); - - // create a local replica catalogue if needed - // else set the regional RC for this resource - if (ParameterReader.useLocalRC) { - gridRes.createLocalRC(); - gridRes.setHigherReplicaCatalogue(TopRegionalRC.DEFAULT_NAME); - } else { - gridRes.setReplicaCatalogue(regionalRC); - } - } catch (Exception e) { - e.printStackTrace(); - } - - System.out.println("Finally, creates one Grid resource (name: " + name + - " - id: " + gridRes.get_id() + ")"); - System.out.println(); - - return gridRes; - } -} Deleted: trunk/examples/DataGrid/example4/SimUser.java =================================================================== --- trunk/examples/DataGrid/example4/SimUser.java 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/SimUser.java 2009-05-19 11:24:54 UTC (rev 261) @@ -1,155 +0,0 @@ -/* - * Title: GridSim Toolkit - * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation - * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html - */ - -import gridsim.GridSim; -import gridsim.datagrid.DataGridUser; -import gridsim.datagrid.File; -import gridsim.datagrid.FileAttribute; -import gridsim.net.SimpleLink; -import java.util.ArrayList; -import java.util.Iterator; -import gridsim.net.flow.*; // To use the new flow network package - GridSim 4.2 - -/** - * This class defines a user which executes a set of commands. - * @author Uros Cibej and Anthony Sulistio - */ -class SimUser extends DataGridUser { - private String name_; - private ArrayList tasks; - - // constructor - SimUser(String name, double baud_rate, double delay, int MTU) throws Exception { - - super(name, new SimpleLink(name + "_link", baud_rate, delay, MTU)); - - // NOTE: uncomment this if you want to use the new Flow extension - //super(name, new FlowLink(name + "_link", baud_rate, delay, MTU)); - - this.name_ = name; - this.tasks = new ArrayList(); - - // Gets an ID for this entity - System.out.println("Creating a grid user entity with name = " + name); - } - - /** - * The core method that handles communications among GridSim entities. - */ - public void body() { - - //wait for all the entities to register - super.gridSimHold(100.0); - - //execute all tasks - Iterator it = tasks.iterator(); - while (it.hasNext()) { - this.executeTask((Object[]) it.next()); - } - - //////////////////////////////////////////////////////// - // shut down I/O ports - shutdownUserEntity(); - terminateIOEntities(); - System.out.println(this.name_ + ":%%%% Exiting body() at time " + - GridSim.clock()); - } - - /** - * Execute a user task, which can be one of the following:<br> - * Get a file<br> - * Replicate a file<br> - * Delete a file<br> - * Or get the attribute of a file - * @param task the task to be executed - */ - private void executeTask(Object[] task) { - int taskID = ((Integer) task[0]).intValue(); - File f = null; - int location = -1; - - switch (taskID) { - case 0: //getFile - - String name = getFullFilename((String) task[1]); - if (name != null) { - location = this.getReplicaLocation(name); - - if (location != -1) { - f = this.getFile(name, location); - System.out.println(this.get_name() + - ":- Transfer of file " + name + " succesful"); - } - } else { - System.out.println("No such file: " + (String) task[1]); - } - - break; - - case 1: //replicateFile - name = getFullFilename((String) task[1]); - String resourceName = (String) task[2]; - - if (name != null) { - location = this.getReplicaLocation(name); - } else { - location = -1; - } - - if (location != -1) { - f = this.getFile(name, location); - - if (f != null) { - replicateFile(f, GridSim.getEntityId(resourceName)); - } - } - - break; - - case 2: //deleteReplica - name = getFullFilename((String) task[1]); - resourceName = (String) task[2]; - - if (name != null) { - this.deleteFile(name, GridSim.getEntityId(resourceName)); - } else { - System.out.println("Could not delete " + (String) task[1]); - } - - break; - - case 3: //getAttribute - name = getFullFilename((String) task[1]); - - if (name != null) { - FileAttribute attr = this.getFileAttribute(name); - System.out.println(this.get_name() + - ":- Received attribute for file " + attr.getName()); - } else { - System.out.println("Could not retrieve attribute for " + - (String) task[1]); - } - - break; - - default: - System.out.println("Not a valid task for the user"); - break; - } - } - - /** - * Setter method for the array of tasks, which need to be executed. - * - * @param l the array of tasks which the user has to execute during - * the simulation - */ - public void setTasks(ArrayList l) { - tasks = l; - } - -} // end class Deleted: trunk/examples/DataGrid/example4/UserReader.java =================================================================== --- trunk/examples/DataGrid/example4/UserReader.java 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/UserReader.java 2009-05-19 11:24:54 UTC (rev 261) @@ -1,129 +0,0 @@ -/* - * Title: GridSim Toolkit - * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation - * of Parallel and Distributed Systems such as Clusters and Grids - * Licence: GPL - http://www.gnu.org/copyleft/gpl.html - */ - -import gridsim.net.*; -import gridsim.util.NetworkReader; -import java.io.BufferedReader; -import java.io.FileReader; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.StringTokenizer; - -/** - * Creates a list of users from a given file - * @author Uros Cibej and Anthony Sulistio - */ -public class UserReader { - - /** - * @param filename - * the name of the file containing the descriptions of Users - * @param experiments - * the list of DataGridlets that can be used in the simulation - * @return the list of Users - * @throws Exception - */ - public static LinkedList read(String filename, LinkedList routers, - LinkedList resources) throws Exception { - LinkedList userList = null; - - try { - FileReader fRead = new FileReader(filename); - BufferedReader b = new BufferedReader(fRead); - userList = createUsers(b, routers); - } catch (Exception exp) { - System.out.println("User file not found"); - } - - return userList; - } - - /** - * - * @param buf - * @param experiments - * the list of requests executed by the users - * @return a list of Users initialized with the requests by the users. - * @throws Exception - */ - private static LinkedList createUsers(BufferedReader buf, LinkedList routers) - throws Exception { - String line; - String name; - String baudRate; - String router_name; - StringTokenizer str; - LinkedList users = new LinkedList(); - - while ((line = buf.readLine()) != null) { - str = new StringTokenizer(line); - name = str.nextToken(); - - if (!name.startsWith("#")) { - router_name = str.nextToken(); - - String resource_name = str.nextToken(); //for the RC assignement - baudRate = str.nextToken(); //baud rate is given in MB/s - - Router r = NetworkReader.getRouter(router_name, routers); - - if (r == null) { - System.out.println("Problem with ROUTER " + router_name); - } - - SimUser dUser = new SimUser(name, - Double.parseDouble(baudRate) * 1000000, 10, 1500); - dUser.setReplicaCatalogue(resource_name); - - r.attachHost(dUser, new FIFOScheduler(name+"_scheduler")); - - int index = 0; - ArrayList tasks = new ArrayList(); - - while (str.hasMoreTokens()) { - Object[] tempTask = parseTask(str); - - if (tempTask != null) { - tasks.add(tempTask); - } - } - - dUser.setTasks(tasks); - users.add(dUser); - } - } - - return users; - } - - private static Object[] parseTask(StringTokenizer str) { - String taskName = str.nextToken(); - Object[] task = null; - - if (taskName.equals("get")) { - task = new Object[2]; - task[0] = new Integer(0); - task[1] = str.nextToken(); - } else if (taskName.equals("replicate")) { - task = new Object[3]; - task[0] = new Integer(1); - task[1] = str.nextToken(); - task[2] = str.nextToken(); - } else if (taskName.equals("attribute")) { - task = new Object[2]; - task[0] = new Integer(3); - task[1] = str.nextToken(); - } else if (taskName.equals("delete")) { - task = new Object[3]; - task[0] = new Integer(2); - task[1] = str.nextToken(); - task[2] = str.nextToken(); - } - - return task; - } -} Deleted: trunk/examples/DataGrid/example4/files.txt =================================================================== --- trunk/examples/DataGrid/example4/files.txt 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/files.txt 2009-05-19 11:24:54 UTC (rev 261) @@ -1,10 +0,0 @@ -#this files contains the description of possible files than are on the grid in the current experiment -#the format of the file is: -#file_name file_size (in MB) -testFile1 10 -testFile2 10 -fileM 10 -fileK 10 -fileH 10 -fileD 10 -fileF 1 \ No newline at end of file Deleted: trunk/examples/DataGrid/example4/network.txt =================================================================== --- trunk/examples/DataGrid/example4/network.txt 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/network.txt 2009-05-19 11:24:54 UTC (rev 261) @@ -1,11 +0,0 @@ -5 -router1 -router2 -router3 -router4 -router5 -router1 router2 0.1 10.0 1500 -router1 router5 0.1 10.0 1500 -router2 router5 0.1 10.0 1500 -router2 router3 0.1 10.0 1500 -router4 router5 0.1 10.0 1500 \ No newline at end of file Deleted: trunk/examples/DataGrid/example4/output.txt =================================================================== --- trunk/examples/DataGrid/example4/output.txt 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/output.txt 2009-05-19 11:24:54 UTC (rev 261) @@ -1,40 +0,0 @@ -Starting data grid simulation ... -Initializing GridSim package -Initialising... - -Starting to create one Grid resource with 3 Machines -Finally, creates one Grid resource (name: Res_0 - id: 20) - -Adding file fileH -Adding file testFile1 - -Starting to create one Grid resource with 3 Machines -Finally, creates one Grid resource (name: Res_1 - id: 27) - -Adding file testFile2 - -Starting to create one Grid resource with 3 Machines -Finally, creates one Grid resource (name: Res_2 - id: 34) - -Adding file fileF -Adding file fileG -Creating a grid user entity with name = user1 -Creating a grid user entity with name = user2 -Starting GridSim version 4.0 -Entities started. -user1:- Transfer of file testFile2 succesful -user2:- Transfer of file testFile1 succesful -user1:- Transfer of file testFile1 succesful -user1:- Received attribute for file testFile1 -user1:- Transfer of file fileF succesful -user1:%%%% Exiting body() at time 1998.7168399991406 -user2.replicateFile(): testFile1 has been replicated to Res_1 -user2.deleteFile(): testFile1 has been deleted from Res_1 -user2:%%%% Exiting body() at time 2750.330159998607 -DataGIS: Notify all replica catalog entities for shutting down. -DataGIS: Notify all GridSim entities for shutting down. -Sim_system: No more future events -Gathering simulation data. -Simulation completed. - -Finish data grid simulation ... Deleted: trunk/examples/DataGrid/example4/parameters.txt =================================================================== --- trunk/examples/DataGrid/example4/parameters.txt 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/parameters.txt 2009-05-19 11:24:54 UTC (rev 261) @@ -1,8 +0,0 @@ -#WARNING numUsers should be the same as the number of users in the user configuration file -numUsers=2 -files=files.txt -resources=resources.txt -network=network.txt -users=users.txt -#the router which the topRC is connected to -topRCrouter=router1 \ No newline at end of file Deleted: trunk/examples/DataGrid/example4/resources.txt =================================================================== --- trunk/examples/DataGrid/example4/resources.txt 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/resources.txt 2009-05-19 11:24:54 UTC (rev 261) @@ -1,6 +0,0 @@ -#the description of resources in a grid -#the format of the file: -#resource_name storage_size(in GB) bandwidth router_name list_of_containing_files -Res_0 100 0.1 router1 fileH testFile1 -Res_1 100 0.1 router2 testFile2 -Res_2 100 0.1 router5 fileF fileG \ No newline at end of file Deleted: trunk/examples/DataGrid/example4/users.txt =================================================================== --- trunk/examples/DataGrid/example4/users.txt 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/example4/users.txt 2009-05-19 11:24:54 UTC (rev 261) @@ -1,8 +0,0 @@ -#user_name router_name rc_name baud_rate list_of_grid_tasks -#grid tasks can be: -#get filename -#attribute filename -#replicate filename resource -#delete filename resource -user1 router2 Res_0 0.1 get testFile2 get testFile1 attribute testFile1 get fileF -user2 router1 Res_1 0.1 get testFile1 replicate testFile1 Res_1 delete testFile1 Res_1 \ No newline at end of file Deleted: trunk/examples/DataGrid/tutorial/Simulation.html =================================================================== --- trunk/examples/DataGrid/tutorial/Simulation.html 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/tutorial/Simulation.html 2009-05-19 11:24:54 UTC (rev 261) @@ -1,605 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - - - - - - - - - - - <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> - - - - - - - - - - - <title>Simulation</title> -</head> - - -<body> - - - - - -<div style="text-align: center;"> -<h1>SIMULATION PACKAGE</h1> - - - - - -<div style="text-align: left;">To make the construction of -simulations easier, we created few file readers in the <br> -<b>$GRIDSIM/examples/DataGridExample/example4</b> directory. <br> -Hence, it is possible to design and run a -simulation without any programming, only by defining a set of -configuration files.<br> - -<br> - -To run the simulation, type the following in the command line:<br> - -<br> -<code>cd $GRIDSIM/examples/DataGridExample</code><br> -<code>javac -classpath $GRIDSIM/jars/gridsim.jar:. DataGridSim.java</code><br> -<code>java -cp $GRIDSIM/jars/gridsim.jar:. DataGridSim parameters.txt</code><br> - -<br> - -<br> - -<h2>EXAMPLE<br> - -</h2> - -To demonstrate the functionality of this package we construct the same topology as in the "<a href="getting_started.html">Getting started</a>" example.<br> - - - - - -<br> - - - - - -<h2>Parameters configuration file</h2> - -This file is the main configuration file, which is passed as a -parameter to the gridsim.datagrid.simulation,Sim class.<br> - -In this file we describe which files describe our experiment, how many -users will be present in the simulation and on which router the Top -replica catalogue will be connected to. We also define whether each resource has its own replica catalogue or not.<br> - - - - -<span style="font-weight: bold;">Warning: </span>the number of users has to be the same as the actual number of users in the user configuration file.<br> - - - - -<br> - - - - -<span style="font-weight: bold;">Example:</span><span style="font-family: Courier New,Courier,monospace;"> -<br> - - - -numUsers=1</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;"> -files=files.txt</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;"> -resources=resources.txt</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;"> -network=network.txt</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;"> -users=users.txt<br> - - -topRCrouter=router1<br> -</span><span style="font-family: Courier New,Courier,monospace;"> - -useLocalRC=false</span><span style="font-weight: bold;"></span> -<h2> Files configuration file</h2> - - - - -<span style="font-weight: bold;">Format of the file<br> - - - - -<span style="font-style: italic;"></span></span><span style="font-style: italic;">filename1 size<br> - - - - -</span><span style="font-style: italic;">filename2 size<br> - - - - -.<br> - - - - -.</span><span style="font-style: italic;"><br> - - - - -filenameN size</span><span style="font-weight: bold;"><br> - - - - -<br> - - - - -Description of parameters</span><span style="font-style: italic;"><br> - - - - -filename1 </span>............ the name of the file - arbitrary string (no spaces)<br> - - - - -<span style="font-style: italic;">size </span>...................... the size of the file in MB<br> - - - - -<span style="font-weight: bold;"><br> - - - - -Example:</span><span style="font-family: Courier New,Courier,monospace;"></span> <br> - - - - -<span style="font-family: Courier New,Courier,monospace;">testFile1 10</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;">testFile2 10</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;">fileM 10</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;">fileK 10</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;">fileH 10</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;">fileD 10</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;">fileF 1</span> -<h2>Resources configuration file </h2> - - - - -<span style="font-weight: bold;">Format of the file</span><br> - - - - -<span style="font-style: italic;">Resource1_name</span> <span style="font-style: italic;">storage_size bandwidth router_name list_of_containing_files<br> - - - - -</span><span style="font-style: italic;">Resource2_name</span> <span style="font-style: italic;">storage_size bandwidth router_name list_of_containing_files<br> - - - - -.<br> - - - - -.<br> - - - - -</span><span style="font-style: italic;">ResourceN_name</span> <span style="font-style: italic;">storage_size bandwidth router_name list_of_containing_files</span><br> - - - - -<span style="font-style: italic;"><br> - - - - -</span><span style="font-weight: bold;">Description of parameters</span><span style="font-style: italic;"><br> - - - - -</span><span style="font-style: italic;">Resource1_name </span>.............. the name of the resource - arbitrary string, without spaces - uniquely defining the resource<br> - - - - -<span style="font-style: italic;">storage_size</span> ..................... the size of the HarddriveStorage in GB.<br> - - - - -<span style="font-style: italic;">bandwidth </span>........................ bandwidth of the connection to the router in GB/s<br> - - - - -<span style="font-style: italic;">router_name </span>.................... the name of the router to which this resource is connected (see below network configuration)<br> - - - - -<span style="font-style: italic;">list_of_containing_files </span>.... -the list of filenames of files (separated by spaces) which are stored -on the storage of this resource (see file configuration)<br> - - - - -<br> - - - - -<span style="font-weight: bold;">Example:</span><span style="font-family: Courier New,Courier,monospace;"></span> <span style="font-family: Courier New,Courier,monospace;"></span><span style="font-family: Courier New,Courier,monospace;"> -<br> - - - -Res_0 100 0.1 router1 fileH testFile1</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;"> -Res_1 100 0.1 router1 testFile2</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;"> -Res_2 100 0.1 router1 fileF fileG</span><br> - - - - - -<h2>Network configuration file</h2> - - - - -<br> - - - - -<span style="font-weight: bold;">Format of the file</span><br> - - - - -<span style="font-style: italic;">Num_routers<br> - - - - -router_name1<br> - - - - -</span><span style="font-style: italic;">router_name2<br> - - - - -.<br> - - - - -.<br> - - - - -router_nameN<br> - - - - -router_nameI router_nameJ bandwidthI_J propDelay MTU</span><br> - - - - -<span style="font-style: italic;">router_nameK router_nameL bandwidthK_L propDelay MTU</span><span style="font-style: italic;"></span><br> - - - - -<span style="font-style: italic;">.<br> - - - - -.<br> - - - - -</span><span style="font-style: italic;">router_nameM router_nameR bandwidthM_R propDelay MTU</span><br> - - - - -<span style="font-style: italic;"><br> - - - - -</span><span style="font-weight: bold;">Description of parameters<br> - - - - -</span><span style="font-style: italic;">Num_routers </span>...................... the number of routers (which names follow)<br> - - - - -<span style="font-style: italic;">router_name </span>...................... arbitrary string (no spaces) defining the name of the router<br> - - - - -<span style="font-style: italic;">bandwidthX_Y </span>................... bandwidth in GB/s between routers whose names are defined in the beginning of the line<br> - - - - -<span style="font-style: italic;"> propDelay </span>......................... propagation delay in miliseconds<br> - - - - -<span style="font-style: italic;"> MTU </span>.................................. minimal transmission unit in bytes<br> - - - - -<br> - - - - -<span style="font-weight: bold;">Example:</span><span style="font-family: Courier New,Courier,monospace;"></span> <span style="font-family: Courier New,Courier,monospace;"> -<br> - - - -2</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;"> -router1</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;"> -router2</span><br style="font-family: Courier New,Courier,monospace;"> - - - - -<span style="font-family: Courier New,Courier,monospace;"> -router1 router2 0.1 10.0 1500</span><br> - - - - - -<h2>User configuration file</h2> - - - - -<span style="font-weight: bold;">Format of the file<br> - - - - -</span><span style="font-style: italic;">user1_name router_name RC_name bandwidth list_of_operations<br> - - - - -</span><span style="font-style: italic;">user2_name router_name RC_name bandwidth list_of_operations<br> - - - - -.<br> - - - - -.<br> - - - - -</span><span style="font-style: italic;">userN_name router_name RC_name bandwidth list_of_operations</span><br> - - - - -<span style="font-weight: bold;"><br> - - - - -</span><span style="font-weight: bold;">Description of parameters<br> - - - - -</span><span style="font-style: italic;">user1_name </span>........................... the name of the user<br> - - - - -<span style="font-style: italic;">router_name </span>.......................... the name of the router to which this user is connected<span style="font-style: italic;"><br> - - - - -RC_name </span>............................... the name of the entity -that acts as the users Replica Catalogue - it can be a resource which -has a local RC<br> - - - - -<span style="font-style: italic;"> bandwidth </span>.............................. bandwith to the router in MB/s<br> - - - - -<span style="font-style: italic;">list_of_operations </span>.................. - list of operations which the user will perform during the -simulation separated by spaces (see Available operations below)<br> - - - - -<br> - - - - -<span style="font-weight: bold;">Available operations<br> - - - - -</span><span style="font-style: italic;">get filename </span>............. transfer the file with this filename to the user<br> - - - - -<span style="font-style: italic;">replicate filename resource_name </span>.......... make a replica of the file with this <span style="font-style: italic;">filename</span> on the resource <span style="font-style: italic;">resource_name<br> - -</span><span style="font-style: italic;">delete filename resource_name </span>.......... delete a replica of the file with this <span style="font-style: italic;">filename</span> on the resource <span style="font-style: italic;">resource_name</span><br> - -<span style="font-style: italic;"> - - -attribute filename </span>.................................... get the file attribute (with all the information about a certain file)<br> - - - - -<span style="font-weight: bold;"></span><span style="font-style: italic;"><br> - - - - -</span><span style="font-weight: bold;">Example:</span><br> - - - - -<span style="font-family: Courier New,Courier,monospace;">user1 router2 Res_0 500.0 get testFile2 get testFile1 attribute testFile1 replicate testFile1 Res_0<br> - - - - -<br> - - - - -<a href="index.html"><span style="font-family: Times New Roman,Times,serif;"><home></span></a></span></div> - - - - - -</div> - - - - - -</body> -</html> Deleted: trunk/examples/DataGrid/tutorial/connectEntities.html =================================================================== --- trunk/examples/DataGrid/tutorial/connectEntities.html 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/tutorial/connectEntities.html 2009-05-19 11:24:54 UTC (rev 261) @@ -1,75 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - - - <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> - - - <title>Connect the entities to the network</title> -</head> - - -<body> - -<div style="text-align: center;"> -<h1>CONNECTING THE ENTITIES</h1> -<div style="text-align: left;">When all the entities have been created, -they need to be connected by a network. The following code demonstrates -how to connect the resources, the user and the replica catalogue to -different routers on the network.<br> -</div> - -</div> - -<table bgcolor="#ffffff" border="0" cellpadding="3" cellspacing="0"> - - <tbody> - - <tr> - -<!-- start source code --> <td align="left" nowrap="nowrap" valign="top"> <code><font color="#ffffff"> </font><font color="#7f0055"><b>try </b></font><font color="#000000">{</font><br> - - <font color="#ffffff"> </font><font color="#3f7f5f">//connect resources</font><br> - - <font color="#ffffff"> </font><font color="#000000">GridResource resObj = </font><font color="#7f0055"><b>null</b></font><font color="#000000">;</font><br> - - <font color="#ffffff"> </font><font color="#7f0055"><b>for </b></font><font color="#000000">(</font><font color="#000000">i = </font><font color="#990000">0</font><font color="#000000">; i < resList.size</font><font color="#000000">()</font><font color="#000000">; i++</font><font color="#000000">)</font><br> - - <font color="#ffffff"> </font><font color="#000000">{</font><br> - - <font color="#ffffff"> </font><font color="#000000">FIFOScheduler resSched = </font><font color="#7f0055"><b>new </b></font><font color="#000000">FIFOScheduler</font><font color="#000000">()</font><font color="#000000">;</font><br> - - <font color="#ffffff"> </font><font color="#000000">resObj = </font><font color="#000000">(</font><font color="#000000">GridResource</font><font color="#000000">) </font><font color="#000000">resList.get</font><font color="#000000">(</font><font color="#000000">i</font><font color="#000000">)</font><font color="#000000">;</font><br> - - <font color="#ffffff"> </font><font color="#000000">r2.attachHost</font><font color="#000000">(</font><font color="#000000">resObj, resSched</font><font color="#000000">)</font><font color="#000000">;</font><font color="#3f7f5f">//attach the resource to router r2</font><br> - - <font color="#ffffff"> </font><font color="#000000">} </font><br> - - <font color="#ffffff"> </font><font color="#3f7f5f">//connect user</font><br> - - <font color="#ffffff"> </font><font color="#000000">FIFOScheduler userSched = </font><font color="#7f0055"><b>new </b></font><font color="#000000">FIFOScheduler</font><font color="#000000">()</font><font color="#000000">;</font><br> - - <font color="#ffffff"> </font><font color="#000000">r1.attachHost</font><font color="#000000">(</font><font color="#000000">user, userSched</font><font color="#000000">)</font><font color="#000000">; </font><font color="#3f7f5f">//atach the user to router r1</font><br> - - <font color="#ffffff"> </font><font color="#3f7f5f">//connect rc</font><br> - - <font color="#ffffff"> </font><font color="#000000">FIFOScheduler gisSched = </font><font color="#7f0055"><b>new </b></font><font color="#000000">FIFOScheduler</font><font color="#000000">()</font><font color="#000000">;</font><br> - - <font color="#ffffff"> </font><font color="#000000">r2.attachHost</font><font color="#000000">(</font><font color="#000000">rc, gisSched</font><font color="#000000">)</font><font color="#000000">; </font><font color="#3f7f5f">// attach RC</font><br> - - <font color="#000000">} </font><font color="#7f0055"><b>catch </b></font><font color="#000000">(</font><font color="#000000">ParameterException e4</font><font color="#000000">) {</font><br> - - <font color="#ffffff"> </font><font color="#000000">e4.printStackTrace</font><font color="#000000">()</font><font color="#000000">;</font><br> - - <font color="#000000">}</font></code> </td> - -<!-- end source code --> </tr> - -<!-- start Java2Html link --><!-- end Java2Html link --> - - </tbody> -</table> - -</body> -</html> Deleted: trunk/examples/DataGrid/tutorial/createNetwork.html =================================================================== --- trunk/examples/DataGrid/tutorial/createNetwork.html 2009-04-03 04:28:19 UTC (rev 260) +++ trunk/examples/DataGrid/tutorial/createNetwork.html 2009-05-19 11:24:54 UTC (rev 261) @@ -1,69 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - - - <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> - - - <title>Creating the network</title> -</head> - - -<body> - -<div style="text-align: center;"> -<h1>CREATING THE NETWORK</h1> - -<br> - -<div style="text-align: left;">The following code shows how to create a simple network, with only two routers.<br> -</div> - -<br> - -</div> - -<table bgcolor="#ffffff" border="0" cellpadding="3" cellspacing="0"> - - <tbody> - - <tr> - -<!-- start source code --> <td align="left" nowrap="nowrap" valign="top"> <code><font color="#ffffff"> </font><font color="#000000">Router r1 = </font><font color="#7f0055"><b>new </b></font><font color="#000000">RIPRouter</font><font color="#000000">(</font><font color="#2a00ff">"router1"</font><font color="... [truncated message content] |
From: <mar...@us...> - 2009-04-03 04:28:33
|
Revision: 260 http://gridsim.svn.sourceforge.net/gridsim/?rev=260&view=rev Author: marcos_dias Date: 2009-04-03 04:28:19 +0000 (Fri, 03 Apr 2009) Log Message: ----------- Several methods of allocation policies have been made synchronised because under a scenario with a large number of simulation events, or the absence of network links, GridResource and allocation policy could change attributes of the policy at the same time. Modified Paths: -------------- trunk/source/gridsim/SpaceShared.java trunk/source/gridsim/TimeShared.java trunk/source/gridsim/resFailure/FailureMsg.java trunk/source/gridsim/resFailure/GridResourceWithFailure.java trunk/source/gridsim/resFailure/RegionalGISWithFailure.java trunk/source/gridsim/resFailure/SpaceSharedWithFailure.java trunk/source/gridsim/resFailure/TimeSharedWithFailure.java Modified: trunk/source/gridsim/SpaceShared.java =================================================================== --- trunk/source/gridsim/SpaceShared.java 2008-11-16 10:42:53 UTC (rev 259) +++ trunk/source/gridsim/SpaceShared.java 2009-04-03 04:28:19 UTC (rev 260) @@ -23,6 +23,7 @@ * * @author Manzur Murshed and Rajkumar Buyya * @author Anthony Sulistio (re-written this class) + * @author Marcos Dias de Assuncao (has made some methods synchronized) * @since GridSim Toolkit 2.2 * @see gridsim.GridSim * @see gridsim.ResourceCharacteristics @@ -94,7 +95,7 @@ // if the simulation finishes then exit the loop if (ev.get_tag() == GridSimTags.END_OF_SIMULATION || - super.isEndSimulation() == true) + super.isEndSimulation()) { break; } @@ -128,7 +129,7 @@ * @pre gl != null * @post $none */ - public void gridletSubmit(Gridlet gl, boolean ack) + public synchronized void gridletSubmit(Gridlet gl, boolean ack) { // update the current Gridlets in exec list up to this point in time updateGridletProcessing(); @@ -160,14 +161,14 @@ } // if no available PE then put the ResGridlet into a Queue list - if (success == false) + if (!success) { rgl.setGridletStatus(Gridlet.QUEUED); gridletQueueList_.add(rgl); } // sends back an ack if required - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true, gl.getGridletID(), gl.getUserID() @@ -185,7 +186,7 @@ * @pre userId > 0 * @post $none */ - public int gridletStatus(int gridletId,int userId) + public synchronized int gridletStatus(int gridletId,int userId) { ResGridlet rgl = null; @@ -247,7 +248,7 @@ * @pre userId > 0 * @post $none */ - public void gridletCancel(int gridletId, int userId) + public synchronized void gridletCancel(int gridletId, int userId) { // cancels a Gridlet ResGridlet rgl = cancel(gridletId, userId); @@ -292,7 +293,7 @@ * @pre userId > 0 * @post $none */ - public void gridletPause(int gridletId, int userId, boolean ack) + public synchronized void gridletPause(int gridletId, int userId, boolean ack) { boolean status = false; @@ -354,7 +355,7 @@ } // sends back an ack if required - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_PAUSE_ACK, status, gridletId, userId); @@ -382,7 +383,7 @@ * @pre destId > 0 * @post $none */ - public void gridletMove(int gridletId, int userId, int destId, boolean ack) + public synchronized void gridletMove(int gridletId, int userId, int destId, boolean ack) { // cancels the Gridlet ResGridlet rgl = cancel(gridletId, userId); @@ -394,7 +395,7 @@ ".SpaceShared.gridletMove(): Cannot find " + "Gridlet #" + gridletId + " for User #" + userId); - if (ack == true) // sends back an ack if required + if (ack) // sends back an ack if required { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId, userId); @@ -411,7 +412,7 @@ + gridletId + " for User #" + userId + " since it has FINISHED."); - if (ack == true) // sends back an ack if required + if (ack) // sends back an ack if required { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId, userId); @@ -445,7 +446,7 @@ * @pre userId > 0 * @post $none */ - public void gridletResume(int gridletId, int userId, boolean ack) + public synchronized void gridletResume(int gridletId, int userId, boolean ack) { boolean status = false; @@ -468,7 +469,7 @@ } // otherwise put into Queue list - if (success == false) + if (!success) { rgl.setGridletStatus(Gridlet.QUEUED); gridletQueueList_.add(rgl); @@ -486,7 +487,7 @@ } // sends back an ack if required - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_RESUME_ACK, status, gridletId, userId); @@ -514,7 +515,7 @@ // allocate the Gridlet into an empty PE slot and remove it from // the queue list boolean success = allocatePEtoGridlet(obj); - if (success == true) { + if (success) { gridletQueueList_.remove(obj); } } @@ -528,7 +529,7 @@ * @pre $none * @post $none */ - private void updateGridletProcessing() + private synchronized void updateGridletProcessing() { // Identify MI share for the duration (from last event time) double time = GridSim.clock(); @@ -645,7 +646,7 @@ * @pre length >= 0.0 * @post $none */ - private double forecastFinishTime(double availableRating, double length) + private static double forecastFinishTime(double availableRating, double length) { double finishTime = (length / availableRating); @@ -665,7 +666,7 @@ * @pre $none * @post $none */ - private void checkGridletCompletion() + private synchronized void checkGridletCompletion() { ResGridlet obj = null; int i = 0; @@ -725,8 +726,7 @@ * or paused list. * @param gridletId a Gridlet ID * @param userId the user or owner's ID of this Gridlet - * @param an object of ResGridlet or <tt>null</tt> if this Gridlet is not - * found + * @return an ResGridlet object <tt>null</tt> if this Gridlet is not found * @pre gridletId > 0 * @pre userId > 0 * @post $none @@ -784,6 +784,5 @@ } return rgl; } +} -} // end class - Modified: trunk/source/gridsim/TimeShared.java =================================================================== --- trunk/source/gridsim/TimeShared.java 2008-11-16 10:42:53 UTC (rev 259) +++ trunk/source/gridsim/TimeShared.java 2009-04-03 04:28:19 UTC (rev 260) @@ -9,9 +9,11 @@ package gridsim; +import eduni.simjava.Sim_event; +import eduni.simjava.Sim_system; + +import java.util.Calendar; import java.util.Iterator; -import gridsim.*; -import eduni.simjava.*; /** @@ -25,6 +27,7 @@ * * @author Manzur Murshed and Rajkumar Buyya * @author Anthony Sulistio (re-written this class) + * @author Marcos Dias de Assuncao (has made some methods synchronized) * @since GridSim Toolkit 2.2 * @see gridsim.GridSim * @see gridsim.ResourceCharacteristics @@ -118,7 +121,7 @@ // if the simulation finishes then exit the loop if (ev.get_tag() == GridSimTags.END_OF_SIMULATION || - super.isEndSimulation() == true) + super.isEndSimulation()) { break; } @@ -150,7 +153,7 @@ * @pre gl != null * @post $none */ - public void gridletSubmit(Gridlet gl, boolean ack) + public synchronized void gridletSubmit(Gridlet gl, boolean ack) { // update Gridlets in execution up to this point in time updateGridletProcessing(); @@ -179,7 +182,7 @@ gridletInExecList_.add(rgl); // add into the execution list // sends back an ack if required - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true, gl.getGridletID(), gl.getUserID() @@ -200,7 +203,7 @@ * @pre userId > 0 * @post $none */ - public int gridletStatus(int gridletId, int userId) + public synchronized int gridletStatus(int gridletId, int userId) { ResGridlet rgl = null; @@ -252,7 +255,7 @@ * @pre userId > 0 * @post $none */ - public void gridletCancel(int gridletId, int userId) + public synchronized void gridletCancel(int gridletId, int userId) { // Finds the gridlet in execution and paused list ResGridlet rgl = cancel(gridletId, userId); @@ -301,7 +304,7 @@ * @pre userId > 0 * @post $none */ - public void gridletPause(int gridletId, int userId, boolean ack) + public synchronized void gridletPause(int gridletId, int userId, boolean ack) { boolean status = false; @@ -349,7 +352,7 @@ } // sends back an ack - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_PAUSE_ACK, status, gridletId, userId); @@ -377,7 +380,7 @@ * @pre destId > 0 * @post $none */ - public void gridletMove(int gridletId, int userId, int destId, boolean ack) + public synchronized void gridletMove(int gridletId, int userId, int destId, boolean ack) { // cancel the Gridlet first ResGridlet rgl = cancel(gridletId, userId); @@ -389,7 +392,7 @@ ".TimeShared.gridletMove(): Cannot find " + "Gridlet #" + gridletId + " for User #" + userId); - if (ack == true) // sends ack that this operation fails + if (ack) // sends ack that this operation fails { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId, userId); @@ -409,7 +412,7 @@ + " Gridlet #" + gridletId + " for User #" + userId + " since it has FINISHED."); - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId, userId); @@ -436,7 +439,7 @@ * @pre userId > 0 * @post $none */ - public void gridletResume(int gridletId, int userId, boolean ack) + public synchronized void gridletResume(int gridletId, int userId, boolean ack) { boolean success = false; @@ -470,7 +473,7 @@ } // sends back an ack to sender - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_RESUME_ACK, success, gridletId, userId); @@ -698,7 +701,7 @@ * @param length remaining Gridlet length * @return Gridlet's finish time. */ - private double forecastFinishTime(double availableRating, double length) + private static double forecastFinishTime(double availableRating, double length) { double finishTime = length / availableRating; @@ -740,7 +743,7 @@ * @pre $none * @post $none */ - private void internalEvent() + private synchronized void internalEvent() { // this is a constraint that prevents an infinite loop // Compare between 2 floating point numbers. This might be incorrect @@ -761,8 +764,7 @@ * or paused list. * @param gridletId a Gridlet ID * @param userId the user or owner's ID of this Gridlet - * @param an object of ResGridlet or <tt>null</tt> if this Gridlet is not - * found + * @return a ResGridlet object or <tt>null</tt> if this Gridlet is not found * @pre gridletId > 0 * @pre userId > 0 * @post $none @@ -810,6 +812,5 @@ return rgl; } +} -} // end class - Modified: trunk/source/gridsim/resFailure/FailureMsg.java =================================================================== --- trunk/source/gridsim/resFailure/FailureMsg.java 2008-11-16 10:42:53 UTC (rev 259) +++ trunk/source/gridsim/resFailure/FailureMsg.java 2009-04-03 04:28:19 UTC (rev 260) @@ -48,7 +48,7 @@ } /** - * This method sets the time atribute of the ResourceFailure object + * This method sets the time attribute of the ResourceFailure object * @param time the time that the failure will last */ public void setTime(double time) @@ -57,7 +57,7 @@ } /** - * This method returns the time atribute of the ResourceFailure object + * This method returns the time attribute of the ResourceFailure object * @return time */ public double getTime() @@ -66,7 +66,7 @@ } /** - * This method sets the res_id atribute of the ResourceFailure object + * This method sets the res_id attribute of the ResourceFailure object * @param r the resource id of the resource */ public void setRes(int r) @@ -75,7 +75,7 @@ } /** - * This method returns the res_id atribute of the ResourceFailure object + * This method returns the res_id attribute of the ResourceFailure object * @return the resource id */ public int getRes() @@ -84,7 +84,7 @@ } /** - * This method sets the numMachines atribute of the ResourceFailure object + * This method sets the numMachines attribute of the ResourceFailure object * @param n the number of machines which will fail in this resource */ public void setNumMachines(int n) Modified: trunk/source/gridsim/resFailure/GridResourceWithFailure.java =================================================================== --- trunk/source/gridsim/resFailure/GridResourceWithFailure.java 2008-11-16 10:42:53 UTC (rev 259) +++ trunk/source/gridsim/resFailure/GridResourceWithFailure.java 2009-04-03 04:28:19 UTC (rev 260) @@ -48,7 +48,7 @@ /** a ResourceCalendar object */ protected ResourceCalendar resCalendar_; - /** A resource's scheduler. This object is reponsible in scheduling and + /** A resource's scheduler. This object is responsible for scheduling and * and executing submitted Gridlets. */ protected AllocPolicy policy_; Modified: trunk/source/gridsim/resFailure/RegionalGISWithFailure.java =================================================================== --- trunk/source/gridsim/resFailure/RegionalGISWithFailure.java 2008-11-16 10:42:53 UTC (rev 259) +++ trunk/source/gridsim/resFailure/RegionalGISWithFailure.java 2009-04-03 04:28:19 UTC (rev 260) @@ -18,7 +18,6 @@ import eduni.simjava.*; import gridsim.*; import gridsim.net.Link; -import eduni.simjava.distributions.Sim_uniform_obj; import gridsim.resFailure.FailureMsg; import eduni.simjava.distributions.DiscreteGenerator; import eduni.simjava.distributions.ContinuousGenerator; Modified: trunk/source/gridsim/resFailure/SpaceSharedWithFailure.java =================================================================== --- trunk/source/gridsim/resFailure/SpaceSharedWithFailure.java 2008-11-16 10:42:53 UTC (rev 259) +++ trunk/source/gridsim/resFailure/SpaceSharedWithFailure.java 2009-04-03 04:28:19 UTC (rev 260) @@ -32,6 +32,7 @@ * this Gridlet to one PE. * * @author Agustin Caminero + * @author Marcos Dias de Assuncao (added synchronisation) * @since GridSim Toolkit 4.1 * @see gridsim.SpaceShared * @invariant $none @@ -103,7 +104,7 @@ // if the simulation finishes then exit the loop if (ev.get_tag() == GridSimTags.END_OF_SIMULATION || - super.isEndSimulation() == true) + super.isEndSimulation()) { break; } @@ -137,7 +138,7 @@ * @pre gl != null * @post $none */ - public void gridletSubmit(Gridlet gl, boolean ack) + public synchronized void gridletSubmit(Gridlet gl, boolean ack) { // update the current Gridlets in exec list up to this point in time updateGridletProcessing(); @@ -169,14 +170,14 @@ } // if no available PE then put the ResGridlet into a Queue list - if (success == false) + if (!success) { rgl.setGridletStatus(Gridlet.QUEUED); gridletQueueList_.add(rgl); } // sends back an ack if required - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true, gl.getGridletID(), gl.getUserID() @@ -194,7 +195,7 @@ * @pre userId > 0 * @post $none */ - public int gridletStatus(int gridletId,int userId) + public synchronized int gridletStatus(int gridletId,int userId) { ResGridlet rgl = null; @@ -256,7 +257,7 @@ * @pre userId > 0 * @post $none */ - public void gridletCancel(int gridletId, int userId) + public synchronized void gridletCancel(int gridletId, int userId) { // cancels a Gridlet ResGridlet rgl = cancel(gridletId, userId); @@ -301,7 +302,7 @@ * @pre userId > 0 * @post $none */ - public void gridletPause(int gridletId, int userId, boolean ack) + public synchronized void gridletPause(int gridletId, int userId, boolean ack) { boolean status = false; @@ -363,7 +364,7 @@ } // sends back an ack if required - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_PAUSE_ACK, status, gridletId, userId); @@ -391,7 +392,7 @@ * @pre destId > 0 * @post $none */ - public void gridletMove(int gridletId, int userId, int destId, boolean ack) + public synchronized void gridletMove(int gridletId, int userId, int destId, boolean ack) { // cancels the Gridlet ResGridlet rgl = cancel(gridletId, userId); @@ -403,7 +404,7 @@ ".SpaceSharedWithFailure.gridletMove(): Cannot find " + "Gridlet #" + gridletId + " for User #" + userId); - if (ack == true) // sends back an ack if required + if (ack) // sends back an ack if required { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId, userId); @@ -419,7 +420,7 @@ + ".SpaceSharedWithFailure.gridletMove(): Cannot move Gridlet #" + gridletId + " for User #"+ userId+ " since it has FINISHED."); - if (ack == true) // sends back an ack if required + if (ack) // sends back an ack if required { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId, userId); @@ -453,7 +454,7 @@ * @pre userId > 0 * @post $none */ - public void gridletResume(int gridletId, int userId, boolean ack) + public synchronized void gridletResume(int gridletId, int userId, boolean ack) { boolean status = false; @@ -476,7 +477,7 @@ } // otherwise put into Queue list - if (success == false) + if (!success) { rgl.setGridletStatus(Gridlet.QUEUED); gridletQueueList_.add(rgl); @@ -494,7 +495,7 @@ } // sends back an ack if required - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_RESUME_ACK, status, gridletId, userId); @@ -522,7 +523,7 @@ // allocate the Gridlet into an empty PE slot and remove it from // the queue list boolean success = allocatePEtoGridlet(obj); - if (success == true) { + if (!success) { gridletQueueList_.remove(obj); } } @@ -536,7 +537,7 @@ * @pre $none * @post $none */ - private void updateGridletProcessing() + private synchronized void updateGridletProcessing() { // Identify MI share for the duration (from last event time) double time = GridSim.clock(); @@ -653,7 +654,7 @@ * @pre length >= 0.0 * @post $none */ - private double forecastFinishTime(double availableRating, double length) + private static double forecastFinishTime(double availableRating, double length) { double finishTime = (length / availableRating); @@ -673,7 +674,7 @@ * @pre $none * @post $none */ - private void checkGridletCompletion() + private synchronized void checkGridletCompletion() { ResGridlet obj = null; int i = 0; @@ -733,8 +734,7 @@ * or paused list. * @param gridletId a Gridlet ID * @param userId the user or owner's ID of this Gridlet - * @param an object of ResGridlet or <tt>null</tt> if this Gridlet is not - * found + * @return a ResGridlet or <tt>null</tt> if this Gridlet is not found * @pre gridletId > 0 * @pre userId > 0 * @post $none @@ -797,9 +797,9 @@ * Sets the status of all Gridlets in this resource to <tt>FAILED</tt>. * Then sends them back to users, and clean up the relevant lists. */ - public void setGridletsFailed() + public synchronized void setGridletsFailed() { - ResGridlet rgl; + ResGridlet rgl = null; int gridletPausedList_size = gridletPausedList_.size(); int gridletInExecList_size = gridletInExecList_.size(); @@ -869,7 +869,7 @@ * Then sends them back to users, and clean up the relevant lists. * @param failedMachID the id of the failed machine */ - public void setGridletsFailed(int failedMachID) + public synchronized void setGridletsFailed(int failedMachID) { /*************** // Uncomment this to get more info on the progress of sims @@ -907,5 +907,4 @@ } } } - -} // end class +} Modified: trunk/source/gridsim/resFailure/TimeSharedWithFailure.java =================================================================== --- trunk/source/gridsim/resFailure/TimeSharedWithFailure.java 2008-11-16 10:42:53 UTC (rev 259) +++ trunk/source/gridsim/resFailure/TimeSharedWithFailure.java 2009-04-03 04:28:19 UTC (rev 260) @@ -122,7 +122,7 @@ // if the simulation finishes then exit the loop if (ev.get_tag() == GridSimTags.END_OF_SIMULATION || - super.isEndSimulation() == true) + super.isEndSimulation()) { break; } @@ -154,7 +154,7 @@ * @pre gl != null * @post $none */ - public void gridletSubmit(Gridlet gl, boolean ack) + public synchronized void gridletSubmit(Gridlet gl, boolean ack) { // update Gridlets in execution up to this point in time updateGridletProcessing(); @@ -183,7 +183,7 @@ gridletInExecList_.add(rgl); // add into the execution list // sends back an ack if required - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true, gl.getGridletID(), gl.getUserID() @@ -204,7 +204,7 @@ * @pre userId > 0 * @post $none */ - public int gridletStatus(int gridletId, int userId) + public synchronized int gridletStatus(int gridletId, int userId) { ResGridlet rgl = null; @@ -256,7 +256,7 @@ * @pre userId > 0 * @post $none */ - public void gridletCancel(int gridletId, int userId) + public synchronized void gridletCancel(int gridletId, int userId) { // Finds the gridlet in execution and paused list ResGridlet rgl = cancel(gridletId, userId); @@ -305,7 +305,7 @@ * @pre userId > 0 * @post $none */ - public void gridletPause(int gridletId, int userId, boolean ack) + public synchronized void gridletPause(int gridletId, int userId, boolean ack) { boolean status = false; @@ -353,7 +353,7 @@ } // sends back an ack - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_PAUSE_ACK, status, gridletId, userId); @@ -381,7 +381,7 @@ * @pre destId > 0 * @post $none */ - public void gridletMove(int gridletId, int userId, int destId, boolean ack) + public synchronized void gridletMove(int gridletId, int userId, int destId, boolean ack) { // cancel the Gridlet first ResGridlet rgl = cancel(gridletId, userId); @@ -393,7 +393,7 @@ ".TimeSharedWithFailure.gridletMove(): Cannot find " + "Gridlet #" + gridletId + " for User #" + userId); - if (ack == true) // sends ack that this operation fails + if (ack) // sends ack that this operation fails { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId, userId); @@ -413,7 +413,7 @@ + " Gridlet #" + gridletId + " for User #" + userId + " since it has FINISHED."); - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId, userId); @@ -440,7 +440,7 @@ * @pre userId > 0 * @post $none */ - public void gridletResume(int gridletId, int userId, boolean ack) + public synchronized void gridletResume(int gridletId, int userId, boolean ack) { boolean success = false; @@ -474,7 +474,7 @@ } // sends back an ack to sender - if (ack == true) + if (ack) { super.sendAck(GridSimTags.GRIDLET_RESUME_ACK, success, gridletId, userId); @@ -745,7 +745,7 @@ * @pre $none * @post $none */ - private void internalEvent() + private synchronized void internalEvent() { // this is a constraint that prevents an infinite loop // Compare between 2 floating point numbers. This might be incorrect @@ -766,8 +766,7 @@ * or paused list. * @param gridletId a Gridlet ID * @param userId the user or owner's ID of this Gridlet - * @param an object of ResGridlet or <tt>null</tt> if this Gridlet is not - * found + * @return a ResGridlet or <tt>null</tt> if this Gridlet is not found * @pre gridletId > 0 * @pre userId > 0 * @post $none This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2008-11-16 10:43:05
|
Revision: 259 http://gridsim.svn.sourceforge.net/gridsim/?rev=259&view=rev Author: marcos_dias Date: 2008-11-16 10:42:53 +0000 (Sun, 16 Nov 2008) Log Message: ----------- A few improvements in the source code. Modified Paths: -------------- branches/gridsim4.0-branch3/examples/examples/workload/ar/TurboARExample03.java branches/gridsim4.0-branch3/examples/examples/workload/parallel/TurboExample01.java branches/gridsim4.0-branch3/source/eduni/simjava/Sim_entity.java branches/gridsim4.0-branch3/source/eduni/simjava/Sim_system.java branches/gridsim4.0-branch3/source/gridsim/GridSim.java branches/gridsim4.0-branch3/source/gridsim/gui/ResourceWindow.java branches/gridsim4.0-branch3/source/gridsim/turbo/ARCBMultiplePartitions.java branches/gridsim4.0-branch3/source/gridsim/turbo/AREBMultiplePartitions.java branches/gridsim4.0-branch3/source/gridsim/turbo/ARMessage.java branches/gridsim4.0-branch3/source/gridsim/turbo/ARParallelSpaceShared.java branches/gridsim4.0-branch3/source/gridsim/turbo/ARTGridResource.java branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityInfo.java branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityInfoEntry.java branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityProfile.java branches/gridsim4.0-branch3/source/gridsim/turbo/CBMultiplePartitions.java branches/gridsim4.0-branch3/source/gridsim/turbo/CBParallelSpaceShared.java branches/gridsim4.0-branch3/source/gridsim/turbo/EBMultiplePartitions.java branches/gridsim4.0-branch3/source/gridsim/turbo/EBParallelSpaceShared.java branches/gridsim4.0-branch3/source/gridsim/turbo/FilterARMessage.java branches/gridsim4.0-branch3/source/gridsim/turbo/Lublin99Workload.java branches/gridsim4.0-branch3/source/gridsim/turbo/MAUIEBParallelSpaceShared.java branches/gridsim4.0-branch3/source/gridsim/turbo/MPAvailabilityProfile.java branches/gridsim4.0-branch3/source/gridsim/turbo/MPProfileEntry.java branches/gridsim4.0-branch3/source/gridsim/turbo/OrderGridletByStartTime.java branches/gridsim4.0-branch3/source/gridsim/turbo/PERange.java branches/gridsim4.0-branch3/source/gridsim/turbo/PERangeList.java branches/gridsim4.0-branch3/source/gridsim/turbo/QueuePartition.java branches/gridsim4.0-branch3/source/gridsim/turbo/Reservation.java branches/gridsim4.0-branch3/source/gridsim/turbo/ReservationRequester.java branches/gridsim4.0-branch3/source/gridsim/turbo/SSGridlet.java branches/gridsim4.0-branch3/source/gridsim/turbo/SSReservation.java branches/gridsim4.0-branch3/source/gridsim/turbo/ScheduleItem.java branches/gridsim4.0-branch3/source/gridsim/turbo/TAllocPolicy.java branches/gridsim4.0-branch3/source/gridsim/turbo/TResourceCharacteristics.java branches/gridsim4.0-branch3/source/gridsim/turbo/TimeSlot.java branches/gridsim4.0-branch3/source/gridsim/turbo/WorkloadInterface.java Removed Paths: ------------- branches/gridsim4.0-branch3/source/eduni/simjava/Sim_outfile.java branches/gridsim4.0-branch3/source/eduni/simjava/Sim_output.java Modified: branches/gridsim4.0-branch3/examples/examples/workload/ar/TurboARExample03.java =================================================================== --- branches/gridsim4.0-branch3/examples/examples/workload/ar/TurboARExample03.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/examples/examples/workload/ar/TurboARExample03.java 2008-11-16 10:42:53 UTC (rev 259) @@ -122,10 +122,10 @@ ////////////////////////////////////////// // Starts the simulation in debug mode - GridSim.startGridSimulation(true); +// GridSim.startGridSimulation(true); // Start the simulation in normal mode -// GridSim.startGridSimulation(); + GridSim.startGridSimulation(); ////////////////////////////////////////// // Final step: Prints the Gridlets when simulation is over Modified: branches/gridsim4.0-branch3/examples/examples/workload/parallel/TurboExample01.java =================================================================== --- branches/gridsim4.0-branch3/examples/examples/workload/parallel/TurboExample01.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/examples/examples/workload/parallel/TurboExample01.java 2008-11-16 10:42:53 UTC (rev 259) @@ -92,10 +92,10 @@ ////////////////////////////////////////// // Starts the simulation in debug mode - GridSim.startGridSimulation(true); +// GridSim.startGridSimulation(true); // Start the simulation in normal mode -// GridSim.startGridSimulation(); + GridSim.startGridSimulation(); ////////////////////////////////////////// // Final step: Prints the Gridlets when simulation is over Modified: branches/gridsim4.0-branch3/source/eduni/simjava/Sim_entity.java =================================================================== --- branches/gridsim4.0-branch3/source/eduni/simjava/Sim_entity.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/eduni/simjava/Sim_entity.java 2008-11-16 10:42:53 UTC (rev 259) @@ -157,19 +157,6 @@ } /** - * Write a trace message. - * @param level The level at which the trace should be printed, used - * with <code>Sim_system.set_trace_level()</code> to control - * what traces are printed - * @param msg The message to be printed - */ - public void sim_trace(int level, String msg) { - if((level & Sim_system.get_trace_level()) != 0) { - Sim_system.ent_trace(me, msg); - } - } - - /** * Signal that an event has completed service. * @param e The event that has completed service */ @@ -177,9 +164,6 @@ if (!Sim_system.running()) { return; } - - // Notify Sim_system (used for run length determination) - Sim_system.job_completed(me, e.get_tag()); } @@ -477,7 +461,6 @@ if (!Sim_system.running()) { return; } - double start_time = Sim_system.sim_clock(); Sim_system.hold(me,delay); Sim_system.paused(); restart.p(); @@ -507,10 +490,6 @@ if (!Sim_system.running()) { return; } - double start_time = Sim_system.sim_clock(); - if (Sim_system.default_tracing()) { - Sim_system.trace(me, "start holding"); - } sim_wait_for(p, ev); if (!Sim_system.running()) return; } @@ -521,7 +500,7 @@ * events. * @param delay The time period for which the entity will be active unless interrupted * @param ev The event to which the arriving event will be copied to - * @return The time of the specified time period remaining after the arrival occured + * @return The time of the specified time period remaining after the arrival occurred */ public double sim_process_for(double delay, Sim_event ev) { if (delay < 0.0) { @@ -552,16 +531,13 @@ } double start_time = Sim_system.sim_clock(); double time_left = 0.0; - if (Sim_system.default_tracing()) { - Sim_system.trace(me, "start holding"); - } sim_schedule(me, delay, 9999); // Send self 'hold done' msg sim_wait_for(p, ev); if (!Sim_system.running()) return 0.0; if (ev.get_tag() != 9999) { // interrupted Sim_type_p stp = new Sim_type_p(9999); time_left = delay - (ev.event_time() - start_time); - int success = sim_cancel(stp,null); + sim_cancel(stp,null); } if (time_left <= 0.0) { return 0.0; @@ -610,9 +586,6 @@ if (!Sim_system.running()) { return; } - if (Sim_system.default_tracing()) { - Sim_system.trace(me, "start pausing"); - } sim_wait_for(p, ev); } @@ -637,7 +610,7 @@ * @param p The predicate to match * @param delay The time period for which the entity will be inactive unless interrupted * @param ev The event to which the arriving event will be copied to - * @return The time of the specified time period remaining after the arrival occured + * @return The time of the specified time period remaining after the arrival occurred */ public double sim_pause_for(Sim_predicate p, double delay, Sim_event ev) { if (delay < 0.0) { @@ -648,16 +621,13 @@ } double start_time = Sim_system.sim_clock(); double time_left = 0.0; - if (Sim_system.default_tracing()) { - Sim_system.trace(me, "start pausing"); - } sim_schedule(me, delay, 9999); // Send self 'hold done' msg sim_wait_for(p, ev); if (!Sim_system.running()) return 0.0; if (ev.get_tag() != 9999) { // interrupted Sim_type_p stp = new Sim_type_p(9999); time_left = delay - (ev.event_time() - start_time); - int success = sim_cancel(stp,null); + sim_cancel(stp,null); } if (time_left <= 0.0) { return 0.0; @@ -749,7 +719,7 @@ if (ev.get_tag() != 9999) { // interrupted Sim_type_p stp = new Sim_type_p(9999); time_left = delay - (ev.event_time() - Sim_system.sim_clock()); - int success = sim_cancel(stp, null); + sim_cancel(stp, null); } if (time_left <= 0.0) { return 0.0; Deleted: branches/gridsim4.0-branch3/source/eduni/simjava/Sim_outfile.java =================================================================== --- branches/gridsim4.0-branch3/source/eduni/simjava/Sim_outfile.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/eduni/simjava/Sim_outfile.java 2008-11-16 10:42:53 UTC (rev 259) @@ -1,53 +0,0 @@ -/* Sim_outfile.java */ - -package eduni.simjava; - -import java.io.PrintWriter; -import java.io.FileOutputStream; -import java.io.IOException; - -/** - * The default trace output class, which implements the Sim_output - * interface. This class implements output to a file called tracefile - * in the current directory, and is used by default in full Java applications. - * Note that it can't be used in applets, because they do not allow access - * to files. - * @see Sim_output - * @version 1.0, 4 September - * @version 1.1, 24 March 1997 - * @author Ross McNab, Fred Howell - */ -public class Sim_outfile implements Sim_output { - private PrintWriter trcstream; - - /** - * Constructor - */ - public Sim_outfile() { } - - /** - * Attempt to open the file - */ - public void initialise() { - try { - trcstream = new PrintWriter(new FileOutputStream("sim_trace")); - } catch(IOException e) { - System.out.println("Sim_system: Error - could not open trace file"); - } - } - - /** - * Print a trace line to the file - * @param msg The message to print - */ - public void println(String msg) { - trcstream.println(msg); - } - - /** - * Close the file - */ - public void close() { - trcstream.close(); - } -} Deleted: branches/gridsim4.0-branch3/source/eduni/simjava/Sim_output.java =================================================================== --- branches/gridsim4.0-branch3/source/eduni/simjava/Sim_output.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/eduni/simjava/Sim_output.java 2008-11-16 10:42:53 UTC (rev 259) @@ -1,28 +0,0 @@ -/* Sim_output.java */ - -package eduni.simjava; - -/** - * The interface that a trace output class must provide. - * @see Sim_system - * @version 1.0, 4 September 1996 - * @author Ross McNab - */ -public interface Sim_output { - - /** - * Called by <code>Sim_system</code> before the simulation starts. - */ - public void initialise(); - - /** - * Called by <code>Sim_system</code> to output a trace line. - * @param msg The trace message - */ - public void println(String msg); - - /** - * Called by <code>Sim_system</code> at the end of the simulation. - */ - public void close(); -} Modified: branches/gridsim4.0-branch3/source/eduni/simjava/Sim_system.java =================================================================== --- branches/gridsim4.0-branch3/source/eduni/simjava/Sim_system.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/eduni/simjava/Sim_system.java 2008-11-16 10:42:53 UTC (rev 259) @@ -49,12 +49,6 @@ */ public class Sim_system { - // Fields for the management of the trace file - private static int[] trace_tags; // The tags for which trace will be generated - private static boolean default_trace = true, // Flag for including or not the default trace - entity_trace = true, // Flag for including or not the entity trace - event_trace = true; // Flag for including or not the event specific trace - // Private data members private static List entities; // The current entity list private static Evqueue future; // The future event queue @@ -63,9 +57,6 @@ private static boolean running; // Flag for checking if the simulation is running private static Semaphore onestopped; // Semaphore for synchronising entities private static Semaphore onecompleted; // Semaphore for registering entities having completed - private static Sim_output trcout; // The output object for trace messages - private static int trace_level; // The trace level for which event trace will be generated - private static boolean auto_trace; // Should we print trace messages? private static HashMap wait_predicates; // The predicates used in entity wait methods // Private fields used for seed generation @@ -91,15 +82,6 @@ * at the start of the simulation. */ public static void initialise() { - initialise(new Sim_outfile()); - } - - /** - * Initialise the system to draw <code>simdiag</code> diagrams. This method - * should be used directly only by expert users. - * @param out The <code>Sim_output</code> instance that will receive the simulation trace - */ - public static void initialise(Sim_output out) { System.out.println("Initialising..."); entities = new ArrayList(); future = new Evqueue(); @@ -109,10 +91,6 @@ running = false; onestopped = new Semaphore(0); onecompleted = new Semaphore(0); - trcout = out; - trcout.initialise(); - trace_level = 0xff; - auto_trace = false; } // The two standard predicates @@ -144,21 +122,6 @@ public static int get_num_entities() { return entities.size(); } /** - * Get the current trace level (initially <code>0xff</code>), which - * controls trace output. This method is identical to <code>get_trace_level()</code> and - * is present for compatibility with existing simulations. - * @return The trace level - */ - public static int get_trc_level() { return trace_level; } // For compatibility with previous versions - - /** - * Get the current trace level (initially <code>0xff</code>), which - * controls trace output. - * @return The trace level - */ - public static int get_trace_level() { return trace_level; } - - /** * Get the entity with a given id. * @param id The entity's unique id number * @return The entity, or <code>null</code> if it could not be found @@ -203,8 +166,6 @@ return id; } - // ADDED BY MARCOS TO GET THE LIST OF ENTITIES IN THE SIMULATION - /** * Returns a list of entities created for the simulation * @return the entity iterator @@ -217,8 +178,6 @@ return list; } - // END OF METHODS ADDED BY MARCOS - /** * Get the currently running entity. * @return The entity, or <code>null</code> if none are running @@ -230,26 +189,6 @@ // Public update methods /** - * Set the trace level which controls entity trace output. This method is identical to - * <code>set_trace_level()</code> and is present for compatibility with existing simulations. - * @param level The new level - */ - public static void set_trc_level(int level) { auto_trace = true; trace_level = level; } - - /** - * Set the trace level which controls entity trace output. - * @param level The new level - */ - public static void set_trace_level(int level) { auto_trace = true; trace_level = level; } - - /** - * Switch the trace messages on and off. - * @param on If <code>true</code> then the messages are switched on, if <code>false</code> - they are switched off. - */ - public static void set_auto_trace(boolean on) { auto_trace = on; } - - /** * Add a new entity to the simulation. This is present for compatibility with existing * simulations since entities are automatically added to the simulation upon instantiation. * @param e The new entity @@ -367,19 +306,12 @@ */ public static void run_stop() { print_message("Simulation completed."); - trcout.close(); } // // Package level methods // - /** - * Get the object to which the simulation trace is sent. - * @return The trace handler - */ - public static Sim_output get_trcout() { return trcout; } - // Entity service methods // Called by an entity just before it become non-RUNNABLE @@ -390,9 +322,6 @@ Sim_event e = new Sim_event(Sim_event.HOLD_DONE,clock+delay,src); future.add_event(e); ((Sim_entity)entities.get(src)).set_state(Sim_entity.HOLDING); - if (auto_trace && default_trace) { - trace(src, "start processing"); - } } // Used to pause an entity for some time @@ -400,9 +329,6 @@ Sim_event e = new Sim_event(Sim_event.HOLD_DONE,clock+delay,src); future.add_event(e); ((Sim_entity)entities.get(src)).set_state(Sim_entity.HOLDING); - if (auto_trace && default_trace) { - trace(src, "start pausing"); - } } // Used to send an event from one entity to another @@ -411,11 +337,6 @@ throw new Sim_exception("Sim_system: Send delay can't be negative."); } Sim_event e = new Sim_event(Sim_event.SEND, clock+delay, src, dest, tag, data); - if (auto_trace && (default_trace || (event_trace && is_trace_tag(tag)))) { - trace(src, "scheduling event type "+tag+" for "+ - ((Sim_entity)entities.get(dest)).get_name()+ - " with delay "+delay); - } future.add_event(e); } @@ -428,9 +349,6 @@ // If a predicate has been used store it in order to check it wait_predicates.put(new Integer(src), p); } - if (auto_trace && default_trace) { - trace(src,"waiting for an event"); - } } // Checks if events for a specific entity are present in the deferred event queue @@ -464,14 +382,8 @@ } if (found) { ((Sim_entity)entities.get(src)).set_evbuf((Sim_event)ev.clone()); - if (auto_trace && (default_trace || (event_trace &&is_trace_tag(ev.get_tag())))) { - trace(src,"selected event type " + ev.get_tag() + " (event time was "+ev.event_time()+")"); - } } else { ((Sim_entity)entities.get(src)).set_evbuf(null); - if (auto_trace && (default_trace)) { - trace(src,"no event selected"); - } } } @@ -494,14 +406,8 @@ if (found) { ((Sim_entity)entities.get(src)).set_evbuf((Sim_event)ev.clone()); - if (auto_trace && (default_trace || (event_trace && is_trace_tag(ev.get_tag())))) { - trace(src,"cancelled event type " + ev.get_tag() + " (event time was "+ev.event_time()+")"); - } } else { ((Sim_entity)entities.get(src)).set_evbuf(null); - if (auto_trace && default_trace) { - trace(src,"no event cancelled"); - } } } @@ -529,9 +435,7 @@ // Processes an event private static void process_event(Sim_event e) { - // ADDED BY MARCOS TO ALLOW THE - // SIMULATION TO BE PAUSED - + // ADDED TO ALLOW THE SIMULATION TO BE PAUSED synchronized(syncObj){ if(clock >= pauseAt) @@ -600,7 +504,7 @@ /** * Set the sample generators' seed sequence. If this method is not called the defaults * are 4851 as the root seed and 100000 as the desired sample spacing. - * @param seed_specing The seed spacing + * @param seed_spacing The seed spacing * @param root_seed The seed used to generate all the simulation's seeds */ public static void set_seed_sequence(int seed_spacing, long root_seed) { @@ -663,14 +567,6 @@ return new_seed; } - // Called when an event is considered to have completed service. If the event that completed is the one - // that determines the run length condition. - static synchronized void job_completed(int entity, int event_tag) { - if (auto_trace && (default_trace || (event_trace && is_trace_tag(event_tag)))) { - trace(entity, "event type " + event_tag + " completed service"); - } - } - /** * Internal method used to start the simulation. This method should <b>not</b> be used by user simulations. */ @@ -697,8 +593,7 @@ return running; } - // ADDED BY MARCOS TO ALLOW THE SIMULATION TO BE - // PAUSED AND RESUMED + // ADDED TO ALLOW THE SIMULATION TO BE PAUSED AND RESUMED /** * This method is called if one wants to @@ -716,7 +611,7 @@ /** * This method is called if one wants to pause the simulation * at a given time - * @time the time at which the simulation has to be paused + * @param time the time at which the simulation has to be paused * @return <tt>true</tt>if the simulation has been paused * or <tt>false</tt> otherwise. */ @@ -748,7 +643,7 @@ } } - // END OF METHODS ADDED BY MARCOS + // END OF METHODS USED TO PAUSE THE SIMULATION /** * Start the simulation running. This should be called after all the entities have been setup @@ -795,93 +690,6 @@ private static void print_message(String message) { System.out.println(message); } - - // TRACE METHODS - - /** - * Set the desired contents of the trace file. The default is to include all trace, if tracing is - * switched on. - * @param default_trace If set to <code>true</code> the default trace will be included in the trace file, - * if <code>false</code> it will not - * @param entity_trace If set to <code>true</code> the trace generated by the entities will be - * included in the trace file, if <code>false</code> it will not - * @param event_trace If set to <code>true</code> the trace file will include trace for the selected - * event types, if <code>false</code> it will not - */ - public static void set_trace_detail(boolean default_trace, boolean entity_trace, boolean event_trace) { - auto_trace = true; - Sim_system.default_trace = default_trace; - Sim_system.entity_trace = entity_trace; - Sim_system.event_trace = event_trace; - } - - /** - * Generate trace for a specific event type. - * @param tag The event type - */ - public static void track_event(int tag) { - auto_trace = true; - if (trace_tags == null) { - trace_tags = new int[1]; - trace_tags[0] = tag; - } else { - int[] temp = trace_tags; - trace_tags = new int[temp.length + 1]; - for (int i=0; i < temp.length; i++) { - trace_tags[i] = temp[i]; - } - trace_tags[temp.length] = tag; - } - } - - /** - * Generate trace for a set of specific event types - * @tags The set of event types - */ - public static void track_events(int[] tags) { - auto_trace = true; - if (trace_tags == null) { - trace_tags = tags; - } else { - int[] temp = trace_tags; - trace_tags = new int[temp.length + tags.length]; - for (int i=0; i < temp.length; i++) { - trace_tags[i] = temp[i]; - } - for (int i=(temp.length-1); i < tags.length; i++) { - trace_tags[i] = tags[i]; - } - } - } - - // Adds a trace message - static synchronized void trace(int src, String msg) { - trcout.println("u: " + ((Sim_entity)entities.get(src)).get_name() + " at " + clock + ": " + msg); - } - - // Called by entities to generate trace messages - static synchronized void ent_trace(int src, String msg) { - if ((auto_trace && entity_trace)) trace(src, msg); - } - - // Checks to see whether this tag is a tag for which tracing is specified - private static boolean is_trace_tag(int tag) { - boolean result = false; - if (trace_tags != null) { - for (int i=0; i < trace_tags.length; i++) { - if (trace_tags[i] == tag) { - result = true; - break; - } - } - } - return result; - } - - // Check if the default trace is being produce - static boolean default_tracing() { - return (auto_trace && default_trace); - } } Modified: branches/gridsim4.0-branch3/source/gridsim/GridSim.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/GridSim.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/GridSim.java 2008-11-16 10:42:53 UTC (rev 259) @@ -83,7 +83,7 @@ private final int ARRAY_SIZE = 3; private final int SIZE = 12; // Integer object size incl. overhead private final int RESULT = 1; // array[0] = gridlet id, [1] = result - private final static String GRIDSIM_VERSION_STRING = "Turbo Alpha 0.1"; + private final static String GRIDSIM_VERSION_STRING = "Alpha 0.1"; // These attributes are set to be used by the Graphical User Interface public static boolean debugMode_ = false; @@ -123,7 +123,7 @@ private static Calendar calendar_ = null; // a Calendar object private static GridInformationService gis_ = null; // a GIS object private final static int NOT_FOUND = -1; // a constant - private static boolean traceFlag_; + private static boolean traceFlag_ = false; //////////////////////////////////////////////////////////////////////// @@ -278,7 +278,7 @@ * processings to be excluded from writing * into a file * @param reportWriterName a <tt>ReportWriter</tt> entity name. This entity - * can be found inside a gridbroker package. + * can be found inside a grid broker package. * @see gridsim.GridSimShutdown * @see gridsim.GridStatistics * @see gridsim.GridInformationService @@ -543,8 +543,7 @@ * @param shouldPause indicates whether the simulation should be paused after * notifying the listeners. <tt>true</tt> indicates that it should pause and * <tt>false</tt> means that it should not. - * @param itemList the list of gridlets to provide to the listeners - * + * @param itemList the list of schedule items to provide to the listeners * @see AllocationAction#ITEM_ARRIVED * @see AllocationAction#ITEM_SCHEDULED * @see AllocationAction#ITEM_CANCELLED @@ -572,8 +571,7 @@ * @param shouldPause indicates whether the simulation should be paused after * notifying the listeners. <tt>true</tt> indicates that it should pause and * <tt>false</tt> means that it should not. - * @param item the gridlet to provide to the listeners - * + * @param item the schedule item to provide to the listeners * @see AllocationAction#ITEM_ARRIVED * @see AllocationAction#ITEM_SCHEDULED * @see AllocationAction#ITEM_CANCELLED @@ -603,8 +601,6 @@ * @param shouldPause indicates whether the simulation should be paused after * notifying the listeners. <tt>true</tt> indicates that it should pause and * <tt>false</tt> means that it should not. - * @param gridlet the gridlet to provide to the listeners - * * @see AllocationAction#ITEM_ARRIVED * @see AllocationAction#ITEM_SCHEDULED * @see AllocationAction#ITEM_CANCELLED @@ -694,8 +690,6 @@ { // NOTE: the order for the below 3 lines are important Sim_system.initialise(); - Sim_system.set_trc_level(1); - Sim_system.set_auto_trace(traceFlag); // Set the current Wall clock time as the starting time of simulation calendar_ = cal; @@ -731,7 +725,7 @@ * @post $none */ public static void startGridSimulation() throws NullPointerException { - System.out.println("Starting GridSim " + GRIDSIM_VERSION_STRING); + System.out.println("Starting GridSim version " + GRIDSIM_VERSION_STRING); try { Sim_system.run(); } @@ -760,7 +754,7 @@ */ public static void startGridSimulation(boolean debug) throws NullPointerException { - System.out.println("Starting GridSim " + GRIDSIM_VERSION_STRING); + System.out.println("Starting GridSim version " + GRIDSIM_VERSION_STRING); if(!debug) { disableDebugMode(); startGridSimulation(); Modified: branches/gridsim4.0-branch3/source/gridsim/gui/ResourceWindow.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/gui/ResourceWindow.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/gui/ResourceWindow.java 2008-11-16 10:42:53 UTC (rev 259) @@ -1018,6 +1018,7 @@ // the list model. This is a wrapper around the vector // of elements to be shown in the list private class ItemListModel extends AbstractListModel { + private static final long serialVersionUID = -8237271304298777156L; private Vector<ScheduleItem> items_ = new Vector<ScheduleItem>(); public Object getElementAt(int index) { @@ -1077,6 +1078,8 @@ * Panel that contains information about the colors */ private class ColorLabelPanel extends JPanel { + private static final long serialVersionUID = 4737308429990400119L; + public ColorLabelPanel() { super(); setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED)); Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/ARCBMultiplePartitions.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/ARCBMultiplePartitions.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/ARCBMultiplePartitions.java 2008-11-16 10:42:53 UTC (rev 259) @@ -7,6 +7,11 @@ package gridsim.turbo; +import java.util.Calendar; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; + import eduni.simjava.Sim_event; import gridsim.GridSim; import gridsim.GridSimTags; @@ -14,11 +19,6 @@ import gridsim.IO_data; import gridsim.gui.AllocationAction; -import java.util.Calendar; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedList; - /** * This class implements a non-FCFS policy to schedule parallel jobs. The * policy is based on conservative backfilling and supports advance reservation. @@ -68,7 +68,7 @@ // internal event tags used by this gridlet // a tag to denote expiry time - private final int EXPIRY_TIME = 12; + private static final int EXPIRY_TIME = 12; // last time the expiration of reservations was checked private double lastCheckExpiryTime_; @@ -181,7 +181,7 @@ double currentTime = GridSim.clock(); - int freePE; + int freePE = 0; int reqPE = gridlet.getNumPE(); // gets the advance reservation SSReservation sRes = reservTable_.get(gridlet.getReservationID()); @@ -247,8 +247,7 @@ else { // selects a list of ranges for the gridlet from the PEs available // for the reservation - PERangeList selected = null; - success = ( ( selected = sRes.selectPERangeList(reqPE) ) != null ); + PERangeList selected = sRes.selectPERangeList(reqPE); sgl.setPERangeList(selected); double resStartTime = sRes.getStartTime(); @@ -282,7 +281,7 @@ //--------------------------------------------------------------- // sends back an ack if required - if (ack == true) { + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true, gridlet.getGridletID(), gridlet.getUserID() ); @@ -300,7 +299,6 @@ */ public boolean handleCreateReservation(ARMessage message) { double currentTime = GridSim.clock(); - boolean success; // gets the reservation object and extract some // information from it @@ -313,7 +311,7 @@ ARMessage response = message.createResponse(); // validate the reservation, check num of PEs required, partition, etc. - success = validateReservation(sRes); + boolean success = validateReservation(sRes); if(!success) { reservation.setStatus(Reservation.STATUS_FAILED); @@ -323,8 +321,9 @@ } double startTime = reservation.getStartTime(); - if(startTime == 0 || startTime < currentTime) + if(startTime == 0.0 || startTime < currentTime) { startTime = currentTime; + } double expTime = Double.NaN; @@ -659,8 +658,9 @@ break; } } - else + else { super.processOtherEvent(ev); + } } // --------------------- PROTECTED METHODS ----------------------- @@ -783,8 +783,9 @@ /** * This method is called to start a reservation and consequently update * the availability profile. - * @refTime the reservations whose start time is smaller + * @param refTime the reservations whose start time is smaller * or equals to refTime will be started + * @return the number of reservations started */ protected int startReservations(double refTime) { LinkedList<SSReservation> startedReservations = new LinkedList<SSReservation>(); @@ -961,8 +962,9 @@ // to be returned. It removes repeated entries. for(int i=anchorIndex+1; i<length; i++) { MPProfileEntry nextEntry = profile_.get(i); - if(nextEntry.getTime() <= startTime) + if(nextEntry.getTime() <= startTime) { continue; + } if(nextEntry.getTime() > finishTime){ break; } @@ -1021,7 +1023,6 @@ /** * Checks for expiry time of a given reservations in the list. - * @param reservation the reservation to be checked */ private void checkExpiryTime() { Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/AREBMultiplePartitions.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/AREBMultiplePartitions.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/AREBMultiplePartitions.java 2008-11-16 10:42:53 UTC (rev 259) @@ -7,6 +7,11 @@ package gridsim.turbo; +import java.util.Calendar; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; + import eduni.simjava.Sim_event; import gridsim.GridSim; import gridsim.GridSimTags; @@ -14,11 +19,6 @@ import gridsim.IO_data; import gridsim.gui.AllocationAction; -import java.util.Calendar; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedList; - /** * This class implements a non-FCFS policy to schedule parallel jobs. The * policy is based on easy backfilling and supports advance reservation. @@ -76,7 +76,7 @@ // internal event tags used by this gridlet // a tag to denote expiry time - private final int EXPIRY_TIME = 12; + private static final int EXPIRY_TIME = 12; // last time the expiration of reservations was checked private double lastCheckExpiryTime_; @@ -189,7 +189,7 @@ double currentTime = GridSim.clock(); - int freePE; + int freePE = 0; int reqPE = gridlet.getNumPE(); // gets the advance reservation SSReservation sRes = reservTable_.get(gridlet.getReservationID()); @@ -255,8 +255,7 @@ else { // selects a list of ranges for the gridlet from the PEs available // for the reservation - PERangeList selected = null; - success = ( ( selected = sRes.selectPERangeList(reqPE) ) != null ); + PERangeList selected = sRes.selectPERangeList(reqPE); sgl.setPERangeList(selected); double resStartTime = sRes.getStartTime(); @@ -308,7 +307,6 @@ */ public boolean handleCreateReservation(ARMessage message) { double currentTime = GridSim.clock(); - boolean success; // gets the reservation object and extract some // information from it @@ -321,7 +319,7 @@ ARMessage response = message.createResponse(); // validate the reservation, check num of PEs required, partition, etc. - success = validateReservation(sRes); + boolean success = validateReservation(sRes); if(!success) { reservation.setStatus(Reservation.STATUS_FAILED); @@ -331,8 +329,9 @@ } double startTime = reservation.getStartTime(); - if(startTime == 0 || startTime < currentTime) + if(startTime == 0 || startTime < currentTime) { startTime = currentTime; + } double expTime = Double.NaN; @@ -812,8 +811,9 @@ // to be returned. It removes repeated entries. for(int i=anchorIndex+1; i<length; i++) { MPProfileEntry nextEntry = profile_.get(i); - if(nextEntry.getTime() <= startTime) + if(nextEntry.getTime() <= startTime) { continue; + } if(nextEntry.getTime() > finishTime){ break; } @@ -898,8 +898,9 @@ // to be returned. It removes repeated entries. for(int i=anchorIndex+1; i<length; i++) { MPProfileEntry nextEntry = profile_.get(i); - if(nextEntry.getTime() <= startTime) + if(nextEntry.getTime() <= startTime) { continue; + } if(nextEntry.getTime() > finishTime){ break; } @@ -958,7 +959,6 @@ /** * Checks for expiry time of a given reservations in the list. - * @param reservation the reservation to be checked */ private void checkExpiryTime() { Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/ARMessage.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/ARMessage.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/ARMessage.java 2008-11-16 10:42:53 UTC (rev 259) @@ -252,8 +252,9 @@ * <tt>false</tt> otherwise */ public boolean setDestinationID(int destId) { - if(destId < 0) + if(destId < 0) { return false; + } dstId_ = destId; return true; } @@ -321,8 +322,9 @@ * or <tt>false</tt> otherwise */ public boolean setReservation(Reservation reservation) { - if(reservation == null) + if(reservation == null) { return false; + } reservation_ = reservation; return true; @@ -341,10 +343,12 @@ * @return the reservation id of <tt>-1</tt> if not found */ public int getReservationID() { - if(reservation_ != null) + if(reservation_ != null) { return reservation_.getID(); - else + } + else { return -1; + } } /** @@ -362,8 +366,9 @@ * @return <tt>true</tt> if successfully or <tt>false</tt> otherwise */ public boolean setPrice(double price) { - if(price <= 0.0) + if(price <= 0.0) { return false; + } price_ = price; return true; Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/ARParallelSpaceShared.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/ARParallelSpaceShared.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/ARParallelSpaceShared.java 2008-11-16 10:42:53 UTC (rev 259) @@ -7,6 +7,12 @@ package gridsim.turbo; +import java.util.Calendar; +import java.util.Collection; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; + import eduni.simjava.Sim_event; import gridsim.GridSim; import gridsim.GridSimTags; @@ -14,12 +20,6 @@ import gridsim.IO_data; import gridsim.gui.AllocationAction; -import java.util.Calendar; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedList; - /** * <tt>ARParallelSpaceShared</tt> class is an allocation policy for * <tt>ARTGridResource</tt> that implements conservative backfilling and @@ -96,7 +96,7 @@ // internal event tags used by this gridlet // a tag to denote expiry time - private final int EXPIRY_TIME = 12; + private static final int EXPIRY_TIME = 12; // last time the expiration of reservations was checked private double lastCheckExpiryTime_; @@ -658,8 +658,9 @@ break; } } - else + else { super.processOtherEvent(ev); + } } /** @@ -686,7 +687,7 @@ double currentTime = GridSim.clock(); - int freePE; + int freePE = 0; int reqPE = gridlet.getNumPE(); // gets the advance reservation SSReservation sRes = reservTable_.get(gridlet.getReservationID()); @@ -752,8 +753,7 @@ else { // selects a list of ranges for the gridlet from the PEs available // for the reservation - PERangeList selected = null; - success = ( ( selected = sRes.selectPERangeList(reqPE) ) != null ); + PERangeList selected = sRes.selectPERangeList(reqPE); sgl.setPERangeList(selected); double resStartTime = sRes.getStartTime(); @@ -787,7 +787,7 @@ //--------------------------------------------------------------- // sends back an ack if required - if (ack == true) { + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true, gridlet.getGridletID(), gridlet.getUserID() ); @@ -846,7 +846,6 @@ /** * Checks for expiry time of a given reservations in the list. - * @param reservation the reservation to be checked */ private void checkExpiryTime() { @@ -910,8 +909,9 @@ /** * This method is called to start a reservation and consequently update * the availability profile. - * @refTime the reservations whose start time is smaller + * @param refTime the reservations whose start time is smaller * or equals to refTime will be started + * @return the number of reservations started */ private int startReservation(double refTime) { @@ -1001,6 +1001,7 @@ * to handle a reservation. * * @param reqPE the number of PEs + * @param startTime the supposed start time for the reservation * @param duration the duration in seconds to execute the reservation * @return an array[2] of Objects as follows:<br> * array[0] the index of the anchor point<br> @@ -1092,8 +1093,9 @@ } } - if(tailEntry != null) + if(tailEntry != null) { tailIndex = availProfile_.indexOf(tailEntry); + } // creates the array with the result Object[] result = new Object[3]; Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/ARTGridResource.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/ARTGridResource.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/ARTGridResource.java 2008-11-16 10:42:53 UTC (rev 259) @@ -8,13 +8,14 @@ package gridsim.turbo; +import java.util.Calendar; + import eduni.simjava.Sim_event; import gridsim.GridResource; import gridsim.GridSim; import gridsim.GridSimTags; import gridsim.ResourceCalendar; import gridsim.net.Link; -import java.util.Calendar; /** * <tt>ARTGridResource</tt> class handles all Advanced Reservation functionalities. @@ -238,7 +239,7 @@ success = checkResourceType(message); // if this resource doesn't support AR then exit - if (success == false) { + if (!success) { return; } @@ -271,6 +272,9 @@ case ARMessage.TYPE_AR_LIST_FREE_TIME: arPolicy_.handleQueryAvailability(message); break; + + default: + break; } } catch (Exception e) { @@ -306,6 +310,10 @@ case ARMessage.TYPE_AR_LIST_FREE_TIME: errorMessage = " cannot list free time slots."; break; + + default: + errorMessage = " unknown message."; + break; } System.out.println(super.get_name() + ": Error - " + errorMessage); Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityInfo.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityInfo.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityInfo.java 2008-11-16 10:42:53 UTC (rev 259) @@ -98,8 +98,9 @@ while(it.hasNext()) { AvailabilityInfoEntry entry = it.next(); - if(entry.getTime() > time) + if(entry.getTime() > time) { break; + } preceding = entry; } @@ -148,11 +149,13 @@ public double getPotentialStartTime(double readyTime, int duration, int reqPE, double deadline) { - if(readyTime < startTime_) + if(readyTime < startTime_) { readyTime = startTime_; + } - if(readyTime > finishTime_) + if(readyTime > finishTime_) { return UNKNOWN; + } // the anchor index, the entry in the profile where // the request would be placed OR the closest entry to the @@ -168,8 +171,9 @@ anchorEntry = getPrecedingEntry(readyTime); int firstAnchorIndex = super.indexOf(anchorEntry); - if(firstAnchorIndex == -1) + if(firstAnchorIndex == -1) { firstAnchorIndex = 0; + } for(int j=firstAnchorIndex; j<length; j++) { AvailabilityInfoEntry entry = super.get(j); @@ -182,10 +186,12 @@ else { // sets the start time as the time of the entry - if(entry.getTime() < readyTime) + if(entry.getTime() < readyTime) { potStartTime = readyTime; - else + } + else { potStartTime = entry.getTime(); + } // calculates when the finish time will be if // the gridlet is put at this position @@ -193,8 +199,9 @@ // The job would not complete before the deadline, then just // return the potential start time as unknown - if(potFinishTime > deadline) + if(potFinishTime > deadline) { return UNKNOWN; + } // if an entry with enough PEs is found, then scan the list // from that point onwards analysing the intersection of @@ -327,8 +334,9 @@ int size = super.size(); int firstIndex = super.indexOf(entry); - if(firstIndex < 0) + if(firstIndex < 0) { firstIndex = 0; + } for(int i=firstIndex; i<size; i++) { entry = super.get(i); @@ -394,8 +402,9 @@ // gets the part of the profile relevant to create the slots AvailabilityInfo subProfile = getSubAvailabilityInfo(startTime, finishTime); - if(subProfile == null || subProfile.size() == 0) + if(subProfile == null || subProfile.size() == 0) { return slots; + } double slotStart = 0; double slotFinish = 0; @@ -412,8 +421,9 @@ startIdx = i; endIdx = i; - if(entry.getNumPE() == 0) + if(entry.getNumPE() == 0) { continue; + } // check all time slots starting at slotStart do { @@ -429,8 +439,9 @@ endIdx = j; continue; } - else + else { break; + } } if(intersect != null && intersect.getNumPE() > 0) { @@ -467,8 +478,9 @@ AvailabilityInfo info = new AvailabilityInfo(); // start time cannot be smaller than the start time of the info obj - if(startTime < startTime_) + if(startTime < startTime_) { startTime = startTime_; + } // start time cannot be larger than the finish time of the info obj if(startTime > finishTime_) { @@ -488,8 +500,9 @@ for(int i=index+1; i<length; i++) { entry = super.get(i); - if(entry.getTime() <= startTime) + if(entry.getTime() <= startTime) { continue; + } if(entry.getTime() > finishTime) { break; } @@ -519,8 +532,9 @@ public void allocate(double startTime, double finishTime, PERangeList selected) { - if(startTime == finishTime_) + if(startTime == finishTime_) { return; + } // check whether a new tail is needed to mark the end of the request if(finishTime < finishTime_) { Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityInfoEntry.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityInfoEntry.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityInfoEntry.java 2008-11-16 10:42:53 UTC (rev 259) @@ -67,8 +67,9 @@ * <tt>false</tt> otherwise. */ public boolean setTime(double time) { - if(time < 0) + if(time < 0) { return false; + } time_ = time; return true; @@ -121,8 +122,9 @@ * @return <tt>true</tt> if the ranges changed as result of this call */ public boolean addRanges(PERangeList list) { - if(availRanges_ == null) + if(availRanges_ == null) { availRanges_ = new PERangeList(); + } return availRanges_.addAll(list); } @@ -153,10 +155,12 @@ * @return the number of PEs */ public int getNumPE() { - if(availRanges_ == null) + if(availRanges_ == null) { return 0; - else + } + else { return availRanges_.getNumPE(); + } } /** Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityProfile.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityProfile.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/AvailabilityProfile.java 2008-11-16 10:42:53 UTC (rev 259) @@ -118,8 +118,9 @@ AvailabilityProfileEntry previousEntry = null; for(AvailabilityProfileEntry entry : this) { - if(entry.getTime() < startTime) + if(entry.getTime() < startTime) { continue; + } if(entry.getTime() > finishTime) { break; } Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/CBMultiplePartitions.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/CBMultiplePartitions.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/CBMultiplePartitions.java 2008-11-16 10:42:53 UTC (rev 259) @@ -7,15 +7,15 @@ package gridsim.turbo; +import java.util.Calendar; +import java.util.Collections; +import java.util.Iterator; + import gridsim.GridSim; import gridsim.GridSimTags; import gridsim.Gridlet; import gridsim.gui.AllocationAction; -import java.util.Calendar; -import java.util.Collections; -import java.util.Iterator; - /** * This class implements a non-FCFS policy to schedule parallel jobs. The * policy is based on conservative backfilling. This policy can use @@ -135,7 +135,7 @@ //--------------------------------------------------------------- // sends back an ack if required - if (ack == true) { + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true, gridlet.getGridletID(), gridlet.getUserID() ); @@ -250,8 +250,9 @@ removeGridlet(sgl); // compress the schedule, that is, moves the gridlets forwards - if(!sgl.hasReserved()) + if(!sgl.hasReserved()) { compressSchedule(referenceTime, sgl.getStatus() == Gridlet.INEXEC); + } //------------------- USED FOR DEBUGGING PURPOSES ONLY ----------------- @@ -273,7 +274,7 @@ * Schedules a gridlet. This method will find the anchor point for * the gridlet and allocate the resources for it * @param sgl the resource gridlet - * return <tt>true</tt> if gridlet was scheduled; <tt>false</tt> otherwise. + * @return <tt>true</tt> if gridlet was scheduled; <tt>false</tt> otherwise. */ protected boolean scheduleGridlet(SSGridlet sgl) { int reqPE = sgl.getNumPE(); @@ -298,11 +299,9 @@ Object[] availObj = profile_.checkPERangesAvailability(reqPE, executionTime); - int anchor; - double startTimeQueue; - if (availObjQueue == null) - startTimeQueue = Double.MAX_VALUE; - else { + int anchor = -1; + double startTimeQueue = Double.MAX_VALUE; + if (!(availObjQueue == null)) { anchor = (Integer)availObjQueue[0]; startTimeQueue=profile_.get(anchor).getTime(); } @@ -511,8 +510,9 @@ // iterates the waiting queue and for each gridlet, put the ranges // used back in the profile. That is, updates the entries - if(jobOrderHeuristic_ != null) + if(jobOrderHeuristic_ != null) { Collections.sort(queuedGridlets_, jobOrderHeuristic_); + } Iterator<SSGridlet> iterQueue = queuedGridlets_.iterator(); while(iterQueue.hasNext()) { Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/CBParallelSpaceShared.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/CBParallelSpaceShared.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/CBParallelSpaceShared.java 2008-11-16 10:42:53 UTC (rev 259) @@ -8,6 +8,12 @@ package gridsim.turbo; +import java.util.Calendar; +import java.util.Collections; +import java.util.Comparator; +import java.util.Iterator; +import java.util.LinkedList; + import eduni.simjava.Sim_event; import eduni.simjava.Sim_system; import gridsim.GridSim; @@ -15,12 +21,6 @@ import gridsim.Gridlet; import gridsim.gui.AllocationAction; -import java.util.Calendar; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; -import java.util.LinkedList; - /** * <tt>CBParallelSpaceShared</tt> class is an allocation policy for * <tt>GridResource</tt> that implements conservative backfilling. @@ -181,7 +181,7 @@ // if the simulation finishes then exit the loop if (ev.get_tag() == GridSimTags.END_OF_SIMULATION || - super.isEndSimulation() == true) { + super.isEndSimulation()) { break; } @@ -212,8 +212,9 @@ * <tt>false</tt> otherwise. */ public boolean setJobOrderingHeuristic(Comparator<SSGridlet> comparator) { - if(comparator == null) + if(comparator == null) { return false; + } jobOrderHeuristic_ = comparator; return true; @@ -285,7 +286,7 @@ //--------------------------------------------------------------- // sends back an ack if required - if (ack == true) { + if (ack) { super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true, gridlet.getGridletID(), gridlet.getUserID() ); @@ -435,8 +436,9 @@ removeGridlet(isRunning, sgl); // compress the schedule, that is, moves the gridlets forwards - if(!sgl.hasReserved()) + if(!sgl.hasReserved()) { compressSchedule(referenceTime, sgl.getStatus() == Gridlet.INEXEC); + } //------------------- USED FOR DEBUGGING PURPOSES ONLY ----------------- @@ -531,8 +533,9 @@ // iterates the waiting queue and for each gridlet, put the ranges // used back in the profile. That is, updates the entries - if(jobOrderHeuristic_ != null) + if(jobOrderHeuristic_ != null) { Collections.sort(queuedGridlets_, jobOrderHeuristic_); + } Iterator<SSGridlet> iterQueue = queuedGridlets_.iterator(); while(iterQueue.hasNext()) { @@ -763,11 +766,13 @@ } lastScheduleUpdate_ = currentTime; } - else + else { processOtherEvent(ev); + } } - else + else { processOtherEvent(ev); + } } /** @@ -905,8 +910,9 @@ PERangeList intersectList = resource_.getFreePERanges(); // if time is unknown, then make the current time the start time - if(startTime < 0) + if(startTime < 0) { startTime = GridSim.clock(); + } // the gridlet's expected finish time double finishTime = startTime + duration; @@ -928,8 +934,9 @@ if(entryTime < finishTime) { PERangeList listEntry = entry.getPERanges(); intersectList = PERangeList.intersection(listEntry, intersectList); - if(intersectList == null || intersectList.getNumPE() < reqPE) + if(intersectList == null || intersectList.getNumPE() < reqPE) { break; + } } tailEntry = entry; } @@ -1111,8 +1118,9 @@ } } - if(intersectList == null || intersectList.getNumPE() < reqPE) + if(intersectList == null || intersectList.getNumPE() < reqPE) { return null; + } anchorIndex = availProfile_.indexOf(anchorEntry); tailIndex = availProfile_.indexOf(tailEntry); Modified: branches/gridsim4.0-branch3/source/gridsim/turbo/EBMultiplePartitions.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/turbo/EBMultiplePartitions.java 2008-10-12 10:59:53 UTC (rev 258) +++ branches/gridsim4.0-branch3/source/gridsim/turbo/EBMultiplePartitions.java 2008-11-16 10:42:53 UTC (rev 259) @@ -7,6 +7,12 @@ package gridsim.turbo; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Comparator; +import java.util.Iterator; + import eduni.simjava.Sim_event; import eduni.simjava.Sim_system; import gridsim.GridSim; @@ -15,12 +21,6 @@ import gridsim.ParameterException; import gridsim.gui.AllocationAction; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; - /** * This class implements a non-FCFS policy to schedule parallel jobs. The * policy is based on aggressive (EASY) backfilling. This policy can use @@ -211,8 +211,9 @@ * <tt>false</tt> otherwise. */ public boolean setJobOrderingHeuristic(Comparator<SSGridlet> comparator) { - if(comparator == null) + if(comparator == null) { return false; + } jobOrderHeuristic_ = comparator; return true; @@ -258,8 +259,9 @@ * <tt>false</tt> otherwise. */ public boolean setPrioritySelector(PrioritySelector selector) { - if(selector == null || Sim_system.running()) + if(selector == null || Sim_system.running()) { return false; + } prioritySelector_ = selector; return true; @@ -310,17 +312,25 @@ } // divides the PEs and assigns them to the partitions else { - int allocPE = 0; PERangeList freeRanges = resource_.getFreePERanges().clone(); - for(QueuePartition partition : profile_.getPartitions()) { - allocPE += partition.getInitialNumPEs(); + Iterator<QueuePartition> it = profile_.getPartitions().iterator(); + while (it.hasNext()) { + ... [truncated message content] |
From: <sul...@us...> - 2008-10-12 11:23:08
|
Revision: 257 http://gridsim.svn.sourceforge.net/gridsim/?rev=257&view=rev Author: sulistio Date: 2008-10-12 10:58:04 +0000 (Sun, 12 Oct 2008) Log Message: ----------- minor changes to the constructor Modified Paths: -------------- trunk/source/gridsim/ResourceCalendar.java Modified: trunk/source/gridsim/ResourceCalendar.java =================================================================== --- trunk/source/gridsim/ResourceCalendar.java 2008-10-12 06:38:06 UTC (rev 256) +++ trunk/source/gridsim/ResourceCalendar.java 2008-10-12 10:58:04 UTC (rev 257) @@ -36,11 +36,11 @@ // LinkedList weekend is a list of 0 = Sunday, 1 = Monday, 2 = Tuesday, // 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday /** - * Allocates a new ResourceCalendar object + * Allocates a new ResourceCalendar object with a default daily regular load. * @param timeZone time zone * @param peakLoad the load during peak time, with range: [0 ... 1] * @param offPeakLoad the load during off peak time, with range: [0 ... 1] - * @param relativeHolidayLoad the load during holidays, + * @param relativeHolidayLoad the load during holidays, * with range: [0 ... 1] * @param weekendList a list of Integer numbers for weekends * @param holidayList a list of Integer numbers for holidays @@ -53,9 +53,70 @@ double offPeakLoad, double relativeHolidayLoad, LinkedList weekendList, LinkedList holidayList, long seed) { - random_ = new Random(seed); + // initialised as per common observation of relative local + // usage behavior of resource per hour in a day + // NOTE: This is similar to background load of a resource + double[] regularLoad = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, // 0 - 6 am + 0.0, 0.1, 0.2, 0.4, 0.8, 1.0, // 7 - 11 am + 1.0, 0.6, 0.6, 0.9, 1.0, 1.0, // 12 - 5 pm + 0.5, 0.2, 0.1, 0.0, 0.0, 0.0 }; // 6 - 11.59pm + this.timeZone_ = timeZone; + init(regularLoad, peakLoad, offPeakLoad, relativeHolidayLoad, weekendList, + holidayList, seed); + } + + /** + * Allocates a new ResourceCalendar object with a pre-defined daily regular load + * @param regularLoad the daily regular load, with range: [0 ... 1]. + * Note that regularLoad[0] represents time 00:00 (hh:mm), + * and regularLoad[23] represents time 23:00. + * @param timeZone time zone + * @param peakLoad the load during peak time, with range: [0 ... 1] + * @param offPeakLoad the load during off peak time, with range: [0 ... 1] + * @param relativeHolidayLoad the load during holidays, + * with range: [0 ... 1] + * @param weekendList a list of Integer numbers for weekends + * @param holidayList a list of Integer numbers for holidays + * @param seed the initial seed + * @pre timeZone >= 0.0 + * @pre seed > 0 + * @post $none + */ + public ResourceCalendar(double[] regularLoad, double timeZone, double peakLoad, + double offPeakLoad, double relativeHolidayLoad, + LinkedList weekendList, LinkedList holidayList, long seed) + { + this.timeZone_ = timeZone; + init(regularLoad, peakLoad, offPeakLoad, relativeHolidayLoad, weekendList, + holidayList, seed); + } + + /** + * Allocates a new ResourceCalendar object with a pre-defined daily regular load + * @param regularLoad the daily regular load, with range: [0 ... 1]. + * Note that regularLoad[0] represents time 00:00, and + * regularLoad[23] represents time 23:00. + * @param peakLoad the load during peak time, with range: [0 ... 1] + * @param offPeakLoad the load during off peak time, with range: [0 ... 1] + * @param relativeHolidayLoad the load during holidays, + * with range: [0 ... 1] + * @param weekendList a list of Integer numbers for weekends + * @param holidayList a list of Integer numbers for holidays + * @param seed the initial seed + * @pre timeZone >= 0.0 + * @pre seed > 0 + * @post $none + */ + private void init(double[] regularLoad, double peakLoad, + double offPeakLoad, double relativeHolidayLoad, + LinkedList weekendList, LinkedList holidayList, long seed) + { + this.weekendList_ = weekendList; + this.holidayList_ = holidayList; + random_ = new Random(seed); + // load must be within [0 .. 1] range int FULL = 1; if (peakLoad > FULL) { @@ -70,23 +131,17 @@ relativeHolidayLoad = FULL; } - // initialised as per common observation of relative local - // usage behavior of resource per hour in a day - // NOTE: This is similar to background load of a resource - double[] regularLoad = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, // 0 - 6 am - 0.0, 0.1, 0.2, 0.4, 0.8, 1.0, // 7 - 11 am - 1.0, 0.6, 0.6, 0.9, 1.0, 1.0, // 12 - 5 pm - 0.5, 0.2, 0.1, 0.0, 0.0, 0.0 }; // 6 - 11.59pm - + ///////////////// double val = 0.0; double FACTOR = 0.1; + int SIZE = regularLoad.length; int HOUR = 24; weekdayLoad_ = new double[HOUR]; // background load during weekdays holidayLoad_ = new double[HOUR]; // background load during holidays // for each hour in a day, determine the load during the weekday and // holiday - for (int i = 0; i < HOUR; i++) + for (int i = 0; i < regularLoad.length; i++) { val = regularLoad[i] * (peakLoad - offPeakLoad) + offPeakLoad; @@ -95,10 +150,10 @@ random_.nextDouble() ); // background load during the holiday - holidayLoad_[i] = GridSimRandom.real( relativeHolidayLoad * val, + holidayLoad_[i] = GridSimRandom.real( relativeHolidayLoad * val, FACTOR, FACTOR, random_.nextDouble() ); - // if the load is full, it means that a resource can't process + // if the load is full, it means that a resource can't process // any jobs. Hence, need to lower the load if (weekdayLoad_[i] >= FULL) { weekdayLoad_[i] = 0.95; @@ -109,8 +164,19 @@ } } - this.weekendList_ = weekendList; - this.holidayList_ = holidayList; + if (regularLoad.length < HOUR) + { + System.out.println("ResourceCalendar(): Warning regularLoad[] must" + + " be for 24 hours.\nThe loads in the remaining hours will set to zeros."); + + // then set remaining loads to zero + for (int i = regularLoad.length; i < HOUR; i++) + { + weekdayLoad_[i] = 0; + holidayLoad_[i] = 0; + + } + } // end if } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sul...@us...> - 2008-10-12 11:22:33
|
Revision: 258 http://gridsim.svn.sourceforge.net/gridsim/?rev=258&view=rev Author: sulistio Date: 2008-10-12 10:59:53 +0000 (Sun, 12 Oct 2008) Log Message: ----------- minor changes with regards to documentation or javadoc Modified Paths: -------------- trunk/README.txt trunk/build.xml trunk/examples/Network/README.txt trunk/javadoc.sh trunk/source/gridsim/net/flow/FlowInput.java Added Paths: ----------- trunk/source/gridsim/net/flow/package.html Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2008-10-12 10:58:04 UTC (rev 257) +++ trunk/README.txt 2008-10-12 10:59:53 UTC (rev 258) @@ -29,9 +29,9 @@ http://www.gridbus.org/gridsim/release.html -Software Requirements : Java version 1.4.2 or newer +Software Requirements : Java version 1.50 or newer --------------------- -GridSim has been tested and ran on Sun's Java version 1.4.2 or newer. +GridSim has been tested and ran on Sun's Java version 1.5.0 or newer. Older versions of Java are not compatible. If you have non-Sun Java version, such as gcj or J++, they may not be compatible. You also need to install Ant to compile GridSim (explained in more details later). @@ -117,10 +117,20 @@ GridSim mailing lists can be found below: http://sourceforge.net/projects/gridsim/ then click on the "Mailing Lists" tab. + Please subscribe to the following mailing lists: -gridsim-users (at) lists.sourceforge.net - for any queries and feedbacks -gridsim-developers (at) lists.sourceforge.net - for contributing to GridSim +* For general queries and feedbacks: + gridsim-users (at) lists.sourceforge.net + +* For contributing to GridSim or questions related to the existing GridSim code: + gridsim-developers (at) lists.sourceforge.net + +To subscribe, go to + https://lists.sourceforge.net/lists/listinfo/gridsim-users + https://lists.sourceforge.net/lists/listinfo/gridsim-developers + + Contributors are always needed to improve and maintain GridSim. Another option is to integrate your work/project into future GridSim releases. If you want to contribute, advertise yourself to us. @@ -140,6 +150,7 @@ we analyze your problem. Hence, the sooner we can reply. * Please send your questions to these mailing lists so that other people can read and reply them. +* Please only send to one of the mailing lists. * We have hectic schedules, so do not expect an instant reply. Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-10-12 10:58:04 UTC (rev 257) +++ trunk/build.xml 2008-10-12 10:59:53 UTC (rev 258) @@ -26,14 +26,14 @@ </description> <!-- GridSim version number and release year for javadoc --> - <property name="version" value="4.2"/> + <property name="version" value="4.2 beta"/> <property name="year" value="2008"/> <!-- location to store Java classes --> <property name="class.dir" location="./classes" /> <!-- location to store GridSim source files --> - <property name="src.dir" location="./source/gridsim" /> + <property name="src.dir" location="./source" /> <!-- location to store jar files --> <property name="jar.dir" location="./jars" /> @@ -85,7 +85,7 @@ <tag name="invariant" scope="all" description="Invariant:"/> <tag name="pre" scope="all" description="Pre Condition:"/> <tag name="post" scope="all" description="Post Condition:"/> - <fileset dir="./source" includes="**/*.java" /> + <fileset dir="${src.dir}" includes="**/*.java" /> </javadoc> </target> Modified: trunk/examples/Network/README.txt =================================================================== --- trunk/examples/Network/README.txt 2008-10-12 10:58:04 UTC (rev 257) +++ trunk/examples/Network/README.txt 2008-10-12 10:59:53 UTC (rev 258) @@ -1,6 +1,10 @@ This directory contains few GridSim network extension examples. Here are the summary of what each example does: +./FiniteBuffer01 : shows how to use the finite network buffer functionality + +./Flow : shows how to use the flow network functionality + ./NetEx01 : shows how to connect two GridSim entities using a link. ./NetEx02 : shows how to build a network topology for users and Modified: trunk/javadoc.sh =================================================================== --- trunk/javadoc.sh 2008-10-12 10:58:04 UTC (rev 257) +++ trunk/javadoc.sh 2008-10-12 10:59:53 UTC (rev 258) @@ -2,7 +2,7 @@ ## A script to run javadoc (Anthony Sept 2004). year="2008" # year -ver="v4.2" # version number +ver="v4.2 beta" # version number dir=./source # source directory that contains Java files doc=./doc # output directory Modified: trunk/source/gridsim/net/flow/FlowInput.java =================================================================== --- trunk/source/gridsim/net/flow/FlowInput.java 2008-10-12 10:58:04 UTC (rev 257) +++ trunk/source/gridsim/net/flow/FlowInput.java 2008-10-12 10:59:53 UTC (rev 258) @@ -128,14 +128,14 @@ /** * This is an empty method and only applicable to - * {@link gridsim.net.FlowOutput} class. + * {@link gridsim.net.flow.FlowOutput} class. * @param gen a background traffic generator * @param userName a collection of user entity name (in String object). * @return <tt>false</tt> since this method is not used by this class. * @pre gen != null * @pre userName != null * @post $none - * @see gridsim.net.Output + * @see gridsim.net.flow.FlowOutput */ public boolean setBackgroundTraffic(TrafficGenerator gen, Collection userName) Added: trunk/source/gridsim/net/flow/package.html =================================================================== --- trunk/source/gridsim/net/flow/package.html (rev 0) +++ trunk/source/gridsim/net/flow/package.html 2008-10-12 10:59:53 UTC (rev 258) @@ -0,0 +1,5 @@ +<html> + <body> + Classes that form the network flow extension of <code>GridSim</code>. + </body> +</html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sul...@us...> - 2008-10-12 06:38:07
|
Revision: 256 http://gridsim.svn.sourceforge.net/gridsim/?rev=256&view=rev Author: sulistio Date: 2008-10-12 06:38:06 +0000 (Sun, 12 Oct 2008) Log Message: ----------- minor changes Modified Paths: -------------- trunk/examples/DataGrid/example4/DataGridSim.java trunk/examples/DataGrid/example4/SimUser.java Modified: trunk/examples/DataGrid/example4/DataGridSim.java =================================================================== --- trunk/examples/DataGrid/example4/DataGridSim.java 2008-10-12 06:37:26 UTC (rev 255) +++ trunk/examples/DataGrid/example4/DataGridSim.java 2008-10-12 06:38:06 UTC (rev 256) @@ -45,8 +45,10 @@ // Initialize the GridSim package System.out.println("Initializing GridSim package"); GridSim.init(num_user, calendar, trace_flag, gisFlag); - GridSim.initNetworkType(GridSimTags.NET_FLOW_LEVEL); + // NOTE: uncomment this if you want to use the new Flow extension + //GridSim.initNetworkType(GridSimTags.NET_FLOW_LEVEL); + // set the GIS into DataGIS that handles specifically for data grid // scenarios DataGIS gis = new DataGIS(); @@ -60,14 +62,19 @@ //read available files LinkedList files = FilesReader.read(ParameterReader.filesFilename); + //------------------------------------------- //read topology - //LinkedList routerList = NetworkReader.createFIFO(ParameterReader.networkFilename); - LinkedList routerList = NetworkReader.createFlow(ParameterReader.networkFilename); + LinkedList routerList = NetworkReader.createFIFO(ParameterReader.networkFilename); //attach central RC entity to one of the routers //Create a central RC - //Link l = new SimpleLink("rc_link", baud_rate, propDelay, mtu); - Link l = new FlowLink("rc_link", baud_rate, propDelay, mtu); + Link l = new SimpleLink("rc_link", baud_rate, propDelay, mtu); + + // NOTE: uncomment this if you want to use the new Flow extension + //LinkedList routerList = NetworkReader.createFlow(ParameterReader.networkFilename); + //Link l = new FlowLink("rc_link", baud_rate, propDelay, mtu); + //------------------------------------------- + TopRegionalRC rc = new TopRegionalRC(l); //connect the TopRC to a router specified in the parameters file Modified: trunk/examples/DataGrid/example4/SimUser.java =================================================================== --- trunk/examples/DataGrid/example4/SimUser.java 2008-10-12 06:37:26 UTC (rev 255) +++ trunk/examples/DataGrid/example4/SimUser.java 2008-10-12 06:38:06 UTC (rev 256) @@ -23,11 +23,13 @@ private ArrayList tasks; // constructor - SimUser(String name, double baud_rate, double delay, int MTU) - throws Exception { - //super(name, new SimpleLink(name + "_link", baud_rate, delay, MTU)); - super(name, new FlowLink(name + "_link", baud_rate, delay, MTU)); + SimUser(String name, double baud_rate, double delay, int MTU) throws Exception { + super(name, new SimpleLink(name + "_link", baud_rate, delay, MTU)); + + // NOTE: uncomment this if you want to use the new Flow extension + //super(name, new FlowLink(name + "_link", baud_rate, delay, MTU)); + this.name_ = name; this.tasks = new ArrayList(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sul...@us...> - 2008-10-12 06:37:35
|
Revision: 255 http://gridsim.svn.sourceforge.net/gridsim/?rev=255&view=rev Author: sulistio Date: 2008-10-12 06:37:26 +0000 (Sun, 12 Oct 2008) Log Message: ----------- add Finite Buffer and Flow examples, done by Agustin and James respectively Added Paths: ----------- trunk/examples/Network/FiniteBuffer01/ trunk/examples/Network/FiniteBuffer01/FnbUser.java trunk/examples/Network/FiniteBuffer01/GridletSubmission.java trunk/examples/Network/FiniteBuffer01/README.txt trunk/examples/Network/FiniteBuffer01/mainExample.java trunk/examples/Network/FiniteBuffer01/network_example.txt trunk/examples/Network/Flow/ trunk/examples/Network/Flow/Example01/ trunk/examples/Network/Flow/Example01/FlowNetEx01.java trunk/examples/Network/Flow/Example01/FlowNetUser.java trunk/examples/Network/Flow/Example01/FlowTest.java trunk/examples/Network/Flow/Example01/README.txt trunk/examples/Network/Flow/Example01/output.txt trunk/examples/Network/Flow/Example01/test1.csv trunk/examples/Network/Flow/Example01/test2.csv trunk/examples/Network/Flow/Example02/ trunk/examples/Network/Flow/Example02/FlowNetEx02.java trunk/examples/Network/Flow/Example02/FlowNetUser.java trunk/examples/Network/Flow/Example02/README.txt trunk/examples/Network/Flow/Example02/User_0.csv trunk/examples/Network/Flow/Example02/User_1.csv trunk/examples/Network/Flow/Example02/output.txt trunk/examples/Network/Flow/Example02/router1_report.csv trunk/examples/Network/Flow/Example02/router2_report.csv Added: trunk/examples/Network/FiniteBuffer01/FnbUser.java =================================================================== --- trunk/examples/Network/FiniteBuffer01/FnbUser.java (rev 0) +++ trunk/examples/Network/FiniteBuffer01/FnbUser.java 2008-10-12 06:37:26 UTC (rev 255) @@ -0,0 +1,817 @@ +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Authors: Agustin Caminero and Anthony Sulistio + * Organization: Universidad de Castilla La Mancha (UCLM), Spain. + * Copyright (c) 2008, The University of Melbourne, Australia and + * Universidad de Castilla La Mancha (UCLM), Spain + */ + + +import gridsim.*; +import gridsim.net.Link; +import java.util.Random; +import java.util.ArrayList; +import java.io.*; +import eduni.simjava.Sim_system; +import eduni.simjava.Sim_event; +import gridsim.net.fnb.*; + + +/** + * An example of how to use the new functionality on finite buffers. + * The functionality of this class, implemented in the body() method, is as follows. + * 1. create n number of gridlets and a new csv file for statistics purposes + * 2. send a reminder to itself to send the gridlets + * 3. after receving a reminder at a later time, proceeds to + * the processGridletSubmission() method, where + * - it submits all gridlets in the list to a particular resource + * - it sets the gridlet submission time and status + * + * 4. after submitting all gridlets, then wait for incoming events + * - if a new event is regarding to receiving a Gridlet + * + remove this gridlet from the submission list + * + sets the gridlet latency time and status + * + * - if a new event is regarding to a gridlet being dropped in the network + * + remove this gridlet from the submission list + * + sets the gridlet latency time and status + * + marks this gridlet as being dropped by the router + * + * 5. after all gridlets have been received, then exit the body() method and + * prints the statistics into a csv file. + * + * @author Agustin Caminero and Anthony Sulistio + */ +public class FnbUser extends GridUser +{ + // list of submitted Gridlets (array of GridletSubmission) + private ArrayList GridletSubmittedList_; + + // counts how many gridlets have already comeback after being successfully + // executed + private int receivedGridletCounter; + private int ToS_; // type of service for differentiated network QoS + private int NUM_GRIDLETS; + + // for a user whose name is "User_0", its myID_ will be 0, and so on. + // this ID is set at the beginning or when you create an object of this class + private int myID_; + + // The sizes of gridlets + private long gridletLength; // denotes computational time + private long gridletInput; // denotes input file size for each gridlet + private long gridletOutput; // denotes output file size for each gridlet + + // we store the time when each gridlet is submitted + private double gridletSubmissionTime[]; + + // we store the most recent status of each gridlet during execution + private String gridletStatus[]; + + // we store the total execution time, i.e. + // time of receiving - time of submission + double gridletLatencyTime[]; + + // a counter to keep the number of gridlets which are failed because of + // dropped packets + int droppedGridletsCounter; + + // a list of the failed gridlets (those which failed because of + // dropped packets) + boolean droppedGridletsArray[]; + + double init_time; // the time when this user will start submitting gridlets + int resID; // the id of the resource to which this user will send his gl + + + + /** + * Creates a FnbUser object + * @param name this entity name + * @param link a network link connecting this entity + * @param myID a user ID + * @param glLength length (MI) for the gridlets of this user + * @param glIn input file size for the gridlets of this user + * @param glOut output file size for the gridlets of this user + * @param init_time the time when this user will start submitting gridlets + * @param resID resource ID for sending the user's Gridlets + * @throws java.lang.Exception happens if either name or link is empty + * @pre name != null + * @pre link != null + * @post $none + */ + public FnbUser(String name, Link link, int myID, long glLength, long glIn, + long glOut, double init_time, int resID) throws Exception + { + super(name, link); + + this.GridletSubmittedList_ = new ArrayList(); + receivedGridletCounter = 0; + droppedGridletsCounter = 0; + ToS_ = 0; + this.myID_ = myID; + + gridletLength = glLength; + gridletInput = glIn; + gridletOutput = glOut; + + this.init_time = init_time; + this.resID = resID; + } + + + /** + * Creates a FnbUser object + * @param name this entity name + * @param link a network link connecting this entity + * @param regionalGIS a regional GridInformationService (GIS) entity name + * @param myID a user ID + * @throws java.lang.Exception happens if one of the inputs is empty + * @pre name != null + * @pre link != null + * @pre regionalGIS != null + * @post $none + */ + public FnbUser(String name, Link link, String regionalGIS, int myID) + throws Exception + { + super(name, link, regionalGIS); + + this.GridletSubmittedList_ = new ArrayList(); + receivedGridletCounter = 0; + droppedGridletsCounter = 0; + ToS_ = 0; + this.myID_ = myID; + + gridletLength = 0; + gridletInput = 0; + gridletOutput = 0; + + this.init_time = 0; + this.resID = 0; + } + + + /** + * Sets the number of gridlets for submission. + * Also, creates 2 arrays for storing submission and receiving time of + * each Gridlet + * @param gridlet_num number of gridlets + */ + public void setGridletNumber(int gridlet_num) + { + NUM_GRIDLETS = gridlet_num; + gridletSubmissionTime = new double[NUM_GRIDLETS]; + gridletLatencyTime = new double[NUM_GRIDLETS]; + gridletStatus = new String[NUM_GRIDLETS]; + + // initialise whether each Gridlet has been dropped in the network or not + droppedGridletsArray = new boolean[NUM_GRIDLETS]; + for (int i = 0; i < NUM_GRIDLETS; i++) + { + droppedGridletsArray[i] = false; // hasn't been dropped in the network + gridletStatus[i] = "Created"; + } + } + + + /** + * Sets the Type of Service (ToS) that this packet receives in the network + * @param ToS Type of Service + */ + public void setNetServiceLevel(int ToS) { + this.ToS_ = ToS; + } + + + /** + * Handles incoming requests to this entity. + * @pre $none + * @post $none + */ + public void body() + { + initializeResultsFile(); // create new files for statistics + createGridlet(NUM_GRIDLETS); // create gridlets + + // send a reminder to itself at time init_time, with a message to + // submit Gridlets. + super.send(super.get_id(), GridSimTags.SCHEDULE_NOW + init_time * 10, + GridSimTags.GRIDLET_SUBMIT); + + /***** + // Uncomment this if you want more info on the progress of the sims + System.out.println(super.get_name() + + ": initial SUBMIT_GRIDLET event will be at clock: " + + init_time + ". Current clock: " + GridSim.clock()); + ******/ + + + // a loop that keeps waiting for incoming events + while (Sim_system.running()) + { + Sim_event ev = new Sim_event(); + super.sim_get_next(ev); // get the next event in the incoming queue + + // exit the loop if we get a signal of end of simulation + if (ev.get_tag() == GridSimTags.END_OF_SIMULATION) + { + System.out.println("============== " + super.get_name() + + ". Ending simulation..."); + break; + } + + // for other events or activities + switch (ev.get_tag()) + { + // submit a gridlet + case GridSimTags.GRIDLET_SUBMIT: //SUBMIT_GRIDLET: + /*** + // Uncomment this if you want more info on the progress + System.out.println(super.get_name() + + ": received an SUBMIT_GRIDLET event. Clock: " + GridSim.clock()); + ****/ + processGridletSubmission(ev); // process the received event + break; + + // Receive a gridlet back from the resource + case GridSimTags.GRIDLET_RETURN: + /***** + // Uncomment this if you want more info on the progress + System.out.println(super.get_name() + + ": received an GRIDLET_RETURN event. Clock: " + GridSim.clock()); + ****/ + processGridletReturn(ev); + break; + + // A gridlet has failed because a packet was dropped + case GridSimTags.FNB_GRIDLET_FAILED_BECAUSE_PACKET_DROPPED: + processGridletPacketDropping(ev); + break; + + default: + System.out.println(super.get_name() + + ": Received an unknown event: " + ev.get_tag()); + break; + + } // switch (ev.get_tag()) + + ev = null; + + }// while (Sim_system.running()) + + // remove I/O entities created during construction of this entity + super.terminateIOEntities(); + + // print the statistics regarding to this experiment + printStatistics(); + + }// body() + + + /** + * This functions process the fail of a gridlet. The failure has happened + * because a packet was dropped. + * @param ev an incoming event + */ + private void processGridletPacketDropping(Sim_event ev) + { + FnbMessageDropGridlet msgDropGl = (FnbMessageDropGridlet) ev.get_data(); + int glID = msgDropGl.getEntityID(); + double clock = GridSim.clock(); + + if (droppedGridletsArray[glID] == false) + { + System.out.println("<<< " + super.get_name() + + ": Receiving GRIDLET_FAILED_BECAUSE_PACKET_DROPPED at time = " + + clock + ". Gridlet # " + glID); + + // Commented. Write to a single file instead of a different one + //write(super.get_name() + ", " + glID + ", GRIDLET_DROPPED, " + clock + "\n", + // super.get_name() + "_DroppedGridlets.csv"); + + // find out the total execution time, from the submission time + gridletLatencyTime[glID] = GridSim.clock() - gridletSubmissionTime[glID]; + + // get the latest status of a gridlet + gridletStatus[glID] = "Dropped by router"; + + // set the status of this gridlet ID + droppedGridletsArray[glID] = true; // we have a dropped Gridlet + droppedGridletsCounter++; // increment the counter + + // remove this gridlet from the submission list + // we don't re-send this gridlet + removeGridletFromGridletSubmittedList(glID); + + // In this case, the user has finished his work, as all the gridlets + // are back or failed. So, finish the simulation. + if (receivedGridletCounter + droppedGridletsCounter == NUM_GRIDLETS) + { + super.finishSimulation(); + //System.out.println("**** " + super.get_name() + ": FINISHED!!"); + } + + System.out.println("<<< " + super.get_name() + + ": Finished processing GRIDLET_FAILED_BECAUSE_PACKET_DROPPED\nfor Gridlet # " + + glID + ". Received: " + receivedGridletCounter + + ". Dropped: " + droppedGridletsCounter + + ". NUM_GRIDLETS: " + NUM_GRIDLETS); + + } //if (droppedGridletsArray[glID] == false) + + ev = null; + } + + + /** + * This function remove a gridlet from the submission list. + * @param glID the id of the gridlet to be removed + */ + private void removeGridletFromGridletSubmittedList(int glID) + { + int i = 0; + while (i < GridletSubmittedList_.size()) + { + GridletSubmission obj = (GridletSubmission) GridletSubmittedList_.get(i); + int id = obj.getGridletID(); + + // if found the maching Gridlet + if (glID == id) + { + GridletSubmittedList_.remove(i); + break; + } + + i++; + } + } + + + /** + * This method submits all the gridlets that have not been submitted before + * @param ev an incoming event + */ + private void processGridletSubmission(Sim_event ev) + { + int i = 0; + GridletSubmission gridletSub; + Gridlet gl; + + while (i < GridletSubmittedList_.size()) + { + gridletSub = (GridletSubmission) GridletSubmittedList_.get(i); + + // Submit the gridlets have not been submitted before + if (gridletSub.getSubmitted() == false) + { + // we have to resubmit this gridlet + gl = gridletSub.getGridlet(); + + System.out.println(">>> " + super.get_name() + + ". Sending Gridlet #" + i + " to " + + GridSim.getEntityName(resID) + " at clock: " + GridSim.clock()); + + // set the submission time + gridletSubmissionTime[gl.getGridletID()] = GridSim.clock(); + gridletStatus[gl.getGridletID()] = "Submitted"; + + // send the gridlet to a particular resource + super.gridletSubmit(gl, resID, 0, false, ToS_); + + gridletSub.setSubmitted(true); // set this gridlet as submitted + + // Write into a file + write(super.get_name(), "Sending", gl.getGridletID(), + GridSim.getEntityName(resID), gl.getGridletStatusString(), + GridSim.clock()); + + } // if (gridletSub.getSubmitted() == false) + + i++; + + } // while (i < GridletSubmittedList_.size()) + + }// processGridletSubmission + + + /** + * This functions process the return of a gridlet. We pay attention to + * the status of the gridlet and then decide what we have to do the next + * @param ev an incoming event + */ + public void processGridletReturn(Sim_event ev) + { + Object obj = (Object) ev.get_data(); + Gridlet gl = null; + + int glID; + + if (obj instanceof Gridlet) + { + gl = (Gridlet) obj; + + glID = gl.getGridletID(); + System.out.println("<<< " + super.get_name() + + ": Receiving Gridlet #" + glID + " with status " + + gl.getGridletStatusString() + " at time = " + GridSim.clock() + + " from " + GridSim.getEntityName(gl.getResourceID()) ); + + // Write into a file + write(super.get_name(), "Receiving", glID, + GridSim.getEntityName(gl.getResourceID()), + gl.getGridletStatusString(), GridSim.clock()); + + receivedGridletCounter++; + + // find out the total execution time, from the submission time + gridletLatencyTime[glID] = GridSim.clock() - + gridletSubmissionTime[glID]; + + // get the latest status of a gridlet + gridletStatus[glID] = gl.getGridletStatusString(); + + // remove the gridlet + removeGridletFromGridletSubmittedList(glID); + gl = null; + + // We have received all the gridlets. So, finish the simulation. + if ((receivedGridletCounter == NUM_GRIDLETS) || + (receivedGridletCounter + droppedGridletsCounter == NUM_GRIDLETS)) + { + super.finishSimulation(); + //System.out.println("**** " + super.get_name() + ": FINISHED!!"); + } + + + System.out.println("<<< " + super.get_name() + + ": Finished processing the return of Gridlet # " + + glID + "\nReceived: " + receivedGridletCounter + + ". Dropped: " + droppedGridletsCounter + + ". NUM_GRIDLETS: " + NUM_GRIDLETS); + + + } // if (obj instanceof Gridlet) + } + + + private void printStatistics() + { + String name = super.get_name(); + String filename = name + ".csv"; + StringBuffer str = new StringBuffer(1000); // store 1000 chars + + // print the heading name first + str.append("\n\ngridletID, status, time, latency time (time - submit time)\n"); + for (int i = 0; i < gridletStatus.length; i++) + { + double time = gridletLatencyTime[i] + gridletSubmissionTime[i]; + str.append(i); // gridlet ID + str.append(", "); + str.append(gridletStatus[i]); + str.append(", "); // gridlet status + str.append(time); + str.append(", "); + str.append(gridletLatencyTime[i]); + str.append("\n"); + } + + this.write(str.toString(), filename); + } + + + /** + * Prints the Gridlet objects + * @param list the list of gridlets + * @param name the name of the user + * @param detail if we want the gridlet's history or not + * @param gridletLatencyTime array containing the latencies of gridlets. + * Latencies are from the moment when the gridlet is sent, till + * the moment they are back at the user. They take into account the last submission of a gridlet + * (when the gridlet is successfully run) + */ + private void printGridletList(GridletList list, String name, + boolean detail, double gridletLatencyTime[]) + { + int size = list.size(); + Gridlet gridlet = null; + + String indent = " "; + System.out.println(); + System.out.println("============= OUTPUT for " + name + " =========="); + System.out.println("Gridlet ID" + indent + "STATUS" + indent + + "Resource ID" + indent + "Cost" + indent + + "CPU Time"+ indent + "Latency"); + + // a loop to print the overall result + int i = 0; + for (i = 0; i < size; i++) + { + gridlet = (Gridlet) list.get(i); + + System.out.print(indent + gridlet.getGridletID() + indent + indent); + System.out.print(gridlet.getGridletStatusString()); + System.out.println(indent + indent + gridlet.getResourceID() + + indent + indent + gridlet.getProcessingCost() + + indent + indent + gridlet.getActualCPUTime()+ indent + indent + + gridletLatencyTime[gridlet.getGridletID()]); + + writeFin(name, gridlet.getGridletID(), + GridSim.getEntityName(gridlet.getResourceID()), + gridlet.getProcessingCost(), gridlet.getActualCPUTime(), + GridSim.clock()); + } + + + if (detail == true) + { + // a loop to print each Gridlet's history + for (i = 0; i < size; i++) + { + gridlet = (Gridlet) list.get(i); + System.out.println(gridlet.getGridletHistory()); + + System.out.print("Gridlet #" + gridlet.getGridletID()); + System.out.println(", length = " + gridlet.getGridletLength() + + ", finished so far = " + gridlet.getGridletFinishedSoFar()); + System.out.println("======================================\n"); + } + } + + System.out.println("================================================="); + } + + + /** + * This method will show you how to create Gridlets + * @param userID owner ID of a Gridlet + * @param numGridlet number of Gridlet to be created + */ + private void createGridlet(int userID, int numGridlet) + { + for (int i = 0; i < numGridlet; i++) + { + // Creates a Gridlet + Gridlet gl = new Gridlet(i, gridletLength, gridletInput, gridletOutput); + gl.setUserID(userID); + + GridletSubmission gst = new GridletSubmission(gl, false); + + // add this gridlet into a list + this.GridletSubmittedList_.add(gst); + } + } + + + /** + * Tells you the possition of this gridlet in the GridletSubmittedList_ + * @param gl the gridlet + * @return the position of this gridlet in the list of submitted gridlets + */ + private int findGridletInGridletSubmittedList(Gridlet gl) + { + Gridlet g = null; + GridletSubmission gst = null; + for (int i = 0; i< GridletSubmittedList_.size(); i++) + { + gst = (GridletSubmission)GridletSubmittedList_.get(i); + if ( gst.getGridletID() == gl.getGridletID() ) + { + return i; + } + } + + return -1; + } + + + /** + * This method will show you how to create Gridlets + * @param numGridlet number of Gridlet to be created + */ + private void createGridlet(int numGridlet) + { + long data; + int MI = 0; + double percent = 0.30; // 30 % + Random r = new Random(); + + // running approx. 20 mins on CERN node of 70k MIPS +/- 30% + double min_size = gridletLength - (gridletLength * percent); + double max_size = gridletLength + (gridletLength * percent); + int range = 1 + (int) (max_size - min_size); // round up + + // for input and output file transfer + double data_min = gridletInput - (gridletInput * percent); + double data_max = gridletInput + (gridletInput * percent); + int data_range = 1 + (int) (data_max - data_min); // round up + + for (int i = 0; i < numGridlet; i++) + { + MI = (int) min_size + r.nextInt(range); + data = (long) data_min + r.nextInt(data_range); + + // Creates a Gridlet + Gridlet gl = new Gridlet(i, MI, data, data); + gl.setUserID( super.get_id() ); + gl.setNetServiceLevel(ToS_); + + GridletSubmission gst = new GridletSubmission(gl, false); + + // add this gridlet into a list + this.GridletSubmittedList_.add(gst); + } + } + + + /** + * Write some data into the final results file. + * @param user user name + * @param glID gridlet id + * @param resName Name of the resource + * @param cost the processing cost of the gridlet + * @param cpu the cpu time + * @param clock Current time + */ + private void writeFin(String user, int glID, String resName, + double cost, double cpu, double clock) + { + // Write into a results file + FileWriter fwriter = null; + try + { + fwriter = new FileWriter(user + "_Fin.csv", true); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while opening file " + user + "_Fin.csv"); + } + + try + { + fwriter.write(user + ", "+ glID + ", " + + resName + ", " + cost + ", "+ cpu + ", " + + clock + "\n"); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while writing on file " + user + "_Fin"); + } + + try + { + fwriter.close(); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while closing file " + user + "_Fin"); + } + + } + + /** + * Write some data into a results file. + * @param user user name + * @param event Values: "Sending" or "Receive" a gridlet + * @param glID gridlet id + * @param resName Name of the resource + * @param status Status of the gridlet + * @param clock Current time + */ + private void write(String user, String event, int glID, String resName, + String status, double clock) + { + FileWriter fwriter = null; + try + { + fwriter = new FileWriter(super.get_name() + ".csv", true); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while opening file " + super.get_name()); + } + + try + { + fwriter.write(user + ", " + event + ", " + glID + ", " + + resName + ", " + status + ", " + clock + "\n"); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while writing on file " + super.get_name()); + } + + try + { + fwriter.close(); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while closing file " + super.get_name()); + } + + } + + + /** + * Initialize the results files (put headers over each column) + */ + private void initializeResultsFile() + { + // Initialize the results file + FileWriter fwriter = null; + FileWriter fwriterFin = null; + FileWriter fwriterDropped = null; + + try + { + // overwrite existing file + fwriter = new FileWriter(super.get_name() + ".csv"); + //fwriterFin = new FileWriter(super.get_name() + "_Fin.csv"); + //fwriterDropped = new FileWriter(super.get_name() + "_DroppedGridlets.csv"); + } + catch (Exception ex) + { + ex.printStackTrace(); + System.out.println("Unwanted errors while opening file " + + super.get_name() + " or " + super.get_name() + "_Fin.csv"); + } + + try + { + fwriter.write("User Name, Event, GridletID, Resource, GridletStatus, Time\n"); + //fwriterFin.write( "User, GridletID, Resource, Cost, CPU time, Latency\n"); + //fwriterDropped.write( "User, GridletID, Status, Time\n"); + } + catch (Exception ex) + { + ex.printStackTrace(); + System.out.println("Unwanted errors while writing on file " + + super.get_name() + " or " + super.get_name() + "_Fin.csv or " + + super.get_name() + "_DroppedGridlets.csv"); + } + + try + { + fwriter.close(); + //fwriterFin.close(); + //fwriterDropped.close(); + } + catch (Exception ex) + { + ex.printStackTrace(); + System.out.println("Unwanted errors while closing file " + + super.get_name() + " or " + super.get_name() + "_Fin.csv or " + + super.get_name() + "_DroppedGridlets.csv"); + } + } + + + /** + * Prints out the given message into stdout. + * In addition, writes it into a file. + * @param msg a message + * @param file file where we want to write + */ + private void write(String msg, String file) + { + FileWriter fwriter = null; + try + { + fwriter = new FileWriter(file, true); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println("Unwanted errors while opening file " + file); + } + + try + { + fwriter.write(msg); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println("Unwanted errors while writing on file " + file); + } + + try + { + fwriter.close(); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println("Unwanted errors while closing file " + file); + } + } + +} // end class + Added: trunk/examples/Network/FiniteBuffer01/GridletSubmission.java =================================================================== --- trunk/examples/Network/FiniteBuffer01/GridletSubmission.java (rev 0) +++ trunk/examples/Network/FiniteBuffer01/GridletSubmission.java 2008-10-12 06:37:26 UTC (rev 255) @@ -0,0 +1,80 @@ +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero + * Organization: Universidad de Castilla La Mancha (UCLM), Spain. + * Copyright (c) 2008, The University of Melbourne, Australia and + * Universidad de Castilla La Mancha (UCLM), Spain + */ + + +import gridsim.Gridlet; + + +/** + * This class implements the submission time of each gridlet. + * @author Agustin Caminero + */ +public class GridletSubmission +{ + private Gridlet gl; + + // whether this gridlet has been already submitted or not + private boolean submitted; + + /** + * A constructor + * @param gl a Gridlet object + * @param submitted whether this gridlet has been already submitted or not + */ + public GridletSubmission(Gridlet gl, boolean submitted) + { + this.gl = gl; + this.submitted = submitted; + } + + /** + * Gets a Gridlet object + */ + public Gridlet getGridlet() + { + return gl; + } + + /** + * Gets the gridlet ID + */ + public int getGridletID() + { + return gl.getGridletID(); + } + + /** + * Finds whether this gridlet has been already submitted or not + */ + public boolean getSubmitted() + { + return submitted; + } + + /** + * Sets a Gridlet object + */ + public void setGridlet(Gridlet g) + { + this.gl = g; + } + + /** + * Sets the status of this Gridlet, whether it has been submitted or not + */ + public void setSubmitted(boolean submitted) + { + this.submitted = submitted; + } + +} // end class + Added: trunk/examples/Network/FiniteBuffer01/README.txt =================================================================== --- trunk/examples/Network/FiniteBuffer01/README.txt (rev 0) +++ trunk/examples/Network/FiniteBuffer01/README.txt 2008-10-12 06:37:26 UTC (rev 255) @@ -0,0 +1,81 @@ +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * An example of how to use the failure functionality. + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero and Anthony Sulistio + * Organization: Universidad de Castilla La Mancha (UCLM), Spain. + * Copyright (c) 2008, The University of Melbourne, Australia and + * Universidad de Castilla La Mancha (UCLM), Spain + */ + +Welcome to the example of how to use the finite network buffers functionality +To compile the example source code: + In Unix/Linux: javac -classpath $GRIDSIM/jars/gridsim.jar:. *.java + In Windows: javac -classpath %GRIDSIM%\jars\gridsim.jar;. *.java + +where $GRIDSIM or %GRIDSIM% is the location of the gridsimtoolkit package. + + +To run the class file: +In Unix/Linux: + java -classpath $GRIDSIM/jars/gridsim.jar:. mainExample sched stats + +In Windows: + java -classpath %GRIDSIM%\jars\gridsim.jar;. mainExample sched stats + +where sched = {red, ared, fifo}, and stats = {true, false}. +* sched refers to one of the FNB schedulers. + By default, sched = fifo if no parameter is included in the program. + +* stats refers to recording network statistics. + stats = true means turn on the network statistics. + stats = false means turn off the network statistics. + + +NOTE: This example uses probabilistic distributions and random variables. + Hence, when running this example many times, the values may be different. + +The example may take a long time, even if the statistics collection is off. +To make the experiment shorter, decrease the number of users, the number +of jobs per user, jobs IO files sizes, or increase baud rate of links, +buffer sizes, thresholds of RED/ARED. +This way, less packets will get dropped and experiments will take less time. + + +When running the example file, it will produce the following files: + + sim_trace -> created by the SimJava2 package (lower-level) to trace every + events (performed by SimJava and GridSim) during the simulation. + We don't need to worry about this file. Not to important for our + example. + + sim_report -> created by the SimJava2 package (lower-level) of GridSim. + This is a simulation report that contains general information about + running this experiment. We don't need to worry about this file. + Not to important for our example. + + User_0.csv, User_1.csv, ... -> contain statistics regarding to + gridlets submission, and the status of each gridlet at the end of simulation. + +Next, the below files are only created when the statistics collection is ON +(i.e. stats = true). Keep in mind that experiments will take longer time +if stats are ON. + + Router0_to_Res_0_Buffers.csv, Router0_to_Res_1_Buffers.csv, ... + -> Contains statistics on the progress of buffers parameter + (avg. queue size, ...), in intervals. + + Router0_to_Res_0_DroppedPkts.csv, Router0_to_Res_1_DroppedPkts.csv, ... + -> Contains stats on the amount of droppped pkts, in intervals. + + Router0_to_Res_0_MaxBufferSize.csv, Router0_to_Res_1_MaxBufferSize.csv, ... + -> Contains stats on the maximum buffer size, in intervals + +NOTE: +* When you run the program multiple times, the new statistics + will overwrite the existing csv files. + +* You can open these csv files on Excel or any text editors. Added: trunk/examples/Network/FiniteBuffer01/mainExample.java =================================================================== --- trunk/examples/Network/FiniteBuffer01/mainExample.java (rev 0) +++ trunk/examples/Network/FiniteBuffer01/mainExample.java 2008-10-12 06:37:26 UTC (rev 255) @@ -0,0 +1,455 @@ +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero and Anthony Sulistio + * Organization: Universidad de Castilla La Mancha (UCLM), Spain. + * Copyright (c) 2008, The University of Melbourne, Australia and + * Universidad de Castilla La Mancha (UCLM), Spain + */ + + +import gridsim.net.fnb.*; +import gridsim.*; +import gridsim.net.*; +import java.util.*; +import gridsim.index.RegionalGIS; +import java.io.BufferedReader; +import java.io.FileReader; + + +/** + * A main class that runs this example. + * @author Agustin Caminero and Anthony Sulistio + */ +public class mainExample +{ + /** + * Creates main() to run this example. + * Command-line argument: + * - args[0] = SCHED, for choosing different FNB schedulers. + * SCHED = {red, ared, fifo}. Default SCHED is fifo. + * + * - args[1] = STATS, for choosing whether to turn on the statistics + * on routers or not. + * STATS = {true, false}. Default STATS is false. + * + */ + public static void main(String args[]) + { + System.out.println("Starting finite buffers example ..."); + + try + { + /************ + The network topology is as follows: + + 1Gbps 1Gbps 1Gbps + Users --------- Router1 ----------- Router0 --------- Resource_0 + |------------ RegionalGIS + 1Gbps + ************/ + + // scheduling algorithm for buffers: + // GridSimTags.FNB_RED, GridSimTags.FNB_ARED, or GridSimTags.FNB_FIFO; + int SCHED_ALG = GridSimTags.FNB_FIFO; + String NETWORK_FILE = "network_example.txt"; + + if (args.length >= 1) + { + if (args[0].compareToIgnoreCase("red") == 0) + { + SCHED_ALG = GridSimTags.FNB_RED; + System.out.println("Using a FNB_RED scheduling."); + } + else if (args[0].compareToIgnoreCase("ared") == 0) + { + SCHED_ALG = GridSimTags.FNB_ARED; + System.out.println("Using a FNB_ARED scheduling."); + } + } + else + { + System.out.println("Using a default FNB_FIFO scheduling."); + } + + boolean STORE_STATS = false; // records stats in the router or not + if (args.length >= 2) + { + Boolean boolObj = new Boolean(args[1]); + STORE_STATS = boolObj.booleanValue(); + } + + int NUM_USERS = 2; // num of users + int NUM_GIS = 1; // num of GIS objects + + int GB = 1000000000; // 1 GB in bits + double BW_RES = 1*GB; // baud rate for the link of Resource_0 + double BW_USERS = 1*GB; // baud rate for the link of users + double BW_GIS = 1*GB; // baud rate for the link of RegionalGIS + + int MAX_TH = 15; // max threshold for the RED algorithm + int MIN_TH = 5; // min threshold for the RED algorithm + + // common parameters for all the FNB schedulers + double MAX_P = 0.02; // maximum value for the dropping probability + double QUEUE_WEIGHT = 0.0001; // the queue weight + + // the bigger the buffer size, the lower num of packets being rejected + int MAX_BUF_SIZE = 30; + + int TOTAL_GRIDLET = 5; // gridlets each user has + int GRIDLET_SIZE_BASE = 42000; + long GRIDLET_FILESIZE_BASE_IN = 150000; + long GRIDLET_FILESIZE_BASE_OUT = 150000; + + int totalResource = 2; // total number of resources + int totalMachine = 1; + int totalPE = 4; + int rating; // rating (MIPS) of the PEs of the resources + + + ////////////////////////////////////////// + // First step: Initialize the GridSim package. It should be called + // before creating any entities. We can't run this example without + // initializing GridSim first. We will get run-time exception + // error. + + // a flag that denotes whether to trace GridSim events or not. + boolean trace_flag = false; + Calendar calendar = Calendar.getInstance(); + + // Initialize the GridSim package + GridSim.init(NUM_USERS, calendar, trace_flag); + GridSim.initNetworkType(GridSimTags.NET_BUFFER_PACKET_LEVEL); + + + ////////////////////////////////////////// + // Second step: Builds the network topology among Routers. + + double[] weights = {1, 2}; // for ToS + + System.out.println("Reading network from " + NETWORK_FILE); + LinkedList routerList = FnbNetworkReader.createSCFQ(NETWORK_FILE, + weights, MAX_BUF_SIZE, SCHED_ALG, MIN_TH, MAX_TH, + MAX_P, QUEUE_WEIGHT, STORE_STATS); + + + ////////////////////////////////////////// + // Third step: Creates one or more RegionalGIS entities, + // linked to a router of the topology + + String ROUTER_RES = "Router0"; // router where resources will be conected + String ROUTER_USERS = "Router1"; // router where users will be conected + String ROUTER_GIS = "Router0"; // router where GIS will be connected + + int gisIndex = 0; // a variable to select the primary GIS entity + RegionalGIS gis = null; + + double baud_rate; + double propDelay = 10; // propagation delay in millisecond + int mtu = 1500; // max. transmission unit in byte + + ArrayList gisList = new ArrayList(NUM_GIS); // list of GIS entities + ArrayList resList = new ArrayList(totalResource); // a list of resources + + Router router = null; + int i = 0; // a temp variable for a loop + + for (i = 0; i < NUM_GIS; i++) + { + String gisName = "RegGIS_" + i; // regional GIS name + baud_rate = BW_GIS; + + // a network link attached to this regional GIS entity + Link link = new SimpleLink(gisName + "_link", baud_rate, + propDelay, mtu); + + gis = new RegionalGIS(gisName, link); + gisList.add(gis); // store the regional GIS entity into an array + + router = FnbNetworkReader.getRouter(ROUTER_GIS, routerList); + + System.out.println("=== Created " + gisName + + " (id: " + gis.get_id() + + "), connected to " + router.get_name()); + + linkNetworkSCFQ(router, gis, weights, MAX_BUF_SIZE, SCHED_ALG, + MIN_TH, MAX_TH, MAX_P, QUEUE_WEIGHT, STORE_STATS); + System.out.println(); + } + + + ////////////////////////////////////////// + // Fourth step: Creates one or more GridResource entities, + // linked to a router of the topology + String sched_alg; + for (i = 0; i < totalResource; i++) + { + sched_alg = "SPACE"; + baud_rate = BW_RES; + totalMachine = 10; + rating = 49000; + + router = FnbNetworkReader.getRouter(ROUTER_RES, routerList); + GridResource res = createGridResource("Res_" + i, baud_rate, + propDelay, mtu, totalPE, totalMachine, rating, sched_alg); + + gisIndex = 0; // CHANGE if we have more than 1 RegGIS + gis = (RegionalGIS) gisList.get(gisIndex); + + // set the regional GIS entity + if (res.setRegionalGIS(gis) == false) + { + System.out.println("FAILURE when setting regional GIS for resource " + + res.get_name()); + } + + // add a resource into a list + resList.add(res); + + System.out.println("=== Created " + GridSim.getEntityName(res.get_id()) + + ": " + totalMachine + " machines, each with " + totalPE + + " PEs.\nConnected to " + router.get_name() + + ", and registered to " + gis.get_name()); + + // link a resource to this router object + linkNetworkSCFQ(router, res, weights, MAX_BUF_SIZE, SCHED_ALG, + MIN_TH, MAX_TH, MAX_P, QUEUE_WEIGHT, STORE_STATS); + System.out.println(); + } + + + ////////////////////////////////////////// + // Fifth step: Creates one or more user entities, + // linked to a router of the topology + + // Each user will send to only one resource + int resID = -1; // resource ID + + Random random = new Random(); // a random generator + for (i = 0; i < NUM_USERS; i++) + { + String name = "User_" + i; + + // Connect each user with a router, following our topology. + router = FnbNetworkReader.getRouter(ROUTER_USERS, routerList); + baud_rate = BW_USERS; + + // schedule the initial sending of gridlets. The sending will + // start in a ramdom time within 5 min (300 sec) + double init_time = 3000 * random.nextDouble(); + + // a network link attached to this entity + Link link = new SimpleLink(name+"_link", baud_rate, propDelay, mtu); + + // randomly choose a resource from the list + int index = random.nextInt(resList.size()); + resID = ((GridResource) resList.get(index)).get_id(); + + FnbUser user = new FnbUser(name, link, i, GRIDLET_SIZE_BASE, + GRIDLET_FILESIZE_BASE_IN, GRIDLET_FILESIZE_BASE_OUT, + init_time, resID); + + user.setGridletNumber(TOTAL_GRIDLET); // total jobs for execution + + // for each user, determines the Type of Service (ToS) + // for sending objects over the network. The greater ToS is, + // the more bandwidth allocation + int ToS = random.nextInt(weights.length); + user.setNetServiceLevel(ToS); + + System.out.println("=== Created " + name + + " (id: " + user.get_id() + "), connected to " + + router.get_name() + ", with " + TOTAL_GRIDLET + + " gridlets.\nRegistered to " + gis.get_name() + + ". ToS: " + ToS + ". Init time: " + init_time); + + linkNetworkSCFQ(router, user, weights, MAX_BUF_SIZE, SCHED_ALG, + MIN_TH, MAX_TH, MAX_P, QUEUE_WEIGHT, STORE_STATS); + + gis = (RegionalGIS) gisList.get(gisIndex); + user.setRegionalGIS(gis); // set the regional GIS entities + System.out.println(); + + } // create users + System.out.println(); + + ////////////////////////////////////////// + // Final step: Starts the simulation + GridSim.startGridSimulation(); + System.out.println("\nFinish finite buffers example"); + + } + catch (Exception e) + { + e.printStackTrace(); + System.out.println("Unwanted errors happen"); + } + } + + + /** + * Links a particular entity with a given Router, using SCFQ schedulers. + * Since we are using the SCFQ packet scheduler, we need to + * specify the weight for each Type of Service (ToS). + * + * @param router a Router object + * @param obj a GridSim entity to be attached to the Router + * @param weight a weight of ToS + * @param max_buf_size maximum buffer size + */ + private static void linkNetworkSCFQ(Router router, GridSimCore obj, + double[] weight, int max_buf_size, int drop_alg, int min_th, + int max_th, double max_p, double queue_weight, boolean stats) + throws Exception + { + if (router == null) + { + System.out.println("Error - router is NULL !!"); + return; + } + + // get the baud rate of a link + double baud_rate = obj.getLink().getBaudRate(); + PacketScheduler pktObj; + + if (drop_alg == GridSimTags.FNB_ARED) + { + System.out.println("linkNetworkSCFQ(): creating ARED scheduler."); + + // create the packet scheduler for this link + pktObj = new ARED(router.get_name() + "_to_" + obj.get_name(), + baud_rate, max_p, max_buf_size, queue_weight, stats); + + ((ARED) pktObj).setWeights(weight); + } + else if (drop_alg == GridSimTags.FNB_RED) + { + System.out.println("linkNetworkSCFQ(): creating RED scheduler."); + + // create the packet scheduler for this link + pktObj = new RED(router.get_name() + "_to_" + obj.get_name(), + baud_rate, max_buf_size, min_th, max_th, + max_p, queue_weight, stats); + + ((RED) pktObj).setWeights(weight); + } + else // if (drop_alg == GridSimTags.FNB_FIFO) + { + + System.out.println("linkNetworkSCFQ(): creating FIFO scheduler."); + + // create the packet scheduler for this link + pktObj = new FIFO(router.get_name() + "_to_" + obj.get_name(), + baud_rate, max_buf_size, queue_weight, stats); + + // This is also needed here, as SCFQ is the scheduler for this link + ((FIFO) pktObj).setWeights(weight); + + } + + // attach this GridSim entity to a Router + router.attachHost(obj, pktObj); + } + + + /** + * Creates one Grid resource. A Grid resource contains one or more + * Machines. Similarly, a Machine contains one or more PEs (Processing + * Elements or CPUs). + * <p> + * In this simple example, we are simulating one Grid resource with three + * Machines that contains one or more PEs. + * @param name a Grid Resource name + * @param baud_rate the bandwidth of this entity + * @param delay the propagation delay + * @param MTU Maximum Transmission Unit + * @param totalPE number of PE per machine + * @param totalMachine number of machines in this resources + * @param rating rating of mahcines in this resource + * @param sched_alg the scheduling algorithm of this resource + * @return a GridResource object + */ + private static GridResource createGridResource(String name, double baud_rate, + double delay, int MTU, int totalPE, int totalMachine, + int rating, String sched_alg) + { + // Here are the steps needed to create a Grid resource: + // 1. We need to create an object of MachineList to store one or more + // Machines + MachineList mList = new MachineList(); + for (int i = 0; i < totalMachine; i++) + { + // 2. A Machine contains one or more PEs or CPUs. Therefore, should + // create an object of PEList to store these PEs before creating + // a Machine. + PEList peList = new PEList(); + + // 3. Create PEs and add these into an object of PEList. + for (int k = 0; k < totalPE; k++) + { + // need to store PE id and MIPS Rating + peList.add(new PE(k, rating)); + } + + // 4. Create one Machine with its id and list of PEs or CPUs + mList.add(new Machine(i, peList)); + } + + // 5. Create a ResourceCharacteristics object that stores the + // properties of a Grid resource: architecture, OS, list of + // Machines, allocation policy: time- or space-shared, time zone + // and its price (G$/PE time unit). + String arch = "Sun Ultra"; // system architecture + String os = "Solaris"; // operating system + double time_zone = 9.0; // time zone this resource located + double cost = 3.0; // the cost of using this resource + int scheduling_alg = 0; // space_shared or time_shared + + if (sched_alg.equals("SPACE")) + { + scheduling_alg = ResourceCharacteristics.SPACE_SHARED; + } + else if (sched_alg.equals("TIME")) + { + scheduling_alg = ResourceCharacteristics.TIME_SHARED; + } + + ResourceCharacteristics resConfig = new ResourceCharacteristics(arch, os, + mList, scheduling_alg, time_zone, cost); + + + // 6. Finally, we need to create a GridResource object. + long seed = 11L * 13 * 17 * 19 * 23 + 1; + double peakLoad = 0.0; // the resource load during peak hour + double offPeakLoad = 0.0; // the resource load during off-peak hr + double holidayLoad = 0.0; // the resource load during holiday + + // incorporates weekends so the grid resource is on 7 days a week + LinkedList Weekends = new LinkedList(); + Weekends.add(new Integer(Calendar.SATURDAY)); + Weekends.add(new Integer(Calendar.SUNDAY)); + + // incorporates holidays. However, no holidays are set in this example + LinkedList Holidays = new LinkedList(); + GridResource gridRes = null; + try + { + // creates a GridResource with a link + gridRes = new GridResource(name, + new SimpleLink(name + "_link", baud_rate, delay, MTU), + seed, resConfig, peakLoad, offPeakLoad, holidayLoad, Weekends, Holidays); + } + catch (Exception e) + { + e.printStackTrace(); + } + + return gridRes; + } + +} // end class + Added: trunk/examples/Network/FiniteBuffer01/network_example.txt =================================================================== --- trunk/examples/Network/FiniteBuffer01/network_example.txt (rev 0) +++ trunk/examples/Network/FiniteBuffer01/network_example.txt 2008-10-12 06:37:26 UTC (rev 255) @@ -0,0 +1,13 @@ +# total number of Routers +2 + +# specifies each router name and whether to log its activities or not +# by default no logging is required +Router0 +Router1 + +# x1 x2 0.0 10 1200 +# specify the link between two Routers +# The format is: +# Router_name1 Router_name2 baud_rate(GB/s) prop_delay(ms) mtu(byte) +Router0 Router1 0.001 10.0 1500 Added: trunk/examples/Network/Flow/Example01/FlowNetEx01.java =================================================================== --- trunk/examples/Network/Flow/Example01/FlowNetEx01.java (rev 0) +++ trunk/examples/Network/Flow/Example01/FlowNetEx01.java 2008-10-12 06:37:26 UTC (rev 255) @@ -0,0 +1,117 @@ +/* + * Author: Anthony Sulistio + * Author: James Broberg (adapted from NetEx01) + * Date: March 2008 + * Description: A simple program to demonstrate of how to use GridSim + * network extension package. + * This example shows how to create two GridSim entities and + * connect them via a link. NetUser entity sends messages to + * Test entity and Test entity sends back these messages. + */ + +import gridsim.*; +import gridsim.net.*; +import gridsim.net.flow.*; + +import java.util.*; + + + +/** + * Test Driver class for this example + */ +public class FlowNetEx01 +{ + /** + * Creates main() to run this example + */ + public static void main(String[] args) + { + System.out.println("Starting network example ..."); + + try + { + + ////////////////////////////////////////// + // First step: Initialize the GridSim package. It should be called + // before creating any entities. We can't run this example without + // initializing GridSim first. We will get run-time exception + // error. + int num_user = 4; // number of grid users + Calendar calendar = Calendar.getInstance(); + boolean trace_flag = false; // mean trace GridSim events + + // Initialize the GridSim package without any statistical + // functionalities. Hence, no GridSim_stat.txt file is created. + System.out.println("Initializing GridSim package"); + + // It is essential to set the network type before calling GridSim.init() + GridSim.initNetworkType(GridSimTags.NET_FLOW_LEVEL); + GridSim.init(num_user, calendar, trace_flag); + + // In this example, the topology is: + // user(s) --10Mb/s-- r1 --1.5Mb/s-- r2 --10Mb/s-- GridResource(s) + + // create the routers. + // If trace_flag is set to "true", then this experiment will create + // the following files (apart from sim_trace and sim_report): + // - router1_report.csv + // - router2_report.csv + Router r1 = new FlowRouter("router1", trace_flag); // router 1 + Router r2 = new FlowRouter("router2", trace_flag); // router 2 + + String sender1 = "user1"; + String receipient1 = "test1"; + String sender2 = "user2"; + String receipient2 = "test2"; + + // these entities are the senders + FlowNetUser user1 = new FlowNetUser(sender1, receipient2, 5.0); + FlowNetUser user2 = new FlowNetUser(sender2, receipient1, 20.0); + + // these entities are the receipients + FlowTest test1 = new FlowTest(receipient1, sender2); + FlowTest test2 = new FlowTest(receipient2, sender1); + + // The schedulers are redundent and will be stripped out soon + FIFOScheduler userSched1 = new FIFOScheduler("NetUserSched_0"); + r1.attachHost(user1, userSched1); + + FIFOScheduler userSched2 = new FIFOScheduler("NetUserSched_1"); + r1.attachHost(user2, userSched2); + + FIFOScheduler testSched1 = new FIFOScheduler("FlowTestSched_0"); + r2.attachHost(test1, testSched1); + + FIFOScheduler testSched2 = new FIFOScheduler("FlowTestSched_1"); + r2.attachHost(test2, testSched2); + + ////////////////////////////////////////// + // Second step: Creates a physical link + double baud_rate = 1572864; // bits/sec (baud) [1.5Mb/s] + double propDelay = 300; // propagation delay in millisecond + int mtu = Integer.MAX_VALUE;; // max. transmission unit in byte + + Link link = new FlowLink("r1_r2_link", baud_rate, propDelay, mtu); + FIFOScheduler r1Sched = new FIFOScheduler("r1_Sched"); + FIFOScheduler r2Sched ... [truncated message content] |
From: <sul...@us...> - 2008-10-11 03:28:57
|
Revision: 254 http://gridsim.svn.sourceforge.net/gridsim/?rev=254&view=rev Author: sulistio Date: 2008-10-11 03:28:52 +0000 (Sat, 11 Oct 2008) Log Message: ----------- add javadoc target to the build file, and minor update to the javadoc script. Modified Paths: -------------- trunk/build.xml trunk/javadoc.sh Added Paths: ----------- trunk/source/gridsim/net/fnb/package.html Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-10-11 03:26:18 UTC (rev 253) +++ trunk/build.xml 2008-10-11 03:28:52 UTC (rev 254) @@ -24,6 +24,10 @@ <description> This is the build file for GridSim </description> + + <!-- GridSim version number and release year for javadoc --> + <property name="version" value="4.2"/> + <property name="year" value="2008"/> <!-- location to store Java classes --> <property name="class.dir" location="./classes" /> @@ -67,6 +71,25 @@ <delete dir="${class.dir}/gridsim"/> </target> + <target name="javadoc" description="Create Javadocs"> + <mkdir dir="${doc.dir}" /> + <javadoc access="package" author="true" + version="true" use="true" + noqualifier="all" + windowtitle="GridSim ${version} API Specification" + doctitle="GridSim ${version} API Specification" + header="GridSim ${version}" + bottom="The University of Melbourne, Australia, ${year}" + destdir="${doc.dir}"> + + <tag name="invariant" scope="all" description="Invariant:"/> + <tag name="pre" scope="all" description="Pre Condition:"/> + <tag name="post" scope="all" description="Post Condition:"/> + <fileset dir="./source" includes="**/*.java" /> + + </javadoc> + </target> + </project> Modified: trunk/javadoc.sh =================================================================== --- trunk/javadoc.sh 2008-10-11 03:26:18 UTC (rev 253) +++ trunk/javadoc.sh 2008-10-11 03:28:52 UTC (rev 254) @@ -1,8 +1,8 @@ ## A script to run javadoc (Anthony Sept 2004). -year="2007" # year -ver="v4.1" # version number +year="2008" # year +ver="v4.2" # version number dir=./source # source directory that contains Java files doc=./doc # output directory @@ -17,9 +17,13 @@ -tag pre:a:"Pre Condition:" \ -tag post:a:"Post Condition:" \ -tag invariant:t:"Invariant:" \ + $dir/eduni/simjava/*.java \ + $dir/eduni/simjava/distributions/*.java \ $dir/gridsim/*.java \ $dir/gridsim/util/*.java \ $dir/gridsim/net/*.java \ + $dir/gridsim/net/flow/*.java \ + $dir/gridsim/net/fnb/*.java \ $dir/gridsim/filter/*.java \ $dir/gridsim/index/*.java \ $dir/gridsim/resFailure/*.java \ Added: trunk/source/gridsim/net/fnb/package.html =================================================================== --- trunk/source/gridsim/net/fnb/package.html (rev 0) +++ trunk/source/gridsim/net/fnb/package.html 2008-10-11 03:28:52 UTC (rev 254) @@ -0,0 +1,5 @@ +<html> + <body> + Classes that form the finite network buffer extension of <code>GridSim</code>. + </body> +</html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |