1 This note documents results of my attempts to very carefully examine
2 behaviour of Timeouts in TAO on real-time OS (such as Linux with RT
3 patches) and to obtain a precise understand of behavior of timeouts.
6 I would like to document expected behavior precisely for each types of
9 I tested with min_timeout = 20msec and max_timout = 40 msec. This gives:
12 TimeBase::TimeT mid_value =
13 // convert from msec to "TimeT" (0.1 usec units)
14 10000 * (min_timeout + max_timeout) / 2;
16 any_orb <<= mid_value; // 30 msec
17 CORBA::Any any_thread;
18 any_thread <<= mid_value + 10000; // midvalue + 1 msec = 31 msec
19 CORBA::Any any_object;
20 any_object <<= mid_value + 20000; // midvalue + 2 msec = 32 msec
22 Given this, exactly how many timeout at the ORB, thread, and object
23 level should I expect to observe?
25 If we assume communications to take some small delta_t value as compared
26 to 20-40msec intervals, I am expecting:
28 0 out of 21 timeouts with no TIMEOUT policy
29 10 out of 20 timeouts with ORB TIMEOUT policy = 30 msec
30 9 out of 20 timeouts with Thread TIMEOUT policy = 31 msec
31 8 out of 20 timeouts with object TIMEOUT policy = 32 msec
33 There are 21 calls with "no timeout" rather than 20 due to the extra
34 call to the server at the end just before the call to "shutdown" method.
36 This results in a total of 27 timeouts and 54 w/o timeouts.
38 Running this on Linux kernel 2.6.14Uniproc PREEMPT (Ingo Molnar patches)
39 the actual values match precisely. (The client.cpp is modified to track
40 each type of invocation separately.)
42 in_time_count[none]= 21 timeout_count[none]= 0
43 in_time_count[orb]= 10 timeout_count[orb]= 10
44 in_time_count[thread]= 11 timeout_count[thread]= 9
45 in_time_count[object]= 12 timeout_count[object]= 8
47 For a total of 27 timeouts and 54 w/o timeouts.
49 However, when I run the test of Linux 2.4.21-37.EL I observe
51 12 timeouts and 69 w/o timeout, since this is a non RT kernel. Thus,
52 please be aware of this issue when this test is run.
55 Lockheed Martin Advanced Technology Labs