}
public void request(double CStime) throws MsgException {
RequestTask req = new RequestTask(getName());
- GrantTask grant= new GrantTask();
Msg.info("Send a request to the coordinator");
req.send("coordinator");
Msg.info("Wait for a grant from the coordinator");
- grant.receive(getName());
+ GrantTask.receive(getName());
Task compute = new Task("CS", CStime, 0);
compute.execute();
ReleaseTask release = new ReleaseTask();
public class XVM extends VM {
private int dpIntensity;
- private int netBW;
private int ramsize;
private int currentLoad;
int nbCores, int ramsize, int netBW, String diskPath, int diskSize, int migNetBW, int dpIntensity){
super(host, name, nbCores, ramsize, netBW, diskPath, diskSize, (int)(migNetBW*0.9), dpIntensity);
this.currentLoad = 0;
- this.netBW = netBW ;
this. dpIntensity = dpIntensity ;
this.ramsize= ramsize;
this.daemon = new Daemon(this, 100);
package energy.consumption;
import org.simgrid.msg.Msg;
-import org.simgrid.msg.Comm;
-import org.simgrid.msg.Host;
import org.simgrid.msg.Task;
import org.simgrid.msg.Process;
import org.simgrid.msg.MsgException;
package energy.consumption;
import org.simgrid.msg.Msg;
-import org.simgrid.msg.Host;
import org.simgrid.msg.MsgException;
public class Main {
Msg.info("Having write " + write + " on " + filename);
Msg.info("Seek back to the beginning of " + filename);
- file.seek(0,file.SEEK_SET);
+ file.seek(0,File.SEEK_SET);
read = file.read(150000,1);
Msg.info("Having read " + read + " on " + filename);