X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/c771a55e40d2a41d607a0da1b67cd1f7d546ccc8..75ce3cba194ed6afe0cf65799876b457da5bdb2b:/NOTES diff --git a/NOTES b/NOTES index fbb82a3..71e2729 100644 --- a/NOTES +++ b/NOTES @@ -1,23 +1,77 @@ -Process parameters: +Process parameters +================== - initial_load [neighbors...] +The process parameters are: initial_load [neighbors...] -Communications: - - two channels per host: control and data +Communications +============== + +There are two receiving channels per host: control for information +messages, and data for load transfers. Process model +============= + +Each process is made of 3 threads: a receiving thread, a computing +thread, and a load-balancing thread. + +* Receiving thread + ---------------- + + Loop + | wait for a message to come, either on data channel, or on ctrl channel + | push received message in a buffer of received messages + | -> ctrl messages on the one side + | -> data messages on the other side + +- + + The loop terminates when a "finalize" message is received on each + channel. + +* Computing thread + ---------------- + + Loop + | if we received some real load, get it (data messages) + | if there is some real load to send, send it + | if we own some load, simulate some computing on it + | sleep a bit if we are looping too fast + +- + send CLOSE on data for all neighbors + wait for CLOSE on data from all neighbors + + The loop terminates when process::still_running() returns false. + (read the source for full details...) + +* Load-balancing thread + --------------------- + + Loop + | receive ctrl messages + | call load-balancing algorithm + | send ctrl messages + | sleep (min_lb_iter_duration) + +- + send CLOSE on ctrl for all neighbors + wait for CLOSE on ctrl from all neighbors + + The loop terminates when process::still_running() returns false. + (read the source for full details...) - while (there is something to do) { - compute some task; - get received tasks; - compute load balancing; - send tasks to neighbors; - } +Some notes about *load attributes +================================= +process::real_load Current *real* load. + Used for the computations. + Displayed in log messages. - * Open Questions : - - definition of load on heterogeneous hosts? - - how to detect convergence? - : No need to detect convergence. Computation stops when there - nothing more to do. +process::expected_load Current load estimation. + Used for load-balancing estimation, and for + diffusing to neighbors. + * Without bookkeeping, it equals real_load + minus pending sends. + * With bookkeeping, it corresponds to the + "virtual load". - - how to manage link failures? +process::received_load Real load received from neighbors. + Used when receiveing data messages, and then + added to real_load.