From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <001201c022e4$d6defe00$426514d4@cz99.cz> From: "Jakub Jermar" To: <9fans@cse.psu.edu> References: <20001110130656.CD862199EA@mail.cse.psu.edu> Subject: Re: [9fans] sleep(), sched() and ilock() MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Date: Wed, 20 Sep 2000 11:22:57 +0200 Topicbox-Message-UUID: 27f7f2ee-eac9-11e9-9e20-41e7f4b1d025 There is a misunderstanding that I probably introduced to this thread. I was asking two separate things: (i) how's it with ilock() and (ii) how's it with sleep(). I certainly didn't want to put any relation between them. Sorry for getting you confused. Now I see that my questions should have been asked separately or at least better separated. You have answered both of the questions in your first reply. If you want to know where does this confusion comes from, it is from my private kernel notes I am taking. A time ago I found out that ilock() and iunlock() run on the same cpu. Yesterday I reread the notes again and I could not decide whether this fact is the goal of ilock() or just a side effect. The second question came up from the same notes, but had completely different subject. It talked about sleep(), because I couldn't take easy the fact that splhi can save the state on one cpu and splx it on another. But as I've already replied, I perceived that that doesn't matter. > The splx is necessary because ...... we need to return in the > same state we arrived. This is my point. Do we need to have the cpu in the same state as it appeared before sleep() or does this sentence relate to processes executing sleep()? After your first reply and further glancing through sleep(), I would say the latter is true. Thanks for your patience, Jakub Jermar