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
shared memory, critical sections, priority inversion
Re: shared memory, critical sections, priority inversion
you basically get the idea.
Perhaps to clarify a little:
In my OS, I allow certain applications(depending on security clearance) to practically stop the process scheduler so that certain code can be executed. If the program does not have the correct clearance, then is must call the OS and have the OS internally shutdown the scheduler and run the code.
Brett
Perhaps to clarify a little:
In my OS, I allow certain applications(depending on security clearance) to practically stop the process scheduler so that certain code can be executed. If the program does not have the correct clearance, then is must call the OS and have the OS internally shutdown the scheduler and run the code.
Brett
Re: shared memory, critical sections, priority inversion
Err, that looks like priority inversion at its best!floatT wrote: 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
*post*