From owner-freebsd-smp Mon Apr 28 11:18:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA29071 for smp-outgoing; Mon, 28 Apr 1997 11:18:14 -0700 (PDT) Received: from haldjas.folklore.ee (Haldjas.folklore.ee [193.40.6.121]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA28977 for ; Mon, 28 Apr 1997 11:16:52 -0700 (PDT) Received: from localhost (narvi@localhost) by haldjas.folklore.ee (8.8.4/8.8.4) with SMTP id VAA23262; Mon, 28 Apr 1997 21:21:08 +0300 (EEST) Date: Mon, 28 Apr 1997 21:21:06 +0300 (EEST) From: Narvi To: Terry Lambert cc: Chuck Robey , black@zen.cypher.net, FreeBSD-SMP@FreeBSD.org Subject: Re: SMP In-Reply-To: <199704281744.KAA02167@phaeton.artisoft.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-smp@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk 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. >