ed1k <email@example.com> wrote:
In article <c0bm80$6lj$> firstname.lastname@example.org> >, > email@example.com > says…
I’ve written an article on priority inversion; anyone care
to critique it? Comments appreciated.
Thanks in advance!
Good article, brave enough to tell the truth that the priority
inheritance does not protect against priority inversion. Probably there
is no universal cure for priority inversion suitable for operation system
as a whole, but good design can help to avoid the problem in every
particular case. The priority queueing solution is such an example, but
it is too complicated, IMHO. Thus it might be useful in very particular
Thanks! It was presented as an example, not as a “universal solution”.
BTW, I don’t think the idea with the array is good, especially if it
requires a thread for every element of array. (Well, they are supposed to
be blocked, and what? Currently we have 64 levels, but it was promised to
rise that number drasticly in nearest future). Why can’t it be two-
dimensional list? If some client sends request we just go through list
(in direction of priority levels > > ) - if there is element with this
priority level, we add request into that list (in directions of queued
requests > > ); if there is element with lower priority and next element is
with higher priority (so there is no given priority in the list), we
insert new element for given priority into list and add request into this
element (which is list itself > > ) Huh, I love simplify things >
If I understand you correctly, it’s not the size of the array that you
are really complaining about, but rather the number of threads required.
I really don’t see a difference between:
block_array_t *blocks ;
in terms of memory storage – 64 x NULL pointer is 256 bytes. Even if the
number of priorities is raised to 256, that still only comes out to 1k.
The suggestion of using the thread pool to manage the number of threads
is where you will get the savings in the “large number of priority levels”
Thanks for article.
[If replying via email, you’ll need to click on the URL that’s emailed to you
afterwards to forward the email to me – spam filters and all that]
Robert Krten, PDP minicomputer collector http://www.parse.com/~pdp8/