2 @defgroup MSG_API MSG: Legacy handling of CSP algorithms
3 @brief Simple programming environment
6 MSG is a simple API to write algorithms organized with Concurrent
7 Sequential Processes (CSP) that interact by exchanging messages. It
8 constitutes a convenient simplification of the reality of distributed
9 systems. It can be used to build rather realistic simulations, but
10 remains simple to use: most unpleasant technical elements can be
11 abstracted away rather easily.
13 \warning MSG used to be the main API of SimGrid 3, but we are
14 currently in the process of releasing SimGrid 4. The
15 tentative release date is Summer 2018. So MSG is frozen and
16 will probably never evolve. If you are starting a new
17 project, you should consider S4U instead. Note that the
18 support for MSG will not be removed from SimGrid before 2020
21 \section MSG_funct Offered functionalities
23 - \ref m_process_management
24 - \ref m_host_management
25 - \ref m_task_management
26 - \ref msg_mailbox_management
31 - \ref msg_trace_driven
37 @defgroup msg_simulation Main MSG simulation Functions
39 @brief How to setup and control your simulation.
41 The basic workflow is the following (check the \ref msg_examples for
44 -# Initialize the library with #MSG_init
45 -# Create a platform (usually by parsing a file with
46 #MSG_create_environment)
47 -# Register the functions that your processes are supposed to run with
48 #MSG_function_register (and maybe #MSG_function_register_default)
49 -# Launch your processes from a deployment file with #MSG_launch_application
50 -# Run the simulation with #MSG_main
53 /** @defgroup m_process_management Process Management Functions
55 * @brief This section describes the process structure of MSG
56 * (#msg_process_t) and the functions for managing it.
59 /** @defgroup m_host_management Host Management Functions
61 * @brief Host structure of MSG
64 /** @defgroup m_task_management Task Management Functions
66 * @brief Task structure of MSG (#msg_task_t) and associated functions. See
67 * \ref msg_task_usage to see how to put the tasks in action.
70 /** @defgroup msg_mailbox_management Mailbox Management Functions
72 * @brief Functions associated to mailboxes.
75 /** @defgroup msg_task_usage Task Actions
77 * @brief This section describes the functions that can be used
78 * by a process to execute, communicate or otherwise handle some task.
81 /** @defgroup msg_synchro Explicit Synchronization Functions
83 * @brief Explicit synchronization mechanisms: semaphores (#msg_sem_t) and friends.
85 * In some situations, these things are very helpful to synchronize processes without message exchanges.
88 /** @defgroup msg_VMs VMs
90 * @brief Interface created to mimic IaaS clouds.
92 * With it, you can create virtual machines to put your processes
93 * into, and interact directly with the VMs to manage groups of
98 /** @defgroup msg_storage_management Storage Management Functions
100 * @brief Storage structure of MSG (#msg_storage_t) and associated functions, inspired from POSIX.
103 /** @defgroup msg_file File Management Functions
105 @brief MSG files (#msg_file_t) and associated functions, inspired from POSIX.
109 @defgroup msg_trace_driven Trace-driven simulations
111 @brief This section describes the functions allowing to build trace-driven simulations.
113 This is very handy when you want to test an algorithm or protocol that
114 does nothing unless it receives some events from outside. For example,
115 a P2P protocol reacts to requests from the user, but does nothing if
116 there is no such event.
118 In such situations, SimGrid allows to write your protocol in your C
119 file, and the events to react to in a separate text file. Declare a
120 function handling each of the events that you want to accept in your
121 trace files, register them using #xbt_replay_action_register in your main,
122 and then use #MSG_action_trace_run to launch the simulation. You can
123 either have one trace file containing all your events, or a file per
126 Check the examples in <b>examples/msg/actions/actions.c</b> for details.