4 The process parameters are: initial_load [neighbors...]
9 There are two receiving channels per host: control for information
10 messages, and data for load transfers.
15 Each process is made of 3 threads: a receiving thread, a computing
16 thread, and a load-balancing thread.
22 | wait for a message to come, either on data channel, or on ctrl channel
23 | push received message in a buffer of received messages
24 | -> ctrl messages on the one side
25 | -> data messages on the other side
28 The loop terminates when a "finalize" message is received on each
35 | if we received some real load, get it (data messages)
36 | if there is some real load to send, send it
37 | if we own some load, simulate some computing on it
38 | sleep a bit if we are looping too fast
40 send CLOSE on data for all neighbors
41 wait for CLOSE on data from all neighbors
43 The loop terminates when process::still_running() returns false.
44 (read the source for full details...)
46 * Load-balancing thread
50 | receive ctrl messages
51 | call load-balancing algorithm
53 | sleep (min_lb_iter_duration)
55 send CLOSE on ctrl for all neighbors
56 wait for CLOSE on ctrl from all neighbors
58 The loop terminates when process::still_running() returns false.
59 (read the source for full details...)
61 Some notes about *load attributes
62 =================================
63 process::real_load Current *real* load.
64 Used for the computations.
65 Displayed in log messages.
67 process::expected_load Current load estimation.
68 Used for load-balancing estimation, and for
69 diffusing to neighbors.
70 * Without bookkeeping, it equals real_load
72 * With bookkeeping, it corresponds to the
75 process::received_load Real load received from neighbors.
76 Used when receiveing data messages, and then