vmHost3.start();
Msg.info("Create two tasks on Host1: one inside a VM, the other directly on the host");
- new DummyProcess (vmHost1, "p11");
- new DummyProcess (host1, "p12");
+ new DummyProcess (vmHost1, "p11").start();
+ new DummyProcess (host1, "p12").start();
Msg.info("Create two tasks on Host2: both directly on the host");
- new DummyProcess (host2, "p21");
- new DummyProcess (host2, "p22");
+ new DummyProcess (host2, "p21").start();
+ new DummyProcess (host2, "p22").start();
Msg.info("Create two tasks on Host3: both inside a VM");
- new DummyProcess (vmHost3, "p31");
- new DummyProcess (vmHost3, "p312");
+ new DummyProcess (vmHost3, "p31").start();
+ new DummyProcess (vmHost3, "p312").start();
Msg.info("Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, "
+ "so they run for 6 seconds)");
> [MyHost1:energy VM runner:(1) 0.000000] [jmsg/INFO] Create two tasks on Host3: both inside a VM
> [MyHost1:energy VM runner:(1) 0.000000] [jmsg/INFO] Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, so they run for 6 seconds)
> [MyHost1:energy VM runner:(1) 5.000000] [jmsg/INFO] Wait another 5 seconds. The tasks stop at some point in between
+> [MyHost2:p21:(4) 6.000000] [jmsg/INFO] This worker is done.
+> [MyHost2:p22:(5) 6.000000] [jmsg/INFO] This worker is done.
+> [MyHost1:p12:(3) 6.000000] [jmsg/INFO] This worker is done.
+> [vmHost1:p11:(2) 6.000000] [jmsg/INFO] This worker is done.
+> [vmHost3:p31:(6) 6.000000] [jmsg/INFO] This worker is done.
+> [vmHost3:p312:(7) 6.000000] [jmsg/INFO] This worker is done.
> [10.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
-> [10.000000] [surf_energy/INFO] Total energy of host MyHost1: 1000.000000 Joules
-> [10.000000] [surf_energy/INFO] Total energy of host MyHost2: 1000.000000 Joules
-> [10.000000] [surf_energy/INFO] Total energy of host MyHost3: 1000.000000 Joules
+> [10.000000] [surf_energy/INFO] Total energy of host MyHost1: 1120.000000 Joules
+> [10.000000] [surf_energy/INFO] Total energy of host MyHost2: 1120.000000 Joules
+> [10.000000] [surf_energy/INFO] Total energy of host MyHost3: 1120.000000 Joules