Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP 9000 V-Class Server: Architecture > Chapter 5 Synchronization

Barrier synchronization

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

Not all threads in a multithread process complete at the same time. All threads, however, must typically wait until the last thread finishes. The threads hit a barrier and must be synchronized before continuing.

The barrier synchronization semaphore is a running count of the number of threads that have reached the barrier. The last processor to finish writes a nonzero value to the semaphore address, signalling to the other processors that the threads are synchronized.

An alternate method for barrier synchronization semaphore operations requires a sequence of instructions using EPAC CSRs similar to the sequence discussed in the section “Noncoherent semaphore operators”.

The following sequence of instructions provides an alternative method for the coherent_inc64() function:

    					PROBEW  cincd_addr        ;Check protection
loop
LDI 1,%t1
STD %t1,(CSR_OP_CNTX) ;Arm CSR Operations
LPA cincd_addr,%t2
STD %t2,(CSR_CINCD) ;Issue Coh. Inc.
LDD (CSR_OP_CNTX),%t4
BB,*>= %t4,62,loop ;check if triggered

The steps of the sequence are:

  1. Check write protection for the operation address.

  2. Arm the operation by writing to the CSR Operation Armed register Armed bit.

  3. Perform virtual-to-physical address translation.

  4. Fetch the Operation address. The value read is the return value for the semaphore operation.

  5. Check the EPAC Operation Context register Armed bit to make sure the operation was issued. If the Triggered bit is not set, then the operation must be restarted. The Armed bit is cleared when the sequence is interrupted by either an external interrupt or a TLB miss.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.