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
3596dda3
Commit
3596dda3
authored
Jul 27, 2010
by
Anton Beloglazov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- ClouletSchedulerSingleService renamed to CloudletSchedulerDynamicWorkload
parent
85c0db67
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
CloudletSchedulerDynamicWorkload.java
...g/cloudbus/cloudsim/CloudletSchedulerDynamicWorkload.java
+3
-3
CloudletSchedulerSingleServiceTest.java
...cloudbus/cloudsim/CloudletSchedulerSingleServiceTest.java
+2
-2
HostTest.java
...loudsim/src/test/java/org/cloudbus/cloudsim/HostTest.java
+9
-9
VmTest.java
.../cloudsim/src/test/java/org/cloudbus/cloudsim/VmTest.java
+2
-2
No files found.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/CloudletScheduler
SingleService
.java
→
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/CloudletScheduler
DynamicWorkload
.java
View file @
3596dda3
...
...
@@ -14,7 +14,7 @@ import java.util.List;
import
java.util.Map
;
/**
* CloudletScheduler
SingleService
implements a policy of
* CloudletScheduler
DynamicWorkload
implements a policy of
* scheduling performed by a virtual machine assuming
* that there is just one cloudlet which is working as
* an online service.
...
...
@@ -22,7 +22,7 @@ import java.util.Map;
* @author Anton Beloglazov
* @since CloudSim Toolkit 2.0
*/
public
class
CloudletScheduler
SingleService
extends
CloudletSchedulerTimeShared
{
public
class
CloudletScheduler
DynamicWorkload
extends
CloudletSchedulerTimeShared
{
/** The mips. */
private
double
mips
;
...
...
@@ -46,7 +46,7 @@ public class CloudletSchedulerSingleService extends CloudletSchedulerTimeShared
* @param pesNumber the pes number
* @param mips the mips
*/
public
CloudletScheduler
SingleService
(
double
mips
,
int
pesNumber
)
{
public
CloudletScheduler
DynamicWorkload
(
double
mips
,
int
pesNumber
)
{
super
();
setMips
(
mips
);
setPesNumber
(
pesNumber
);
...
...
modules/cloudsim/src/test/java/org/cloudbus/cloudsim/CloudletSchedulerSingleServiceTest.java
View file @
3596dda3
...
...
@@ -38,11 +38,11 @@ public class CloudletSchedulerSingleServiceTest {
private
static
final
double
MIPS
=
1000
;
private
static
final
int
PES_NUMBER
=
2
;
private
CloudletScheduler
SingleService
vmScheduler
;
private
CloudletScheduler
DynamicWorkload
vmScheduler
;
@Before
public
void
setUp
()
throws
Exception
{
vmScheduler
=
new
CloudletScheduler
SingleService
(
MIPS
,
PES_NUMBER
);
vmScheduler
=
new
CloudletScheduler
DynamicWorkload
(
MIPS
,
PES_NUMBER
);
}
@Test
...
...
modules/cloudsim/src/test/java/org/cloudbus/cloudsim/HostTest.java
View file @
3596dda3
...
...
@@ -68,8 +68,8 @@ public class HostTest {
@Test
public
void
testIsSuitableForVm
()
{
Vm
vm0
=
new
Vm
(
0
,
0
,
MIPS
,
2
,
RAM
,
BW
,
0
,
""
,
new
CloudletScheduler
SingleService
(
MIPS
,
2
));
Vm
vm1
=
new
Vm
(
1
,
0
,
MIPS
*
2
,
1
,
RAM
*
2
,
BW
*
2
,
0
,
""
,
new
CloudletScheduler
SingleService
(
MIPS
*
2
,
2
));
Vm
vm0
=
new
Vm
(
0
,
0
,
MIPS
,
2
,
RAM
,
BW
,
0
,
""
,
new
CloudletScheduler
DynamicWorkload
(
MIPS
,
2
));
Vm
vm1
=
new
Vm
(
1
,
0
,
MIPS
*
2
,
1
,
RAM
*
2
,
BW
*
2
,
0
,
""
,
new
CloudletScheduler
DynamicWorkload
(
MIPS
*
2
,
2
));
assertTrue
(
host
.
isSuitableForVm
(
vm0
));
assertFalse
(
host
.
isSuitableForVm
(
vm1
));
...
...
@@ -77,10 +77,10 @@ public class HostTest {
@Test
public
void
testVmCreate
()
{
Vm
vm0
=
new
Vm
(
0
,
0
,
MIPS
/
2
,
1
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
SingleService
(
MIPS
/
2
,
1
));
Vm
vm1
=
new
Vm
(
1
,
0
,
MIPS
,
1
,
RAM
,
BW
,
0
,
""
,
new
CloudletScheduler
SingleService
(
MIPS
,
1
));
Vm
vm2
=
new
Vm
(
2
,
0
,
MIPS
*
2
,
1
,
RAM
,
BW
,
0
,
""
,
new
CloudletScheduler
SingleService
(
MIPS
*
2
,
1
));
Vm
vm3
=
new
Vm
(
3
,
0
,
MIPS
/
2
,
2
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
SingleService
(
MIPS
/
2
,
2
));
Vm
vm0
=
new
Vm
(
0
,
0
,
MIPS
/
2
,
1
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
DynamicWorkload
(
MIPS
/
2
,
1
));
Vm
vm1
=
new
Vm
(
1
,
0
,
MIPS
,
1
,
RAM
,
BW
,
0
,
""
,
new
CloudletScheduler
DynamicWorkload
(
MIPS
,
1
));
Vm
vm2
=
new
Vm
(
2
,
0
,
MIPS
*
2
,
1
,
RAM
,
BW
,
0
,
""
,
new
CloudletScheduler
DynamicWorkload
(
MIPS
*
2
,
1
));
Vm
vm3
=
new
Vm
(
3
,
0
,
MIPS
/
2
,
2
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
DynamicWorkload
(
MIPS
/
2
,
2
));
assertTrue
(
host
.
vmCreate
(
vm0
));
assertFalse
(
host
.
vmCreate
(
vm1
));
...
...
@@ -90,7 +90,7 @@ public class HostTest {
@Test
public
void
testVmDestroy
()
{
Vm
vm
=
new
Vm
(
0
,
0
,
MIPS
,
1
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
SingleService
(
MIPS
,
1
));
Vm
vm
=
new
Vm
(
0
,
0
,
MIPS
,
1
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
DynamicWorkload
(
MIPS
,
1
));
assertTrue
(
host
.
vmCreate
(
vm
));
assertSame
(
vm
,
host
.
getVm
(
0
,
0
));
...
...
@@ -104,8 +104,8 @@ public class HostTest {
@Test
public
void
testVmDestroyAll
()
{
Vm
vm0
=
new
Vm
(
0
,
0
,
MIPS
,
1
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
SingleService
(
MIPS
,
1
));
Vm
vm1
=
new
Vm
(
1
,
0
,
MIPS
,
1
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
SingleService
(
MIPS
,
1
));
Vm
vm0
=
new
Vm
(
0
,
0
,
MIPS
,
1
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
DynamicWorkload
(
MIPS
,
1
));
Vm
vm1
=
new
Vm
(
1
,
0
,
MIPS
,
1
,
RAM
/
2
,
BW
/
2
,
0
,
""
,
new
CloudletScheduler
DynamicWorkload
(
MIPS
,
1
));
assertTrue
(
host
.
vmCreate
(
vm0
));
assertSame
(
vm0
,
host
.
getVm
(
0
,
0
));
...
...
modules/cloudsim/src/test/java/org/cloudbus/cloudsim/VmTest.java
View file @
3596dda3
...
...
@@ -38,12 +38,12 @@ public class VmTest {
private
static
final
long
SIZE
=
1000
;
private
static
final
String
VMM
=
"Xen"
;
private
CloudletScheduler
SingleService
vmScheduler
;
private
CloudletScheduler
DynamicWorkload
vmScheduler
;
private
Vm
vm
;
@Before
public
void
setUp
()
throws
Exception
{
vmScheduler
=
new
CloudletScheduler
SingleService
(
MIPS
,
PES_NUMBER
);
vmScheduler
=
new
CloudletScheduler
DynamicWorkload
(
MIPS
,
PES_NUMBER
);
vm
=
new
Vm
(
ID
,
USER_ID
,
MIPS
,
PES_NUMBER
,
RAM
,
BW
,
SIZE
,
VMM
,
vmScheduler
);
}
...
...
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