Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement priority donations for locks #3

Closed
hangpark opened this issue Mar 25, 2017 · 0 comments
Closed

Implement priority donations for locks #3

hangpark opened this issue Mar 25, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@hangpark
Copy link
Owner

Implement priority donations to avoid priority inversions.

@hangpark hangpark added this to the Project #1 milestone Mar 25, 2017
@hangpark hangpark self-assigned this Mar 25, 2017
hangpark added a commit that referenced this issue Mar 26, 2017
Add `priority_orig` into `struct thread` to store original priority.
We don't need to know the original priority except when we retrieve or
change priority, but just know the representative priority value either
if that value is donated or original.

Donation is not implemented yet and `thread_set_priority` is modified to
deal with donated priority as well as original priority that is already
implemented.
hangpark added a commit that referenced this issue Mar 26, 2017
Donates priority recursively by `lock_donate()` and after get the lock,
`lock_retrieve()` retrieves the original priority or maximum priority of
donated priorities for locks that the thread is holding.

Note that list sorting in `sema_up()` is applied to reorder threads by
changed priority due to donations.
hangpark added a commit that referenced this issue Mar 26, 2017
Donates priority recursively by `lock_donate()` and after get the lock,
`lock_retrieve()` retrieves the original priority or maximum priority of
donated priorities for locks that the thread is holding.

Note that list sorting in `sema_up()` is applied to reorder threads by
changed priority due to donations.
@hangpark hangpark changed the title Implement priority donations Implement priority donations for locks Apr 1, 2017
@hangpark hangpark mentioned this issue Apr 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant