Re: [Sablevm-developer] Threading support in SableVM
Brought to you by:
egagnon
From: Chris P. <chr...@ma...> - 2004-02-20 04:48:16
|
Etienne Gagnon wrote: > Hi All, > > First, I'll be away for a little over 2 weeks, so don't expect any > reply from me. Have fun! > See comments below. > > Chris Pickett wrote: > >> ... >> For the Pentium 4, Intel Xeon, and P6 family processors, if the area >> of memory being locked during a LOCK operation is cached in the >> processor that is performing the LOCK operation as write-back memory >> and is completely contained in a cache line, the processor may not >> assert the >> LOCK# signal on the bus.... >> ... So that means it looks like the problem is elsewhere (e.g. writes >> to "xxx.flag" that Etienne mentioned). ... > > > Hmmm... I'm not convinced. Have you actually read the JVM spec for > JMM (memory model)? Acquiring a thin lock should cause all UNRELATED > memory content to be gotten from main memory after the lock, and > unlocking should do the reverse. SableVM does not do any of this > currently. You mean in Section 8.9, right? "Locking any lock conceptually flushes all variables from a thread's working memory, and unlocking any lock forces the writing out to main memory of all variables that the thread has assigned." I'm pretty sure that when the spec says "working memory" it does not mean "processor cache" but "thread-local heap". SableVM doesn't have thread-local heaps (we discussed it the other day), and to me a large part of the JMM appears to be unimportant for SableVM. I think the current problem is related to multithreading in SableVM at the C / pthreads / MP level, but not at the JMM level. Cheers, Chris |