shared memory, critical sections, priority inversion
Posted: Wed Nov 02, 2005 12:00 am
Hi!
Known solutions for this problem (priority inversion) are priority inheritance and priority ceilings.
See: http://www.netrino.com/Publications/Glo ... rsion.html
Process p1 has high priority, process p2 has low priority but is working in it's critical section.
Scheduler lets p1 running and waiting (polling) that p2 leaves its critical section to jump in critical section itself.
Perhaps a third solution would be using locking / blocking (sleep and wakeup or wait and signal -> Tanenbaum Modern Operating Systems) p1 instead of doing polling and wasting cpu time, until p2 leaves its critical section?
So if p1 is blocked (sleep or wait), there wouldn't be any chance for p1 to run until p2 sends a "wakeup" after leaving critical region.
This method would leaving p1's and p2's priority untouched but protecting of priority inversion problem.
Am i right?
regards
Known solutions for this problem (priority inversion) are priority inheritance and priority ceilings.
See: http://www.netrino.com/Publications/Glo ... rsion.html
Process p1 has high priority, process p2 has low priority but is working in it's critical section.
Scheduler lets p1 running and waiting (polling) that p2 leaves its critical section to jump in critical section itself.
Perhaps a third solution would be using locking / blocking (sleep and wakeup or wait and signal -> Tanenbaum Modern Operating Systems) p1 instead of doing polling and wasting cpu time, until p2 leaves its critical section?
So if p1 is blocked (sleep or wait), there wouldn't be any chance for p1 to run until p2 sends a "wakeup" after leaving critical region.
This method would leaving p1's and p2's priority untouched but protecting of priority inversion problem.
Am i right?
regards