Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gpucloudsim
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LPDS
gpucloudsim
Commits
ffdecb27
Commit
ffdecb27
authored
Dec 22, 2011
by
saurabh.kr.garg@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
0b6537bb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
420 deletions
+0
-420
BagofTaskApp.java
...rg/cloudbus/cloudsim/network/datacenter/BagofTaskApp.java
+0
-87
testMainclass.java
...g/cloudbus/cloudsim/network/datacenter/testMainclass.java
+0
-333
No files found.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/network/datacenter/BagofTaskApp.java
deleted
100755 → 0
View file @
0b6537bb
package
org
.
cloudbus
.
cloudsim
.
network
.
datacenter
;
/**
* BagofTaskApp is an example of AppCloudlet having three noncommunicating tasks.
*
*
* Please refer to following publication for more details:
*
* Saurabh Kumar Garg and Rajkumar Buyya, NetworkCloudSim: Modelling Parallel
* Applications in Cloud Simulations, Proceedings of the 4th IEEE/ACM
* International Conference on Utility and Cloud Computing (UCC 2011, IEEE CS
* Press, USA), Melbourne, Australia, December 5-7, 2011.
*
*
* @author Saurabh Kumar Garg
* @since CloudSim Toolkit 1.0
*/
import
java.util.List
;
import
org.cloudbus.cloudsim.UtilizationModel
;
import
org.cloudbus.cloudsim.UtilizationModelFull
;
import
org.cloudbus.cloudsim.core.CloudSim
;
public
class
BagofTaskApp
extends
AppCloudlet
{
public
BagofTaskApp
(
int
type
,
int
appID
,
double
deadline
,
int
numbervm
,
int
userId
)
{
super
(
type
,
appID
,
deadline
,
numbervm
,
userId
);
this
.
numbervm
=
this
.
getnumvm
();
this
.
exeTime
=
getExecTime
()/
this
.
numbervm
;
}
@Override
public
void
createCloudletList
(
List
<
Integer
>
vmIdList
){
//basically, each task runs the simulation and then data is consolidated in one task
int
executionTime
=
getExecTime
();
long
memory
=
1000
;
long
fileSize
=
NetworkConstants
.
FILE_SIZE
;
long
outputSize
=
NetworkConstants
.
OUTPUT_SIZE
;
int
pesNumber
=
NetworkConstants
.
PES_NUMBER
;
int
stgId
=
0
;
int
t
=
NetworkConstants
.
currentCloudletId
;
for
(
int
i
=
0
;
i
<
numbervm
;
i
++){
UtilizationModel
utilizationModel
=
new
UtilizationModelFull
();
NetworkCloudlet
cl
=
new
NetworkCloudlet
(
NetworkConstants
.
currentCloudletId
,
executionTime
/
numbervm
,
pesNumber
,
fileSize
,
outputSize
,
memory
,
utilizationModel
,
utilizationModel
,
utilizationModel
);
NetworkConstants
.
currentCloudletId
++;
cl
.
setUserId
(
userId
);
cl
.
submittime
=
CloudSim
.
clock
();
cl
.
currStagenum
=-
1
;
cl
.
setVmId
(
vmIdList
.
get
(
i
));
//compute and send data to node 0
cl
.
stages
.
add
(
new
TaskStage
(
NetworkConstants
.
EXECUTION
,
NetworkConstants
.
COMMUNICATION_LENGTH
,
executionTime
/
numbervm
,
stgId
++,
memory
,
vmIdList
.
get
(
0
),
cl
.
getCloudletId
()));
//0 has an extra stage of waiting for results; others send
if
(
i
==
0
){
for
(
int
j
=
1
;
j
<
numbervm
;
j
++)
cl
.
stages
.
add
(
new
TaskStage
(
NetworkConstants
.
WAIT_RECV
,
NetworkConstants
.
COMMUNICATION_LENGTH
,
0
,
stgId
++,
memory
,
vmIdList
.
get
(
j
),
cl
.
getCloudletId
()+
j
));
}
else
{
cl
.
stages
.
add
(
new
TaskStage
(
NetworkConstants
.
WAIT_SEND
,
NetworkConstants
.
COMMUNICATION_LENGTH
,
0
,
stgId
++,
memory
,
vmIdList
.
get
(
0
),
t
));
}
clist
.
add
(
cl
);
}
}
/**
* One can generate number of VMs for each application based on deadline
* @return
*/
public
int
getnumvm
(){
double
exetime
=
getExecTime
()/
2
;
//for two vms
if
(
this
.
deadline
>
exetime
)
return
2
;
else
if
(
this
.
deadline
>(
exetime
/
4
))
return
4
;
return
4
;
}
private
int
getExecTime
()
{
//use exec constraints
return
100
;
}
}
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/network/datacenter/testMainclass.java
deleted
100755 → 0
View file @
0b6537bb
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment