X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a4c4a618cd7f38611b0a635d4c2b1724760501db..8d510dd9844ff0da71e3856a38fe067973d03e04:/doc/gtut-introduction.doc diff --git a/doc/gtut-introduction.doc b/doc/gtut-introduction.doc index f7e0f3ba1c..f53224e523 100644 --- a/doc/gtut-introduction.doc +++ b/doc/gtut-introduction.doc @@ -10,6 +10,13 @@ - The section \ref GRAS_tut_intro_model presents somehow formaly the programmation model used in GRAS. +\section GRAS_tut_intro_further Further readings + +After this page, you may find these one interesting: +\ref GRAS_howto_design. If you're new to GRAS, you may want to read the +initiatic tour first, begining with \ref GRAS_tut_tour_install or +\ref GRAS_tut_tour_setup. +
\section GRAS_tut_intro_what What is GRAS @@ -248,28 +255,88 @@ yourself will deadlock (althrough it may change in the future). \subsection GRAS_tut_intro_model_commmodel Communication model -Send operations are as synchronous as possible pratically. They -block the process until the message actually gets delivered to the receiving -process (an acknoledgment is awaited). We thus have an 1-port model in -emission. This limitation allows the framework to signal error condition +Send operations are as synchronous as possible pratically. They block +the process until the message actually gets delivered to the receiving +process. An acknoledgment is awaited in SG, and we consider the fact that RL +does not the same as a bug to be fixed one day. We thus have an 1-port model +in emission. This limitation allows the framework to signal error condition to the user code in the section which asked for the transmission, without having to rely on an interuption mecanism to signal errors asynchronously. -This communication model is not completely synchronous in that sense that -the receiver cannot be sure that the acknoledgment has been delivered -(this is the classical byzantin generals problem). Pratically, the -acknoledgment is so small that there is a good probability that the message -where delivered. If you need more guaranty, you will need to implement -better solutions in the user space. - -Receive operations can be done in parallel, thanks to a specific thread -within the framework. Moreover, the messages not matching the criterion in -explicite receive are queued. The model is thus N-port in reception. - -Previous paragraph describes the model we are targeting, but the current -state of the implementation is a bit different: an acknoledgment is awaited -in send operation only in SG (this is a bug of RL), and there is no specific -thread for handling incoming communications yet. This shouldn't last long -until we solve this. +This communication model is not completely synchronous in that sense that the +receiver cannot be sure that the acknoledgment has been delivered (this is the +classical byzantin generals problem). Pratically, the acknoledgment is so small +that there is a good probability that the message where delivered. If you need +more guaranty, you will need to implement better solutions in the user space. + +As in SimGrid v3.3, receive operations are done in a separated thread, but they +are done sequentially by this thread. The model is thus 1-port in +reception, but something like 2-port in general. Moreover, the messages not +matching the criterion in explicite receive (see for example \ref +gras_msg_wait) are queued for further use. Thanks to this specific +thread, the emission and reception are completely decorelated. Ie, the +main thread can perfectly send a message while the listener is +receiving something. We thus have a classical 1-port model. + +Here is a graphical representation of a scenario involving two processes A and +B. Both are naturally composed of two threads: the one running user code, and +the listener in charge of listening incoming messages from the network. Both +processes also have a queue for the communication between the two threads, even +if only the queue of process B is depicted in the graph. + +The experimental scenario is as follows: + + + +This figure is a bit dense, and there is several point to detail here: \subsection GRAS_tut_intro_model_timing_policy Timing policy