genode/repos/os/src
Martin Stein 642254134e timer test: rate limiting and no starvation
No starvation of timeout signals
--------------------------------

Add several timeouts < 1ms to the stress test and check that timeout
handling doesn't become significantly unfair (starvation) in this situation
where some timeouts trigger nmuch faster than they get handled.

Rate limiting for timeout handling in timer
-------------------------------------------

Ensure that the timer does not handle timeouts again within 1000
microseconds after the last handling of timeouts. This makes denial of
service attacks harder. This commit does not limit the rate of timeout
signals handled inside the timer but it causes the timer to do it less
often. If a client continuously installs a very small timeout at the
timer it still causes a signal to be submitted to the timer each time
and some extra CPU time to be spent in the internal handling method. But
only every 1000 microseconds this internal handling causes user timeouts
to trigger.

If we would want to limit also the call of the internal handling method
to ensure that CPU time is spent beside the RPCs only every 1000
microseconds, things would get more complex. For instance, on NOVA
Time_source::schedule_timeout(0) must be called each time a new timeout
gets installed and becomes head of the scheduling queue. We cannot
simply overwrite the already running timeout with the new one.

Ref #2490
2017-10-19 13:29:42 +02:00
..
app usb_report_filter: check device ds 2017-10-05 17:40:04 +02:00
drivers timer: limit rate of handling timeouts 2017-10-05 17:40:05 +02:00
init init: avoid repeated config XML parsing 2017-08-28 16:49:37 +02:00
lib alarm: fix bug in _setup_alarm 2017-10-19 13:29:41 +02:00
server import chroot from world repository 2017-10-05 17:40:04 +02:00
test timer test: rate limiting and no starvation 2017-10-19 13:29:42 +02:00