1 /* Copyright (c) 2013-2015. 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. */
9 #include "host_clm03.hpp"
10 #include "virtual_machine.hpp"
15 #define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
16 // It corresponds to the cost of a VM running no tasks.
25 class XBT_PRIVATE VMHL13Model;
26 class XBT_PRIVATE VMHL13;
31 class VMHL13Model : public VMModel {
36 VirtualMachine *createVM(const char *name, surf_resource_t host_PM);
37 double shareResources(double now);
38 void adjustWeightOfDummyCpuActions() {};
39 Action *executeParallelTask(int host_nb,
44 void updateActionsState(double /*now*/, double /*delta*/);
51 class VMHL13 : public VirtualMachine {
53 VMHL13(VMModel *model, const char* name, xbt_dict_t props, surf_resource_t host_PM);
62 void migrate(surf_resource_t ind_dst_pm);
64 e_surf_resource_state_t getState();
65 void setState(e_surf_resource_state_t state);
67 surf_resource_t getPm(); // will be vm_ws_get_pm()
69 void setBound(double bound);
70 void setAffinity(Cpu *cpu, unsigned long mask);
73 void updateState(tmgr_trace_event_t event_type, double value, double date);
76 Action *execute(double size);
77 Action *sleep(double duration);
87 #endif /* SURF_VM_HPP_ */