Re: Q: deadlock

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

 





==>On Mon, Mar 11, 2002 at 06:15:13AM -0600, pwa wrote:
==>
==>> AFAIK if the process (#1) holding the spinlock blocks while calling 
==>> copy_to_user, schedule is
==>> called. The next process (#2) tries to enter the critical region, and spins 
==>> on the lock.
==>> If/when the pages requested by the copy_to_user are retrived from swap, an 
==>> interrupt should occur.
==>> Schedule should mark #1 as running, and #1 should release the lock.
==>
==>kernel tasks can't be pre-empted (without CONFIG_PREEMPT)

yes, kernel tasks can'nt be pre-empted, but they can voluntarily release CPU on
blocking.But I don't think that if you block in copy_to_user, scheduler is
called. So that there will be no deadlock.


Ketan

--
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