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
95f57c7f
Commit
95f57c7f
authored
Dec 16, 2011
by
rodrigo.calheiros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue #12: Dynamically created space-shared VMs fail to process cloudlets
parent
ce9bdc60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
19 deletions
+7
-19
Datacenter.java
...udsim/src/main/java/org/cloudbus/cloudsim/Datacenter.java
+5
-18
Vm.java
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/Vm.java
+2
-1
No files found.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/Datacenter.java
View file @
95f57c7f
...
...
@@ -109,10 +109,6 @@ public class Datacenter extends SimEntity {
/**
* Overrides this method when making a new and different type of resource.
* This method is called by {@link #body()} to register other type to
* GIS entity. In doing so, you
* need to create a new child class extending from
* gridsim.CloudInformationService.
* <br>
* <b>NOTE:</b> You do not need to override {@link #body()} method, if
* you use this method.
...
...
@@ -913,7 +909,7 @@ public class Datacenter extends SimEntity {
//if some time passed since last processing
//R: for term is to allow loop at simulation start. Otherwise, one initial
// simulation step is skipped and schedulers are not properly initialized
if
(
CloudSim
.
clock
()
<
0.11
||
CloudSim
.
clock
()
>
this
.
getLastProcessTime
()+
0.1
)
{
if
(
CloudSim
.
clock
()
<
0.11
1
||
CloudSim
.
clock
()
>
this
.
getLastProcessTime
()+
0.1
)
{
List
<?
extends
Host
>
list
=
getVmAllocationPolicy
().
getHostList
();
double
smallerTime
=
Double
.
MAX_VALUE
;
//for each host...
...
...
@@ -926,10 +922,9 @@ public class Datacenter extends SimEntity {
}
}
//gurantees a minimal interval before scheduling the event
if
(
smallerTime
<
CloudSim
.
clock
()+
0.1
)
{
smallerTime
=
CloudSim
.
clock
()+
0.1
;
if
(
smallerTime
<
CloudSim
.
clock
()+
0.1
1
)
{
smallerTime
=
CloudSim
.
clock
()+
0.1
1
;
}
if
(
smallerTime
!=
Double
.
MAX_VALUE
)
{
schedule
(
getId
(),
(
smallerTime
-
CloudSim
.
clock
()),
CloudSimTags
.
VM_DATACENTER_EVENT
);
}
...
...
@@ -967,9 +962,6 @@ public class Datacenter extends SimEntity {
* @param file a DataCloud file
*
* @return a tag number denoting whether this operation is a success or not
*
* @see CloudSim.datagrid.DataCloudTags#FILE_ADD_SUCCESSFUL
* @see CloudSim.datagrid.DataCloudTags#FILE_ADD_ERROR_EMPTY
*/
public
int
addFile
(
File
file
)
{
if
(
file
==
null
)
{
...
...
@@ -1047,12 +1039,7 @@ public class Datacenter extends SimEntity {
*
* @param fileName the name of the file to be deleted
*
* @return the error message as defined in
* {@link CloudSim.datagrid.DataCloudTags}
*
* @see CloudSim.datagrid.DataCloudTags#FILE_DELETE_SUCCESSFUL
* @see CloudSim.datagrid.DataCloudTags#FILE_DELETE_ERROR_ACCESS_DENIED
* @see CloudSim.datagrid.DataCloudTags#FILE_DELETE_ERROR
* @return the error message
*/
private
int
deleteFileFromStorage
(
String
fileName
)
{
Storage
tempStorage
=
null
;
...
...
@@ -1073,7 +1060,7 @@ public class Datacenter extends SimEntity {
* Prints the debts.
*/
public
void
printDebts
()
{
Log
.
printLine
(
"*****
Power
Datacenter: "
+
this
.
getName
()+
"*****"
);
Log
.
printLine
(
"*****Datacenter: "
+
this
.
getName
()+
"*****"
);
Log
.
printLine
(
"User id\t\tDebt"
);
Set
<
Integer
>
keys
=
getDebts
().
keySet
();
...
...
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/Vm.java
View file @
95f57c7f
...
...
@@ -134,7 +134,6 @@ public class Vm {
* @post $none
*/
public
double
updateVmProcessing
(
double
currentTime
,
List
<
Double
>
mipsShare
)
{
setRecentlyCreated
(
false
);
if
(
mipsShare
!=
null
)
{
return
getCloudletScheduler
().
updateVmProcessing
(
currentTime
,
mipsShare
);
}
...
...
@@ -150,6 +149,8 @@ public class Vm {
List
<
Double
>
currentRequestedMips
=
getCloudletScheduler
().
getCurrentRequestedMips
();
if
(
isRecentlyCreated
())
{
setRecentlyCreated
(
false
);
//boolean mipsIsNull = true;
//if (CloudSim.clock() > 0) {
//mipsIsNull = false;
...
...
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