On Thu Nov 29 04:20:52 EST 2012, [email protected] wrote:
> My problem is that the kernel is not currently capable of supplying
> what Erik defines, to the process level even internally, and even for
> his described applications (delays of a small interval, tiny
> retransmission times), it's not clear that the traditional sleep,
> which has *always* been sloppy, is anyway the right model; and
> certainly not for any more general application.  I had a quick read
> through some papers and theses last night, and it certainly isn't
> clear cut.

i ran a little test.  the meat of the program is this

        cycles(t+0);
        for(i = 0; i < 5000000000ull; i += s)
                nsleep(s);
        cycles(t+1);

        print("%g\n", cyclestoseconds(t[1]-t[0]));

i get quite predictable results; there is no cliff.  

sleep in ns     elapsed time    calculated syscall overhead
1000000000      5.000012                # 2.40µs / syscall
100000000       5.000106                # 2.12µs / syscall
10000000        5.001097                # 2.19µs / syscall
1000000         5.01078         # 2.16µs / syscall
100000          5.102487                # 2.16µs / syscall
10000           6.081568                # 2.16µs / syscall

- erik

Reply via email to