SimGrid  3.14.159
Versatile Simulation of Distributed Systems
simgrid::s4u::VirtualMachine Class Reference

Detailed Description

A VM is a virtual machine that contains actors.

The total computing power that the contained processes can get is constrained to the virtual machine size.

#include <VirtualMachine.hpp>

Inheritance diagram for simgrid::s4u::VirtualMachine:
simgrid::s4u::Host simgrid::xbt::Extendable< Host >

Public Member Functions

 VirtualMachine (const char *name, s4u::Host *hostPm)
 
 VirtualMachine (VirtualMachine const &)=delete
 
VirtualMachineoperator= (VirtualMachine const &)=delete
 
bool isMigrating ()
 
void parameters (vm_params_t params)
 
void setParameters (vm_params_t params)
 
double getRamsize ()
 
simgrid::s4u::Hostpm ()
 
- Public Member Functions inherited from simgrid::s4u::Host
 Host (const char *name)
 
void destroy ()
 Fire the required callbacks and destroy the object. More...
 
 Host (Host const &)=delete
 
Hostoperator= (Host const &)=delete
 
simgrid::xbt::string const & name () const
 
const char * cname ()
 
void turnOn ()
 Turns that host on if it was previously off. More...
 
void turnOff ()
 Turns that host off. More...
 
bool isOn ()
 Returns if that host is currently up and running. More...
 
bool isOff ()
 Returns if that host is currently down and offline. More...
 
double speed ()
 Get the speed of the cpu associated to a host. More...
 
int coreCount ()
 Returns the number of core of the processor. More...
 
xbt_dict_t properties ()
 Get the properties assigned to a host. More...
 
const char * property (const char *key)
 Retrieve the property value (or nullptr if not set) More...
 
void setProperty (const char *key, const char *value)
 
xbt_swag_t processes ()
 Get the processes attached to the host. More...
 
double getPstateSpeedCurrent ()
 Get the peak power of a host. More...
 
double getPstateSpeed (int pstate_index)
 Get one power peak (in flops/s) of a host at a given pstate. More...
 
int pstatesCount () const
 
void setPstate (int pstate_index)
 Set the pstate at which the host should run. More...
 
int pstate ()
 Retrieve the pstate at which the host is currently running. More...
 
xbt_dict_t mountedStoragesAsDict ()
 Returns the list of storages mounted on an host. More...
 
xbt_dynar_t attachedStorages ()
 Returns the list of storages attached to an host. More...
 
boost::unordered_map< std::string, Storage * > const & mountedStorages ()
 Get an associative list [mount point]->[Storage] of all local mount points. More...
 
void routeTo (Host *dest, std::vector< Link *> *links, double *latency)
 Find a route toward another host. More...
 
- Public Member Functions inherited from simgrid::xbt::Extendable< Host >
 Extendable ()
 
 ~Extendable ()
 
voidextension (std::size_t rank)
 
U * extension (Extension< Host, U > rank)
 
U * extension ()
 
void extension_set (std::size_t rank, void *value, bool use_dtor=true)
 
void extension_set (Extension< Host, U > rank, U *value, bool use_dtor=true)
 
void extension_set (U *p)
 

Public Attributes

simgrid::vm::VirtualMachineImpl * pimpl_vm_ = nullptr
 
- Public Attributes inherited from simgrid::s4u::Host
surf::HostImplpimpl_ = nullptr
 
surf::Cpupimpl_cpu = nullptr
 DO NOT USE DIRECTLY (. More...
 
kernel::routing::NetCardpimpl_netcard = nullptr
 DO NOT USE DIRECTLY (. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from simgrid::s4u::Host
static Hostby_name_or_null (const char *name)
 Retrieves an host from its name, or return nullptr. More...
 
static Hostby_name_or_null (std::string name)
 Retrieves an host from its name, or return nullptr. More...
 
static s4u::Hostby_name (std::string name)
 Retrieves an host from its name, or die. More...
 
static s4u::Hostcurrent ()
 Retrieves the host on which the current actor is running. More...
 
- Static Public Member Functions inherited from simgrid::xbt::Extendable< Host >
static size_t extension_create (void(*deleter)(void *))
 
static Extension< Host, U > extension_create (void(*deleter)(void *))
 
static Extension< Host, U > extension_create ()
 
- Static Public Attributes inherited from simgrid::s4u::Host
static simgrid::xbt::signal< void(Host &)> onCreation
 
static simgrid::xbt::signal< void(Host &)> onDestruction
 
static simgrid::xbt::signal< void(Host &)> onStateChange
 
- Protected Member Functions inherited from simgrid::s4u::Host
virtual ~Host ()
 Host destruction logic. More...
 
- Protected Attributes inherited from simgrid::xbt::Extendable< Host >
std::vector< void *> extensions_
 

Constructor & Destructor Documentation

◆ VirtualMachine() [1/2]

simgrid::s4u::VirtualMachine::VirtualMachine ( const char *  name,
s4u::Host hostPm 
)
explicit

◆ VirtualMachine() [2/2]

simgrid::s4u::VirtualMachine::VirtualMachine ( VirtualMachine const &  )
delete

Member Function Documentation

◆ operator=()

VirtualMachine& simgrid::s4u::VirtualMachine::operator= ( VirtualMachine const &  )
delete

◆ isMigrating()

bool simgrid::s4u::VirtualMachine::isMigrating ( )

◆ parameters()

void simgrid::s4u::VirtualMachine::parameters ( vm_params_t  params)

◆ setParameters()

void simgrid::s4u::VirtualMachine::setParameters ( vm_params_t  params)

◆ getRamsize()

double simgrid::s4u::VirtualMachine::getRamsize ( )

◆ pm()

simgrid::s4u::Host* simgrid::s4u::VirtualMachine::pm ( )

Member Data Documentation

◆ pimpl_vm_

simgrid::vm::VirtualMachineImpl* simgrid::s4u::VirtualMachine::pimpl_vm_ = nullptr

The documentation for this class was generated from the following file: