From owner-freebsd-smp Sun Apr 27 22:58:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA24830 for smp-outgoing; Sun, 27 Apr 1997 22:58:18 -0700 (PDT) Received: from root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA24824 for ; Sun, 27 Apr 1997 22:58:16 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by root.com (8.8.5/8.6.5) with SMTP id WAA02904; Sun, 27 Apr 1997 22:59:55 -0700 (PDT) Message-Id: <199704280559.WAA02904@root.com> X-Authentication-Warning: implode.root.com: localhost [127.0.0.1] didn't use HELO protocol To: Ben Black cc: Chuck Robey , FreeBSD-SMP@FreeBSD.org Subject: Re: SMP In-reply-to: Your message of "Mon, 28 Apr 1997 01:51:20 EDT." From: David Greenman Reply-To: dg@root.com Date: Sun, 27 Apr 1997 22:59:55 -0700 Sender: owner-smp@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >> >> 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? >> > >hence my saying one kernel. there is a single kernel image in memory and >both CPUs execute different (or the same) parts of it at the same time. >the single lock is to keep the CPUs from stepping on each other. when >one CPU wants to access a shared resource (and pretty much everything in >the kernel is considered shared) then it acquires the mplock, does its >business, releases the lock and continues. if the other CPU has the lock >when one wants to acquire it, the second CPU waits. > >one kernel, one lock. Uh, that's not what happens. There's a single copy of the kernel, but only one CPU may execute the kernel at a time. The lock is at the outer-most boundry of the kernel. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project