Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Apr 1997 21:21:06 +0300 (EEST)
From:      Narvi <narvi@haldjas.folklore.ee>
To:        Terry Lambert <terry@lambert.org>
Cc:        Chuck Robey <chuckr@mat.net>, black@zen.cypher.net, FreeBSD-SMP@FreeBSD.org
Subject:   Re: SMP
Message-ID:  <Pine.BSF.3.95.970428210516.21427B-100000@haldjas.folklore.ee>
In-Reply-To: <199704281744.KAA02167@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Mon, 28 Apr 1997, Terry Lambert wrote:

> > I'm confused, then.  If there's only one kernel, then only one cpu can 
> > run it, so only one cpu can field the system calls.  If both cpu's can 
> > field system calls, then unless they contact the other one to get the 
> > work done, then there must be two copies of the kernel ruinning, right?
> > 
> > I'm probably misunderstanding something.  Maybe you meant only one piece 
> > of software called "kernel" but two cpus running it?
> 
> The lock is acquired at system call time.  Only one CPU can acquire the
> lock at a time, so the kernel is not reentered.  But any CPU may
> acquire the lock.
> 
> Effectively, there is a single kernel which can be run by only one
> CPU at a time.
> 

NB! I am not a SMP guru (and have never claimed to be one).

Just an idea, maybe just another wheel(TM).

Couldn't we divide the kernel (and anything "provided" by it into) two (at
least initially):

1) client - accepts syscalls, translates, etc. and passes the result on to
   2
2) kernel server - does all the low level stuff

We could then thread 1) and 2).

Each thread in 2 has it's own lock (initally, there is one lock on the
whole of 2). If one thread in 2 needs to use a service provided by
another, it blocks on it. There is two types of blocking, soft and hard - 
on soft blocking, we mark the thread as soft-blocked and allocated new of
it's type as needed. Hard blocking is blocking we can't help :-( like
hardware driver related blocking. There is a fixed number and when it
blocks things just qeue up.

We each entry to 2 is accociated a request qeue - actually a
graph, so that if we discover there were two writes to the same disk block
we write only the last, saving one disk access.

So we could have a processor for each disk interface card (scsi, ide,
etc), each network driver, and some more. Well, in practice it moight not
work out like that :-(

	Sander

> 
> 					Terry Lambert
> 					terry@lambert.org
> ---
> Any opinions in this posting are my own and not those of my present
> or previous employers.
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970428210516.21427B-100000>