开发者

How do we find out why priority inheritance happened in VxWorks?

We have one task who State is Ready+I . Can we find which task is it 开发者_StackOverflow社区waiting for to release all semaphores? This is pre-6.0 vxworks


If you can get a backtrace from the task, you should see it blocked on some kind of system entity, e.g., a semaphore. You can look at the arg list printed in the backtrace, and then use semShow from the C shell to get information about that semaphore. Other system synchronization entities offer similar *Show routines.

Presuming that the entity supports the concept of an "owner", semShow should display the TID of the owner.


Under the older, Tornado-based systems, the WindView tool will allow you to see the relationship between tasks over time. WindView can show all your task state transitions, interrupts, semaphore operations, etc.

For newer, Workbench-based systems, the same tool is now called System Viewer.

WindView/System Viewer is the deluxe way to investigate any problem you are having with task states and how they got that way.


If I understand your question, you have a task that is inheriting the priority of some other task and you are having trouble identifying this other task. I don't recall if the i WindSh command prints the inherited priority but if it does that might give you a clue about which of the pended tasks you should look at. Once you've narrowed it down to a couple tasks you should be able to use the tw command to print information on what object a task is pended upon.

On a side note, why are you concerned about priority inheritance? After all priority inheritance isn't a problem, rather it is the solution to priority inversion.


If your task is READY+I, i don't think it is waiting for semaphores anymore. It is waiting to access the CPU. You must have a higher priority task running that is preventing your READY+I task from running.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜