SCHED_SPORADIC: Why ss_initial_budget is not 'respected' ?
kbyte at iol.pt
Mon May 23 09:42:11 UTC 2005
I am using the SCHED_SPORADIC policy in a POSIX test program but the ss_initial_budget time
seems not to be respected.
What I want is to execute the sporadic thread during 10,25 seconds (ss_initial_budget)
and to "pause" the execution of that thread for 10,5 seconds (ss_replenish_period).
In order to have time to see things in screen I configured:
microseconds per tick 1000000
ticks per time slice 1
Here the pseudo-code of the test program:
printk(" BkGrd Thread ");
pthread_setschedparam(pthread_self(), SCHED_SPORADIC, &schparam)
Launch the Worker_Thread with priority 50 and SCHED_FIFO as policy
printk(" Main Thread ");
I can see in the screen "Main Thread" written during 10 seconds but the words "BkGrd Thread" are written in the
screen only during 1 or 2 seconds.
Why Worker_Thread() doesnt executes during all the replenish period of the main thread?
Could we mix SCHED_SPORADIC threads and FIFO threads in the same program?
NOVO! Filtro de Anti-SPAM IOL reduz o lixo na sua caixa de correio em mais de 80%
Servicos IOL COMPLETO e IOL SEGURO.
Saiba Mais em http://www.iol.pt/correio/rodape.php?dst=0505121
More information about the users