4 * Created on: Nov 12, 2013
7 #include "vm_workstation_interface.hpp"
8 #include "workstation_clm03.hpp"
10 #ifndef VM_WORKSTATION_HPP_
11 #define VM_WORKSTATION_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.
16 void surf_vm_workstation_model_init(void);
22 class WorkstationVMHL13Model;
23 typedef WorkstationVMHL13Model *WorkstationVMHL13ModelPtr;
25 class WorkstationVMHL13;
26 typedef WorkstationVMHL13 *WorkstationVMHL13Ptr;
35 class WorkstationVMHL13Model : public WorkstationVMModel {
37 WorkstationVMHL13Model();
38 ~WorkstationVMHL13Model(){};
39 void createResource(const char *name, void *ind_phys_workstation);
40 double shareResources(double now);
41 void adjustWeightOfDummyCpuActions() {};
42 xbt_dynar_t getRoute(WorkstationPtr src, WorkstationPtr dst);
43 ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
44 ActionPtr executeParallelTask(int workstation_nb,
45 void **workstation_list,
46 double *computation_amount,
47 double *communication_amount,
49 void updateActionsState(double /*now*/, double /*delta*/);
56 class WorkstationVMHL13 : public WorkstationVM {
58 WorkstationVMHL13(WorkstationVMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t ind_phys_workstation);
67 void migrate(surf_resource_t ind_dst_pm);
69 e_surf_resource_state_t getState();
70 void setState(e_surf_resource_state_t state);
72 surf_resource_t getPm(); // will be vm_ws_get_pm()
74 void setBound(double bound);
75 void setAffinity(CpuPtr cpu, unsigned long mask);
78 void updateState(tmgr_trace_event_t event_type, double value, double date);
81 ActionPtr execute(double size);
82 ActionPtr sleep(double duration);
89 #endif /* VM_WORKSTATION_HPP_ */