1 Reply Latest reply on Feb 9, 2011 7:33 AM by jheld

    Is there any lock mechanism?

    junghyun

      Can I use any lock mechanism except TNS register?

       

      There are traditional instructions making a lock mechanism such as CMPXCHG and TNS.

       

      I think 48 TNS registers are not enough, so I think I can use them as a locking mechanism.

       

       

      I guess they does not do their work atomically because of the interconnect network on SCC.

       

      But I want to know the possibility(or impossibility) of this.

        • 1. Re: Is there any lock mechanism?
          jheld

          The LOCK prefix and atomic instructions like CMPXCHG do not provide atomic operations on shared memory on SCC, much as they would not work between machines in a traditional cluster.  It takes specific hardware support to implement them which is not present on SCC.

           

          The primary need for locking operations in shared memory is to enabling sharing of memory among concurrent processes.  In SCC we imagined messaging instead of shared memory or shared memory access coordinated by messages.  In that case the 48 test&set bits were meant to be used by the messaging system and other synchronization built on the messaging.

           

          Given the variety of programming models being explored, the 48 Test&Set bits are indeed few.  With 20-20 hindsight we would have put in more, but we only have the 48.