[LITMUS^RT] SRP -> PCP

Björn Brandenburg bbb at mpi-sws.org
Tue May 15 18:34:12 CEST 2012


On May 15, 2012, at 4:49 PM, Glenn Elliott wrote:

>   From what I can tell, a task is being added to the ready queue and the task returned by __next_ready() is already scheduled (see edf_common.c::edf_preemption_needed()).  This worries me a little bit---is it okay for a task to appear in the ready queue when it is actively scheduled? 

Likely not, unless you use link-based scheduling (i.e., C-EDF or GSN-EDF).

The SRP probably wasn't tested the last couple of times LITMUS^RT was rebased, so I wouldn't be surprised if it is buggy. 

One possible deadlock, however, is if your tasks hold other locks. For example, I've seen tasks deadlock because they were holding semaphores / mutexes in kernel space or libc. The SRP implementation doesn't tolerate this;  it assumes that jobs do not hold any other locks. The SRP prevented the mutex-holder from being scheduled, whereas the SRP ceiling "setter" was suspended trying to acquire the kernel/libc mutex being held by the other task.  A bit brittle… 

- Björn





More information about the litmus-dev mailing list