[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: semaphore and spin locks
On Sun, 5 Aug 2001, Christoph Hellwig wrote:
> On Sun, Aug 05, 2001 at 11:51:37AM -0400, w.us@verizon.net wrote:
> > Spin locks only work in a multiprocessor environment.
>
> Right. (at least in the Linux kernel..)
>
> > If you use it in a unprocessor environment, then the waiting process would
> > keep running in a spin and have no chance to release it and the whole
> > kernel would hang.
>
> No. What waiting processes?
I was wrong here. There is no waiting process because the kernel code
cannot be preempted.
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/