From mboxrd@z Thu Jan 1 00:00:00 1970 From: miller@hamnavoe.demon.co.uk To: 9fans@cse.psu.edu Date: Fri, 21 Jul 2000 10:10:39 +0100 Subject: Re: [9fans] Kernel question: i386 test-and-set problem Message-Id: Topicbox-Message-UUID: e860fd06-eac8-11e9-9e20-41e7f4b1d025 > r->p is either 0 or a valid process number. Therefore, the r->p > access shouldn't cause a crash. Sorry, I'm being sloppy with terminology. By "crash" I meant that kfs became internally deadlocked by the failure of sleep/wakeup, forcing me to reboot without syncing the local file system. > In v2 the lock was providing the coherence() that we put herein v3. Yes, I agree -- that's exactly my point. Locking instructions should imply memory coherence, however outlandish the memory architecture might be. So a conservative locking discipline means not having to worry about coherence issues. I know I'm being annoyingly preachy here. You could say that my preference for lock() over coherence() is just personal bias. But it seems to me that reasoning about weakly coherent memory is subtle and difficult -- I certainly don't understand it fully. Synchronisation with locks is more straightforward, and makes sense on any shared memory architecture. I'll shut up now. -- Richard