Newsgroups: comp.os.minix
Subject: Re: My Minix mysteries
References: <8v90pp$j31$1@nnrp1.deja.com>
Organization: Rochester Institute of Technology, Rochester, NY
From: aje9383@osfmail.isc.rit.edu (Andrew Erickson)
NNTP-Posting-Host: grace.isc.rit.edu
X-Original-NNTP-Posting-Host: grace.isc.rit.edu
Message-ID: <3a19a21b@news.isc.rit.edu>
Date: 20 Nov 2000 17:13:47 -0500
X-Trace: 20 Nov 2000 17:13:47 -0500, grace.isc.rit.edu
Lines: 43
XPident: aje9383
X-Original-NNTP-Posting-Host: 129.21.4.100
XPident: Unknown
Path: news.adfa.edu.au!clarion.carno.net.au!news0.optus.net.au!news1.optus.net.au!optus!skywalker.ou.edu!feed2.news.rcn.net!rcn!howland.erols.net!bloom-beacon.mit.edu!news.kodak.com!news-nysernet-16.sprintlink.net!news.sprintlink.net!news.isc.rit.edu!aje9383
Xref: news.adfa.edu.au comp.os.minix:36202

In article <8v90pp$j31$1@nnrp1.deja.com>,  <c4scroller@my-deja.com> wrote:
>Dear All,
>
>I wonder if any of you would have the time to answer a few stumbling
>blocks I have encountered when looking at how MINIX works at the Kernel
>level. I am new to Operating Systems!
>
>Why is it that the process HARDWARE (I believe process Zero) does not
>have a slot in the Process Table? Is it because the actual process
>is/can never be invoked as an actual process and is just used for
>logical convenience?

Yes; it exists primarily to provide a from process for messages originating
with hardware interrupts.  (You need something there that the tasks can
block on in their receive calls.)

>How are messages ever lost in MINIX if user processes can't communicate
>with one another? Is it because of the buffering (or lack of buffering)
>involved?

I don't believe they are, in general.  Messages generated from interrupts
can get 'lost' if they aren't handled in time--precisely because of the lack
of buffering--but those from user processes shouldn't ever get lost. 
Buffering would help interrupt-generated messaging, but there's no way to
ensure no messages will ever get lost without analyzing interrupt rates,
response times, etc. etc.; even with buffering, enough fast interrupts would
fill up the buffer eventually and messages would be lost.  (In practice,
though, buffering might be very helpful if lost messages are a problem. 
I've never seen signs that messages are dropped anywhere, though.)

>Why does MINIX never have deadlocks even though it users synchronous
>(SendRec) communication between user processes and the Kernel?

Deadlocks occur in the kernel, where sends and receives don't need to be
paired.  If task A sends a synchronous message to task B, and B to A,
neither will make any progress because neither is receiving.

That said, I rather doubt there are any deadlocks in the current kernel
except under rare and unusual circumstances.  I also rather doubt it is
entirely free of deadlocks under all circumstances.

-- 
Andrew Erickson
