<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Apr 20, 2007, at 3:34 AM, Lukasz S Ziarek wrote:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">If you choose to implement contention management with locks you will have to decide if you want strong atomicity (requires some sort of read/write barriers on most acceses -- redudant barriers can be eliminated) or weak atomicity (less "safe").</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm assuming by strong atomicity you mean correct behavior when a programmer accesses data that should be accessed atomically in a non-atomic manner. Every study I've seen says this does not scale because of the excessive barriers. My own opinion is that it attempts to solve with alot of runtime overhead what is very simple to do by setting up your types correctly so that such behavior is forbidden, period.</DIV><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space"> </SPAN>I do not believe anyone has thus far done a study as to how write buffer compares to updates in place<BR></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>"McRT STM: A High Performance Software Transactional Memory System for a Multi-Core Runtime", PPoPP 2006. They have numbers showing undo-logging and read versioning to be the best. They're quieter about the fact that their approach requires eager conflict detection (and thus, requires locks).</DIV><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> I dont quite follow your worry about allocating memory in a scheduler context, if the scheduler was implemented in sml.</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'd be worried about this case:</DIV><DIV>* Scheduler needs to allocate memory, none available</DIV><DIV>* Garbage collector needs to run, which might require the scheduler to switch some threads</DIV></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>-- </DIV><DIV>Eric McCorkle</DIV><DIV>Brown University</DIV><DIV>CS Graduate Student</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>