Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Apr 1997 01:51:20 -0400 (EDT)
From:      Ben Black <black@zen.cypher.net>
To:        Chuck Robey <chuckr@mat.net>
Cc:        FreeBSD-SMP@FreeBSD.org
Subject:   Re: SMP
Message-ID:  <Pine.LNX.3.91.970428014800.32065R-100000@zen.cypher.net>
In-Reply-To: <Pine.BSF.3.91.970427235620.22821K-100000@Journey2.mat.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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.


b3n




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.91.970428014800.32065R-100000>