Re: Spinlocks under uniprocessor running non preemptible kernel
- From: Gil Hamilton <gil_hamilton@xxxxxxxxxxx>
- Date: Fri, 21 Sep 2007 14:29:28 +0200 (CEST)
MAx <mahesh1280@xxxxxxxxx> wrote in news:1190370654.803795.230210
@e9g2000prf.googlegroups.com:
Does that mean spinlocks do not do the job they are meant to do on a
uniprocessor system with
linux 2.4.x(non-preemptible kernel)
The job they are "meant to do" only applies to multiprocessor systems.
Spinlocks simply don't make sense on a uniprocessor system. It's perfectly
okay to run a multiprocessor kernel on a uniprocessor system, but the
spinlocks it uses just waste CPU cycles. Sure, a spinlock in that kernel
could hang a uniprocessor machine if incorrectly implemented, but in almost
every such case, it would also hang a multiprocessor machine.
There are a few cases where a spinlock would hang a non-preemptible
uniprocessor kernel where it would not necessarily hang a multiprocessor
kernel or a preemptible uniprocessor kernel; however, I cannot think of a
case where this is anything other than a very bad design (i.e. an
inappropriate use of a spinlock).
GH
.
- References:
- Prev by Date: Re: Spinlocks under uniprocessor running non preemptible kernel
- Next by Date: Re: Spinlocks under uniprocessor running non preemptible kernel
- Previous by thread: Re: Spinlocks under uniprocessor running non preemptible kernel
- Index(es):
Relevant Pages
|