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
5dd1dea0
Commit
5dd1dea0
authored
May 24, 2016
by
sarehfotuhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit-10.50
parent
b44b61cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
ConstantsExamples.java
...oudbus/cloudsim/examples/container/ConstantsExamples.java
+2
-2
RunnerAbs.java
...a/org/cloudbus/cloudsim/examples/container/RunnerAbs.java
+9
-6
No files found.
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/container/ConstantsExamples.java
View file @
5dd1dea0
...
...
@@ -35,9 +35,9 @@ public class ConstantsExamples {
*/
public
static
final
int
VM_TYPES
=
4
;
public
static
final
int
[]
VM_MIPS
=
new
int
[]{
37274
/
2
,
37274
/
2
,
37274
/
2
,
37274
/
2
};
public
static
final
double
[]
VM_MIPS
=
new
double
[]{
37274
/
2
,
37274
/
2
,
37274
/
2
,
37274
/
2
};
public
static
final
int
[]
VM_PES
=
new
int
[]{
2
,
4
,
1
,
8
};
public
static
final
int
[]
VM_RAM
=
new
int
[]{
1024
,
2048
,
4096
,
8192
};
//**MB*
public
static
final
float
[]
VM_RAM
=
new
float
[]
{(
float
)
1024
,
(
float
)
2048
,
(
float
)
4096
,
(
float
)
8192
};
//**MB*
public
static
final
int
VM_BW
=
100000
;
public
static
final
int
VM_SIZE
=
2500
;
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/container/RunnerAbs.java
View file @
5dd1dea0
...
...
@@ -220,11 +220,17 @@ public abstract class RunnerAbs {
if
(
vmAllocationPolicyName
.
startsWith
(
"MSThreshold-Over_"
))
{
double
overUtilizationThreshold
=
Double
.
parseDouble
(
vmAllocationPolicyName
.
substring
(
18
));
vmAllocationPolicy
=
new
PowerContainerVmAllocationPolicyMigrationStaticThresholdMC
(
hostList
,
vmSelectionPolicy
,
containerSelectionPolicy
,
hostSelectionPolicy
,
overUtilizationThreshold
);
vmAllocationPolicy
=
new
PowerContainerVmAllocationPolicyMigrationStaticThresholdMC
(
hostList
,
vmSelectionPolicy
,
containerSelectionPolicy
,
hostSelectionPolicy
,
overUtilizationThreshold
,
ConstantsExamples
.
VM_TYPES
,
ConstantsExamples
.
VM_PES
,
ConstantsExamples
.
VM_RAM
,
ConstantsExamples
.
VM_BW
,
ConstantsExamples
.
VM_SIZE
,
ConstantsExamples
.
VM_MIPS
);
}
else
if
(
vmAllocationPolicyName
.
startsWith
(
"MSThreshold-Under_"
))
{
double
overUtilizationThreshold
=
Double
.
parseDouble
(
vmAllocationPolicyName
.
substring
(
18
,
22
));
double
underUtilizationThreshold
=
Double
.
parseDouble
(
vmAllocationPolicyName
.
substring
(
24
));
vmAllocationPolicy
=
new
PowerContainerVmAllocationPolicyMigrationStaticThresholdMCUnderUtilized
(
hostList
,
vmSelectionPolicy
,
containerSelectionPolicy
,
hostSelectionPolicy
,
overUtilizationThreshold
,
underUtilizationThreshold
);
vmAllocationPolicy
=
new
PowerContainerVmAllocationPolicyMigrationStaticThresholdMCUnderUtilized
(
hostList
,
vmSelectionPolicy
,
containerSelectionPolicy
,
hostSelectionPolicy
,
overUtilizationThreshold
,
underUtilizationThreshold
,
ConstantsExamples
.
VM_TYPES
,
ConstantsExamples
.
VM_PES
,
ConstantsExamples
.
VM_RAM
,
ConstantsExamples
.
VM_BW
,
ConstantsExamples
.
VM_SIZE
,
ConstantsExamples
.
VM_MIPS
);
}
else
if
(
vmAllocationPolicyName
.
startsWith
(
"VMThreshold-Under_"
))
{
...
...
@@ -282,10 +288,7 @@ public abstract class RunnerAbs {
protected
HostSelectionPolicy
getHostSelectionPolicy
(
String
hostSelectionPolicyName
)
{
Object
hostSelectionPolicy
=
null
;
if
(
hostSelectionPolicyName
.
startsWith
(
"CorThreshold"
))
{
double
threshold
=
Double
.
parseDouble
(
hostSelectionPolicyName
.
substring
(
13
));
hostSelectionPolicy
=
new
HostSelectionPolicyCorrelationThreshold
(
new
HostSelectionPolicyRandomSelection
(),
threshold
);
}
else
if
(
hostSelectionPolicyName
==
"FirstFit"
)
{
if
(
hostSelectionPolicyName
==
"FirstFit"
)
{
hostSelectionPolicy
=
new
HostSelectionPolicyFirstFit
();
...
...
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