ed1k <nonexisting@invalid.domain> wrote:
In article <c0bm80$6lj$> 1@inn.qnx.com> >, > rk@parse.com > says…
I’ve written an article on priority inversion; anyone care
to critique it? Comments appreciated.
http://www.parse.com/~rk/articles/priority.html
Thanks in advance!
Cheers,
-RK
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
case >
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 [64];
versus
block_array_t *block_list;
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”
case… right?
Thanks for article.
NP.
Cheers,
-RK
–
[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/