> yes, kernel tasks can'nt be pre-empted, but they can voluntarily > release CPU on > blocking. That is kernel task sleeps on the semaphore or goes back to the user mode. >But I don't think that if you block in copy_to_user, > scheduler is > called. So that there will be no deadlock. IMHO, you may not have all the pages in the memory when you are trying to write to the pages. Once you get them in memory, you will lock the pages while doing the transfers. Now once the pages are not on the memory, you have to sleep while the swapper get the pages in the memory. Thanks, Sumit ----- Original Message ----- From: Ketan Mukadam <ketan@iitk.ac.in> Date: Monday, March 11, 2002 8:43 pm Subject: Re: Q: deadlock > > > ==>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/ > >
begin:vcard n:Agarwal;Sumit fn:Sumit Agarwal tel;cell:+919845205210 tel;fax:+91-80-5732696 tel;home:+919845205210 tel;work:+91-805732296 / 93 extn. 5243 url:www.wipro.com org:Wipro Technologies;SIDC, Embedded and Internet Division adr:;;Wipro Technologies, Chamundi Complex, No.26, Hosur Main Road, Bommanahalli;Bangalore;Karnataka;560068;INDIA version:2.1 email;internet:sumit.agarwal@wipro.com title:Senior Software Engineer end:vcard
**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ********************************************************************