[LITMUS^RT] sys_set_rt_task_param() race

Chen, Tianyang tiche at seas.upenn.edu
Fri Jan 13 21:18:52 CET 2017


Hi,

The syscall sys_set_rt_task_param() in litmus/litmus.c cannot change a 
real-time task's parameters due to potential race with the scheduler, 
according the comments below:

"Only non-real-time tasks may be configured with this system call to 
avoid races with the scheduler. In practice, this means that a task's 
parameters must be set _before_ calling sys_prepare_rt_task()"

I can't think of anything that needs to be fixed other than an already 
armed hrtimer for budget enforcement. For example, if a job is running 
and before the budget enforcement timer fires, someone refills the 
budget. This can be taken care of by re-programming the hrtimer during 
refills. If someone wants to abort the current job immediately, the 
exec_time can be manipulated so when the scheduler is called, 
out_of_time will be set to true.

I'm trying add a new syscall to update a rt_task's paramters, such as 
period and budget of EDF. The "race" with a scheduler sounds like a 
serious issue. Is there any other things that I'm overlooking? Thanks.

Tianyang Chen




More information about the litmus-dev mailing list