lkml.org 
[lkml]   [1999]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SMP linux help
On Sat, Sep 04, 1999 at 02:54:33PM -0700, Nate Eldredge wrote:
> I have been wondering about the locking stuff for a while too. These
> are probably dumb questions but my OS terminology is not what it could
> be. (Is there a good reference somewhere?)
>
> * Does "lock the kernel" mean "prevent anyone else from executing any
> kernel code"?
>
> * If so, what happens if some other CPU is already inside the kernel?
> Is there some mechanism to stop the other CPU??

If another CPU holds the kernel lock, we spin until it has released it,
just as any other spinlock (<asm-i386/smplock.h>). lock_kernel prevents
any other processor from simultaneously executing any other code that
is also protected by the big kernel lock.

spinning means constantly polling a lock until it's available.

--
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.066 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site