Kalle Olavi Niemitalo wrote:
>
> Jan Atle Ramsli <[EMAIL PROTECTED]> writes:
>
> > That would permit 'asynchronous' reception and honoring of requests, not
> > waiting for validation, but going on immediately to the next request.
>
> Many (perhaps all?) servers already handle messages in separate
> threads, so slowdowns shouldn't block processing of other
> requests. See ports_manage_port_operations_multithread in
> libports/manage-multithread.c.
Well, I havent' got the up-to-date source tree yet (a mercyful sould is
sending me a CDR, to spare me the HUGE cost of using Belgacom's phone
lines for download) - but I have gotten a few bits and pieces, and I
have a version of
ports_manage_port_operations_multithread(..) in front of me.
The first thing I am going to do when I figure out what this function
does, is write my understanding down above the function header. It is
very nice to know that the function is part of GNU Hurd, but apart from
declaring 4 variables, it doesn't do anything except declare another
function, called internal_demuxer(..) hopefully also part of GNU Hurd,
because that function doesn't even contain so much description, and
having only a 1280x1024 display, that is all I see without a PgDn.
So, I absolutely have to agree with the fellow calling for more
transparency. If the code has become 'cleanly written' since this
version, please ignore my comment, but this is well below what should be
standard for a post-Y2K operating system. I hereby volunteer to clean
this up as soon as I have the full system, I am going to _HAVE_ to do
that in order to pain a mental picture of it. And why on earth is a
function declared inside another function? It looks like Pascal ..
And couldn't some of those parameters be grouped together in a
struct/union, so that only the address could be passed?
And how often is this function called?
I gasp for oxygen when I see something called
thread_function()
that contains code like this:
while(err != MACH_RCV_TIMED_OUT); /* <- There is a ';' there -
suggestion: a) Move ';' to line below, so we can see it.
b) Replace the ';' with something
useful (isn't there a place to
jump to?) */
Well, my encounter with Hurd is a little bumpy, I absolutely would like
to see a design. Some boxes, circles and lines.
There is a fine program called xfig, I promise to make extensive use of
it (and LyX).
Now - was it Neal who said that the device drivers are in the kernel?
What are they doing there? Shouldn't device drivers be split in two
parts (please don't say the M-word)
one for interupt time processing (this one should probably be in the
kernel)
and one for task time processing (this one only sucks on the queues that
the interrupt-time part has filled up, so it shouldn't be in the kernel,
should it?)
My wife (what would I do without her?) is currently printing the
C-interface document for me, I will probably
have more stupid questions when that happens.
Oh - my comment to the thread solution: OK.
But that shouldn't stop us from reorganizing algorithms _inside_ the
threads, even though the threads are executing in parallel, the overall
performance will benefit from optimizing each thread - is there a PERT
or something to show the temporal dependencies? I know PERTs are for
marketroids, but seeing the sort of network they handle, makes it soo
easy to spot trouble, or am I totally out there?
Hope some of you read this, I desperately need some answers to my
questions, and I need to know what you think.
Thanks, Atle