Group scheduling and alternatives
Group scheduling and alternatives
Posted Dec 10, 2010 1:23 UTC (Fri) by dtlin (subscriber, #36537)In reply to: Group scheduling and alternatives by iabervon
Parent article: Group scheduling and alternatives
If an application can only make use of the first 1 us of every 1 ms, and asks to run only then, the kernel may be able to give it 100% of the time it wants without any system impact; if, on the other hand, it can't tell the kernel, it has to busy-wait through a lot more processor time in order to get any change of being running then, and load the system much more heavily.
What's wrong with nanosleep?
Posted Dec 10, 2010 2:46 UTC (Fri)
by iabervon (subscriber, #722)
[Link] (3 responses)
The scales in my example are different from what I was actually doing at the time, but I was trying to sample an accelerometer attached to an i2c bus attached to a serial port at 20 Hz; I needed to send a few bytes at the right time, which would cause the accelerometer to take a sample then. (The accelerometer device didn't support automatic periodic sampling.) It turned out that the only way to get data that I could analyze was to sleep until 1 ms before the time I wanted to sample and busy-wait until the right time; that meant I was generally running by the sample time, and generally hadn't used up my time slice. On the other hand, I was burning ~2% of the CPU on a power-limited system busy-waiting.
Posted Dec 10, 2010 18:08 UTC (Fri)
by njs (subscriber, #40338)
[Link] (2 responses)
Posted Dec 10, 2010 18:38 UTC (Fri)
by iabervon (subscriber, #722)
[Link] (1 responses)
Posted Dec 20, 2010 1:44 UTC (Mon)
by kevinm (guest, #69913)
[Link]
Group scheduling and alternatives
Group scheduling and alternatives
Group scheduling and alternatives
Group scheduling and alternatives