Regarding datacenter name in the example program of cloudsim

307 views
Skip to first unread message

Alok Gundgurti

unread,
Jun 15, 2011, 3:01:17 PM6/15/11
to clou...@googlegroups.com
Hi every one.
I have been going through the example programs given with the CloudSim toolkit. In one of the Example code while creating the datacenter its name is given as Datacenter_0 and when we run the program,in the output while creating virtual machine in the datacenter, it first shows as trying to create VM #0 in Datacenter_0 and later it shows Vm #0 has been created in Datcenter #2. can anyone explain me why is it so???

Here is the part of the output which shows about the above asked question...

Starting CloudSimExample1...
Initialising...
Starting CloudSim version 2.0
Datacenter_0 is starting...
Broker is starting...
Entities started.
0.0: Broker: Cloud Resource List received with 1 resource(s)
0.0: Broker: Trying to Create VM #0 in Datacenter_0
0.0: Broker: Trying to Create VM #1 in Datacenter_0
0.0: Broker: VM #0 has been created in Datacenter #2, Host #0
0.0: Broker: VM #1 has been created in Datacenter #2, Host #0

0.0: Broker: Sending cloudlet 0 to VM #0
.
.
.
.
.
.

Thank you.

Rodrigo Calheiros

unread,
Jun 15, 2011, 8:23:45 PM6/15/11
to clou...@googlegroups.com
Hi!

Entities in CloudSim have a name (String) and id (int); Names are not
necessarily related to id: for example, you could name your data
center as "public cloud" or whatever other name you want. Ids, on the
other hand, are assigned by the simulation core and cannot be chosen
by users.

In the messages in the examples, sometimes we used the name of the
data center (Datacenter_0) and sometimes its id (2).

Regards,
Rodrigo

Message has been deleted

Alok Gundgurti

unread,
Jun 16, 2011, 3:39:15 PM6/16/11
to clou...@googlegroups.com
Thanks for the information sir,
I have another question here, whether the datacenter id's are fixed in the example programs?  because every time when i run those examples it chooses datacenter with id 2 only. And also its same with the userid. in the output of example program 1 every time it shows userid as 3. And also can we manually assign the ids to the datacenters?

Rodrigo Calheiros

unread,
Jun 16, 2011, 7:58:49 PM6/16/11
to clou...@googlegroups.com
Hi!

You cannot assign these ids by yourself; this value is given by the
simulation core based on the order the entities are instantiated.

Regards,
Rodrigo

Alok Gundgurti

unread,
Jun 18, 2011, 12:56:54 AM6/18/11
to clou...@googlegroups.com
sir can you tell the order of entities creation. i'm confused with the userid, as far as my knowledge is concerned, i guess first entity created would be a user and an id is assigned to it. Correct me if i'm wrong. then why in the output i get to see the userid as 3. and whether the userid is related to the brokerid?

Rodrigo Calheiros

unread,
Jun 19, 2011, 8:51:32 PM6/19/11
to clou...@googlegroups.com
In the beginning of the simulation,, two entities are automatically
created, one controls shutdown of simulation (id 0) and the other is
the CIS (id 1). User-defined entities are created after these two.

In example 1, the first entity created is the datacenter (line 71),
and thus it gets id=2 and the second is the broker (line 74), which
gets id=3.

Userid is the brokerid.

Regards,
Rodrigo

Alok Gundgurti

unread,
Jun 22, 2011, 3:48:33 PM6/22/11
to clou...@googlegroups.com
Thank you for the clarification sir.
Reply all
Reply to author
Forward
0 new messages