Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill dead code
[simgrid.git] / src / surf / vm_hl13.hpp
1 /* Copyright (c) 2013-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #include "xbt/base.h"
8
9 #include "host_clm03.hpp"
10 #include "virtual_machine.hpp"
11
12 #ifndef SURF_VM_HPP_
13 #define SURF_VM_HPP_
14
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.
17
18 namespace simgrid {
19 namespace surf {
20
21 /***********
22  * Classes *
23  ***********/
24
25 class XBT_PRIVATE VMHL13Model;
26 class XBT_PRIVATE VMHL13;
27
28 /*********
29  * Model *
30  *********/
31 class VMHL13Model : public VMModel {
32 public:
33   VMHL13Model();
34   ~VMHL13Model(){};
35
36   VirtualMachine *createVM(const char *name, sg_host_t host_PM) override;
37   double shareResources(double now);
38   void adjustWeightOfDummyCpuActions() override {};
39   Action *executeParallelTask(int host_nb,
40                               sg_host_t *host_list,
41                                                           double *flops_amount,
42                                                           double *bytes_amount,
43                                                           double rate) override;
44   void updateActionsState(double /*now*/, double /*delta*/) override;
45 };
46
47 /************
48  * Resource *
49  ************/
50
51 class VMHL13 : public VirtualMachine {
52 public:
53   VMHL13(VMModel *model, const char* name, xbt_dict_t props, sg_host_t host_PM);
54   ~VMHL13() {}
55
56   void suspend() override;
57   void resume() override;
58
59   void save() override;
60   void restore() override;
61
62   void migrate(sg_host_t ind_dst_pm) override;
63
64   void setBound(double bound);
65   void setAffinity(Cpu *cpu, unsigned long mask);
66 };
67
68 /**********
69  * Action *
70  **********/
71
72 }
73 }
74
75 #endif /* SURF_VM_HPP_ */