Re: Q: deadlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 11, 2002 at 09:33:44PM +0530, Ketan Mukadam wrote:
 
> Oh...yes I missed this.....So when you sleep trying to get hold of pages in
> memory, the new process may try to acquire the same spinlock and will spin on it
> until you notify the sleeping process that more pages are available and then it
> will release the spinlock.

What if there are no CPUs to schedule into because all of them are spinning
for the lock held by the process just awaken. And until the just awaken process
is scheduled a CPU, how will it release the spinlock! :-)

Sleeping with a spinlock held *can* lead to deadlock.

Redards,
Sourav


 
> 
> Ketan
> ***
> "Few things are harder to put up with than a good example. " 
> - Mark Twain (1835-1910)
> ***
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux