1 /* Copyright (c) 2013-2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #include "host_clm03.hpp"
8 #include "vm_interface.hpp"
13 #define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
14 // It corresponds to the cost of a VM running no tasks.
21 typedef VMHL13Model *VMHL13ModelPtr;
24 typedef VMHL13 *VMHL13Ptr;
29 class VMHL13Model : public VMModel {
34 VMPtr createVM(const char *name, surf_resource_t host_PM);
35 double shareResources(double now);
36 void adjustWeightOfDummyCpuActions() {};
37 ActionPtr communicate(HostPtr src, HostPtr dst, double size, double rate);
38 ActionPtr executeParallelTask(int host_nb,
43 void updateActionsState(double /*now*/, double /*delta*/);
50 class VMHL13 : public VM {
52 VMHL13(VMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t host_PM);
61 void migrate(surf_resource_t ind_dst_pm);
63 e_surf_resource_state_t getState();
64 void setState(e_surf_resource_state_t state);
66 surf_resource_t getPm(); // will be vm_ws_get_pm()
68 void setBound(double bound);
69 void setAffinity(CpuPtr cpu, unsigned long mask);
72 void updateState(tmgr_trace_event_t event_type, double value, double date);
75 ActionPtr execute(double size);
76 ActionPtr sleep(double duration);
83 #endif /* SURF_VM_HPP_ */