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 "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.
20 class WorkstationVMHL13Model;
21 typedef WorkstationVMHL13Model *WorkstationVMHL13ModelPtr;
23 class WorkstationVMHL13;
24 typedef WorkstationVMHL13 *WorkstationVMHL13Ptr;
29 class WorkstationVMHL13Model : public WorkstationVMModel {
31 WorkstationVMHL13Model();
32 ~WorkstationVMHL13Model(){};
34 WorkstationVMPtr createWorkstationVM(const char *name, surf_resource_t ind_phys_workstation);
35 double shareResources(double now);
36 void adjustWeightOfDummyCpuActions() {};
37 ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
38 ActionPtr executeParallelTask(int workstation_nb,
39 void **workstation_list,
40 double *computation_amount,
41 double *communication_amount,
43 void updateActionsState(double /*now*/, double /*delta*/);
50 class WorkstationVMHL13 : public WorkstationVM {
52 WorkstationVMHL13(WorkstationVMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t ind_phys_workstation);
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 /* VM_WORKSTATION_HPP_ */