US20090193279A1 - Method for enabling multi-processor synchronization - Google Patents

Method for enabling multi-processor synchronization Download PDF

Info

Publication number
US20090193279A1
US20090193279A1 US12/362,329 US36232909A US2009193279A1 US 20090193279 A1 US20090193279 A1 US 20090193279A1 US 36232909 A US36232909 A US 36232909A US 2009193279 A1 US2009193279 A1 US 2009193279A1
Authority
US
United States
Prior art keywords
value
method
sequence
turn
processors
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US12/362,329
Other versions
US8539188B2 (en
Inventor
Mayan Moudgill
Vitaly Kalashnikov
Murugappan Senthilvelan
Umesh Srikantiah
Tak-po Li
Pablo Balzola
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qualcomm Inc
Original Assignee
Sandbridge Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to US2464908P priority Critical
Application filed by Sandbridge Technologies Inc filed Critical Sandbridge Technologies Inc
Priority to US12/362,329 priority patent/US8539188B2/en
Assigned to SANDBRIDGE TECHNOLOGIES INC. reassignment SANDBRIDGE TECHNOLOGIES INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: BALZOLA, PABLO, KALASHNIKOV, VITALY, LI, TAK-PO, MOUDGILL, MAYAN, SENTHILVELAN, MURUGAPPAN, SRIKANTIAH, UMESH
Publication of US20090193279A1 publication Critical patent/US20090193279A1/en
Assigned to ASPEN ACQUISITION CORPORATION reassignment ASPEN ACQUISITION CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: SANDBRIDGE TECHNOLOGIES, INC.
Assigned to QUALCOMM INCORPORATED reassignment QUALCOMM INCORPORATED ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: ASPEN ACQUISITION CORPORATION
Publication of US8539188B2 publication Critical patent/US8539188B2/en
Application granted granted Critical
Active legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Abstract

A method for providing at least one sequence of values to a plurality of processors is described. In the method, a sequence generator from one or more sequence generators is associated with a memory location. The sequence generator is configured to generate the at least one sequence of values. One or more read accesses of the memory location are enabled by a processor from the plurality of processors. In response to enabling the read access, the sequence generator is executed so that it returns a first value from the sequence of values to the processor. After executing the sequence generator, the sequence generator is advanced so that the next access generates a second value from the sequence of values. The second value is sequentially subsequent to the first value.

Description

    CROSS-REFERENCE TO RELATED APPLICATIONS
  • This is a United States Non-Provisional Patent Application that relies for priority on and claims priority to U.S. Provisional Patent Application Ser. No. 61/024,649, filed on Jan. 30, 2008, the contents of which are incorporated herein by reference.
  • FIELD OF THE INVENTION
  • This invention relates to methods for processing signals in a multiprocessor environment. In particular, this invention concerns one or more methods to enable multi-processor synchronization.
  • DESCRIPTION OF THE RELATED ART
  • In any environment where multiple processes are active at any time, there is a need for a processing method that implements critical sections of the data processing. Typically, this is accomplished using some form of a mutual exclusion algorithm (otherwise referred to as a “mutex”).
  • Mutexes may be implemented in a variety of different ways. In one known example, software algorithms are employed to implement the one or mutexes required for a particular processing environment. One example of a software algorithm is the Lamport's bakery algorithm.
  • As may be appreciated by those skilled in the art, software algorithms that implement mutexes may be quite slow. This is at least a first failing in the prior art.
  • As an alternative solution to software, hardware solutions are also known in the art. Most modern processors provide atomic instructions, such as compare-and-swap instructions or load-reserved/store-conditional instructions. These instructions allow for efficient implementation of synchronization of operations including those associated with mutexes.
  • As also may be appreciated by those skilled in the art, the implementation of these constructs on a multi-processor system may require a large amount of additional hardware. This is at least a second failing in the prior art.
  • Other failings in the prior art also exist, as should be apparent to those skilled in the art.
  • SUMMARY OF THE INVENTION
  • It is, therefore, one aspect of the invention to address at least one of the failings in the prior art.
  • To this end, the invention provides for a method, employed via software, to implement one or more mutexes without a significant degradation of processing speed.
  • The invention provides at least one method that incorporates a synchronization counter to enhance implementation of one or more mutexes without impeding processing speed, at least not to the same degree as software known in the prior art.
  • Among others, the method of the invention improves upon methods known in the prior art in several identifiable ways.
  • In one example, the method of the invention does not affect the processor. As a result, the method of the invention may be applied to any of a wide variety of different processors.
  • At least for this same reason, the method of the invention may be applied to processors that are a part of a multi-processor system.
  • Given that the method of the invention does not affect the processor, the invention also may be applied in processing environments where several different kinds of processors are utilized.
  • In the method of the invention, the synchronization counters are loaded from memory addresses. As a result, an implementation potentially may have as many counters as there are memory addresses. In other words, the number of synchronization counters is potentially un-bounded.
  • With this approach, the method of the invention allows mutexes potentially to be implemented with only one long-latency remote load operation. This remote load operation encompasses the initial read of the synchronization counter. The remainder of the operations may be either one or more remote store operations or one or more local read operations.
  • Other aspects of the invention will be made apparent from the description that follows and the drawings appended hereto.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • The invention will now be described in connection with one or more embodiments, aspects of which are illustrated in the drawings in which:
  • FIG. 1 is a flow chart illustrating a first embodiment of the method of the invention;
  • FIG. 2 is a flow chart illustrating a second embodiment of the method of the invention;
  • FIG. 3 is a flow chart illustrating a third embodiment of the method of the invention;
  • FIG. 4 is a flow chart illustrating loop A, which is a part of the third embodiment of the method illustrated in FIG. 3;
  • FIG. 5 is a flow chart illustrating a fourth embodiment of the method of the invention;
  • FIG. 6 is a first part of a flow chart illustrating loop B, which is a part of the fourth embodiment of the method illustrated in FIG. 5; and
  • FIG. 7 is a second part of a flow chart illustrating loop B.
  • DESCRIPTION OF PREFERRED EMBODIMENT(S) OF THE INVENTION
  • The invention will now be described in connection with one or more embodiments. It is intended for the embodiments and any associated examples and variations to be exemplary only. The invention is intended to encompass any equivalents and variations of the embodiments described herein, as should be appreciated by those skilled in the art.
  • As noted above, the method of the invention employs one or more synchronization counters. Each synchronization counter is implemented in association with a memory location where a successively higher value is returned every time that the memory location is read (or is accessed). Using such a synchronization counter, a mutex may be implemented as set forth below in Code Segment #1:
  • Code Segment #1 volatile int turn; /* turn is a global variable */ /* entering mutex */ int my_turn = read_synch_counter( ); while( my_turn != turn ) {  /* wait */ } ... /* do stuff in the critical section */ turn++;
  • In a simple example of this approach, the value of “turn” is 0 and the first value returned by the counter also is 0. When the first process tries to access (or enter) the critical section of code, the value “my_turn” is set to 0, which is the same value as “turn”. Since my_turn=turn, the process is allowed to enter the critical section of code. It is noted that my_turn refers to the number of the thread, while turn refers to the thread being executed.
  • It is possible that a subsequent processing iteration may try to access (or enter) the critical section of code before the first process exits the critical section of code. In this instance, the my_turn variable associated with the subsequent process will be assigned a value of 1. Since my_turn=1, the subsequent process will be required to wait until the first process exits the critical section of code.
  • At some point after the first process (my_turn=0) exits the critical section of code, the synchronization counter will increment to 1. As a result, turn will be incremented to 1. Once it is recognized that turn is the same as my_turn, the subsequent process (my_turn=1) will be permitted to access the critical section of code.
  • Having provided a general overview of the invention, the following discussion addresses a situation where multiple synchronization counters are provided.
  • With multiple synchronization counters, it is possible to implement multiple, disjointed mutexes at the same time. Each of the multiple synchronization counters are mapped onto different memory locations so that reading (or accessing) a word from one of those locations returns the value then existing in a counter. Successive reads of the same memory location return successively greater values for the synchronization counter.
  • For implementation of the invention, it is contemplated that each of the memory locations for each of the synchronization counters are visible to and accessible by all of the processors.
  • Before addressing other aspects of the invention, it is contemplated that a store (or a write operation) to a synchronization counter may be used to initialize the value.
  • Next, the applicability of the invention to a Non-Uniform Memory Access (“NUMA”) multi-processor is described.
  • One contemplated NUMA processor for which the invention is suited is the sb3500, for example. In a NUMA processor, it is desirable for all repeated memory accesses (or reads) to be as local as possible. This minimizes processing time, among other things.
  • To implement the invention in the context of the mutex algorithm discussed above, the variable “turn” may be employed as a global variable. If this approach is employed, however, it is expected that some of the processors will be disadvantaged. Specifically, those processors that are not local to the stored variable will require additional processing time because it will take longer to access the memory location associated with that variable. As such, implementation of a single turn variable for all of the processors in a multiple processor environment is unnecessarily expensive (at least in terms of processing time) for a subset of all of the processors.
  • In the invention, to avoid disparate expense for different processors, the turn variable is replicated in a plurality of memory locations, each of which is more readily (and, therefore, more inexpensively) accessed by each of the different processors. It is contemplated that the turn variable will be replicated at the “cheapest” practical level for each of the processors. In one example, if there are N processors, the invention contemplates the replication of N turns, one for each processor.
  • In the example where there are N processors and N “turns”, the invention may be implemented as set forth in Code Segment 2, below:
  • Code Segment #2 /* entering mutex  * sync_addr is address of synch counter for this location  * turn_addr[0..N−1] are the addresses of N variables  */ int my_turn = *sync_addr; /* i.e. read_sync_counter( ) */ volatile int* this_turn = turn_addr[this_core( )]; while( my_turn != *this_turn ) {  /* wait */ } ... /* do stuff in the critical section */ for(i=0; i<N; i++ ) {  while(* turn_addr[i] != my_turn ) {   /* wait */  }  *turn_addr[i] = my_turn+1; }
  • As outlined in Code Segment #2, there is a “wait” instruction. The wait instruction is included in Code Segment #2 specifically to make sure that that turn[i] is not updated in a non-sequential fashion. It is possible that turn[i] may be first updated to N+2 and then updated to N+1 because of a reordering of write operations (or stores). Clearly, this is inconsistent with the approach of the invention, which provides for a sequential increase in the value of turn[i] from 0 . . . N−1.
  • Alternatively, the wait operation may be avoided. It is contemplated to design a process where reordering of the write operations (or stores) is prevented or avoided altogether.
  • For the method of the invention, it is contemplated that the turn variables and the synchronization counters will have the same bit width. When the same bit width is used, implementation of the method of the invention is greatly facilitated. As should be appreciated by those skilled in the art, in a binary system, because of the finite length of words, the synchronization counter will eventually “roll-over”, i.e., transition from a non-zero bit pattern (i.e., generally all 1s) to an all-zero bit pattern (including only 0s). To facilitate implementation of the method of the invention, the turn variable relies on the same bit width so that the turn variable will “roll over” at the same time (or in the same iteration) as the synchronization counter. This avoids instances where the synchronization counter and the turn variable do not have the same bit width during any given iteration.
  • As noted above, there are several desirable results that may be obtained when the processing method of the invention is employed.
  • Reference is now made to the figures that are a part of the description of the invention. There are four embodiments of the method of the invention that are illustrated in the figures. The first embodiment is illustrated in FIG. 1. The second embodiment is illustrated in FIG. 2. The third embodiment is illustrated in FIGS. 3 and 4. The fourth embodiment is illustrated in FIGS. 5-7. As noted herein, these methods are merely exemplary of the scope of the invention.
  • As noted above, the present invention is intended to be applied to processing environments that include several processors. Each processor is intended to execute at least one mutex. To facilitate execution of instructions by each processor, a synchronization counter is provided for each processor.
  • Referring now to FIG. 1, the first embodiment of the method of the invention is described. In this first embodiment, the method 10 provides at least one sequence of values to a plurality of processors. The method 10 begins at 12. At 14, the method associates a sequence generator with memory location. The sequence generator is from one or more sequence generators and is configured to generate the sequence of values. Then, at 16, the method 10 enables one or more read accesses to the memory location by a processor. The processor is one from a plurality of processors. At 18, in response to enabling the read access, the method executes the sequence generator to return a first value from the sequence of values to the processor. At 20, after executing the sequence generator, the method 10 advances the sequence generator so that the subsequent read access generates a second value. This second value is sequentially subsequent to the first value. At 22, the method 10 ends.
  • With respect to the sequence generator is an N-bit counter, the sequence of values, the sequence encompasses values in the following set: {0, 1, . . . , 2N−1, 0, 1, . . . , 2N−1, . . . }. As should be apparent, N is an integer. It is intended in this variation of the method 10 that the sequence of values be sequentially incremented from 0 to a 2N−1. In other contemplated variations, other sequences may be employed without departing from the scope of the invention.
  • The method 10 may be further varied by enabling a write access to the memory location to store a write value. In response to enabling the write access, the method 10 reconfigures the sequence generator to advance from a different value based on the write value. It is contemplated that the sequence generator may advance from the write value as well. If this variation is employed, a read access after the write access may return the write value. In another variation, a read access after the write access may return a value sequentially subsequent to the write value.
  • Referring to FIG. 2, the second embodiment of the method of the invention is illustrated. The method 24 begins at 26. At 28, the method 24 proceeds to associate a sequence generator with each mutex from generating a sequence starting with a first value. It is contemplated that the mutex will be one of a plurality of mutexes and that the sequence of values will be one of a plurality of sequences. At 30, a turn indicator is associated with each mutex. In one contemplated variation, the first value of the turn indicator is initialized to the first value from the sequence of values. At 32, when entering a critical section of the code associated with the mutex, the method 24 accesses the sequence generator to read a second value from the sequence of values. At 34, which is also a part of the method 24, when entering a critical section of the code, the method waits until the turn indicator equals the second value before accessing the critical section of the code. At 36, when exiting the critical section of the code, the method 24 sets the turn indicator to a third value subsequent to the second value. The method ends at 38.
  • Concerning the method 24, there are a number of variations that are contemplated to fall within the scope of the invention. For example, the turn indicator may include several turn indicators. If so, when entering the critical section of code, the method 24 waits on at least one of the several turn indicators. When exiting the critical section of code, all of the turn indicators are set to the third value in the sequence of values. In this variation, it is contemplated that the number of the turn indicators equals the number of the processors. Moreover, the first value is contemplated to be equal to 0.
  • In another variation of the method 24, the second value is contemplated to be greater than the first value by an integer equal to or greater than 1. Moreover, as discussed, the second value may be less or equal to an integer, N. If the second value is equal to or greater than N, the second value is restarted to the first value. As should be apparent, when the second value is equal to or greater than N, the second value may be restarted to 0. Moreover, in one embodiment, it is contemplated that the second value will be greater than the first value by 1. Of course, as mentioned, the second value may be greater than 1, depending upon the specific implementation of the method 24.
  • Consistent with this approach, it is contemplated that the turn indicator that a processor accesses is located in memory positions local to the processor. Moreover, it is contemplated that each of the plurality of processors will be initialized simultaneously, although this is not required to practice each contemplated embodiment of the invention. Also, as may be appreciated by those skilled in the art, each of the processors may operate disjunctively after initialization.
  • In still other contemplated embodiments of the invention, all of the processors may share common operating attributes. Alternatively, one or more of the processors may have operating attributes that differ from operating attributes of others of the processors. While not required to practice the invention, the processors may operate in parallel. In addition, in at least one contemplated embodiment, the synchronization generator and the turn indicator may have the same bit width, as discussed above.
  • FIG. 3 illustrates a third embodiment of the method of the invention. In this figure, the method 40 is provided specifically in connection with a plurality of processors and a plurality of mutexes, thereby encompassing at least one specific application of the invention. The method 40 begins at 42. Following 42, the method 40 proceeds to 44 where a synchronization counter is associated with each processor. In the method 40, the synchronization counters may be the same as the synchronization generator as discussed in connection with the method 10. Each of the synchronization counters is a variable i, where iε{0 . . . N−1}. N is an integer. Therefore, as may be appreciated by those skilled in the art, i encompasses a range of N integer values. So that the synchronization counters, i, are readily accessible by each processor, the synchronization counters are each assigned different memory locations at 46. Following 46, Loop A is executed at 48. Loop A is discussed below in connection with FIG. 4. After Loop A is executed, the method 40 proceeds to 50, where Loop A is repeated if (i+k)<(N−1).
  • Loop A, which is illustrated in FIG. 4, has been provided with reference numeral 54. Loop A begins at 56. Then, at 58, the synchronization counter, i, is accessed in response to at least one of a load, a read, or an input instruction. While other instructions may be executed as a part of Loop A, if these other instructions do not involve the critical section of code, these other instructions will not access the synchronization counter.
  • Loop A then proceeds to 60 where the value of the synchronization counter, i, is associated with an instruction. At 62, an assessment is made if the instruction will be permitted access to a critical section of code. This assessment may be made according to any of a number of different methodologies, as should be appreciated by those skilled in the art. However, for the invention, the assessment is based at least in part upon the value of the synchronization counter associated with the particular instruction. After the assessment at 62, Loop A proceeds to 64, where the synchronization counter, i, is incremented in response to being accessed. The synchronization counter is incremented by a value k, where kε{0 . . . N−1}. Loop A then ends at 66.
  • FIG. 5 illustrates the fourth embodiment of the method of the invention. While some of the features of the third embodiment are repeated for the fourth embodiment, these features are provided with different identifying reference numerals for ease of this discussion.
  • The method 68 begins at 70. At 72, the method 68 proceeds to associate the synchronization counter, i, with each processor, just as in the method 40. Then, at 74, a different memory location is associated with each of the synchronization counters. In the method 68, a turn[i] is provided at 76. Turn[i] is a variable that is used to grant the instruction access to a critical section of code. At 78, my_turn[i] is provided. My_turn[i] is a variable that identifies others of the instructions requesting access to the critical section of code. At 80, the method 68 proceeds to execute Loop B, which is discussed below in connection with FIGS. 6 and 7. After Loop B is completed, the method 68 proceeds to 82 where an assessment is made if Loop B should be repeated. As with the method 40, Loop B is repeated if (i+k)<(N−1).
  • Loop B is now described in connection with FIGS. 6 and 7. Loop B, which is designated by reference numeral 86, begins at 88. From 88, Loop B proceeds to 90, where the synchronization counter is accessed for any of a load, an input, or a read instruction. Loop B then proceeds to 92, where a value of the synchronization counter is associated with the instruction. Then, Loop B evaluates permission of the instruction to access a critical section of the code. As a part of this evaluation, at 96, i in my_turn[i] is equated with i. Then, at 98, a determination is made if i in my_turn[i] is the same as i in turn [i]. The reference numeral 100 indicates that Loop B continues in FIG. 7.
  • Reference is now made to FIG. 7. At 102, if i in my_turn[i] is the same as the i in turn[i], the instruction will be granted access to the critical section of the code. On the other hand, as indicated at 104, if i in my_turn[i] is not the same i as the i in turn[i], the instruction will be denied access to the critical section of the code. As noted above, this is the beginning of a wait period for those instructions (or threads) requiring access to the code while an earlier instruction is accessing the critical section of the code. At 106, Loop B proceeds to increment i by the value k, as in the previous embodiment. In this loop, however, there is an additional step, at 108, where turn[i] is incremented by equating turn[i] with my_turn[i+k]. Loop B then ends at 110.
  • With respect to the method 68, i, turn[i], and my_turn[i] all may be initialized to a predetermined initialization value. In one contemplated embodiment, the predetermined initialization value is 0.
  • As may be appreciated by those skilled in the art, for either of the methods 40 and 68, k may equal 1. Of course, other values may also be used. For either of the methods, Loops A and B may be repeated until i≧N−1.
  • As noted, for each of the plurality of processors, the synchronization counter, turn[i], and my_turn[i] are located in memory positions that are local to the associated processor. This increases the efficiencies of the respective processors.
  • With respect to the various embodiments described herein, it is possible to implement mutual exclusion between different processors using the synchronization counters. To do this, a “lock” may be implemented for the synchronization counters. A “lock” is associated with a particular synchronization counter address and a turn variable. To acquire a “lock”, the process reads the counter and waits until turn reaches that counter value. Once process finishes, the process increments turn, as discussed. In pseudo-code, this operation is described as follows, as set forth below in Code Segment #3. It is noted that Code Segment #3 is a simplified expression of Code Segment #2, above.
  • Code Segment #3 my = *counter // read the counter loop while( turn != my ) // wait for it critical section turn = my+1;
  • As is apparent from Code Segment #3, and as should be appreciated by those skilled in the art, a lock is most easily implemented in a situation where there is no contention between the different synchronization counters. As can be seen, in the no-contention case, acquiring the lock needs exactly two (2) long latency loads. The first long latency load occurs when the synchronization counters read information. The second long latency occurs when the determination is made if it is the turn of the process.
  • A difficulty may be presented when circumstances arise where it is possible that, if there is contention and the lock is a spin-lock, the process may repeatedly try to access the remote memory. If this occurs, it is possible that the process may incur long latencies to access the turn variable. This would, of course, result in higher memory traffic that will slow execution of the process.
  • A system-on-chip (“SoC”) is typically a NUMA architecture, where each processor has some local memory that it can access with low latency. Therefore, in a preferred situation, it is desirable to have the turn variable in local memory, as discussed. This can be accomplished by keeping a copy of turn in each processors local memory. The pseudo-code for this approach is provided in Code Segment #4, below.
  • Code Segment #4 my = *counter // read the counter loop while( turn[i] != my ) // local copy critical section for j = 1 to N do  turn[j] = my+1; // update all copies end
  • In Code Segment #4, the variable, i, refers to the processor that attempts to enter the critical section. Unfortunately, in a SoC system, generally the memory ordering is such that stores from different processors may execute in any order. Consequently, it is unlikely, but possible, that processor, j, will complete a critical section and will write M to turn[i]. Then, the processor, k, may complete its access of the critical section, writing M+1 to turn[i]. However, when processor, k, access the critical section, the processor's stores may be written in the opposite order to those of the processor, j, so that turn[i] receives final value M. This, as should be apparent to those skilled in the art, may lead to a dead-lock.
  • The way around this problem is to keep a local copy of turn with a slot for each processor. When updating each copy of a turn, a processor is intended to write to its own slot. All copies of turn indicator are then updated. This update may occur simultaneously. In that case, the pseudo-code is expressed as shown below in Code Segment #5.
  • Code Segment #5 my = *counter // read the counter loop while( turn[i][1] != my   and turn[i][2] != my   ...   and turn[i][N] != my ) critical section for j = 1 to N do  turn[j][i] = my+1; // update all copies end
  • With this approach, it is expected that only one long latency load is required to acquire the lock. This allows the process to acquire an uncontested lock in less than 100 ns, in many circumstances. As should be apparent to those skilled in the art, this approach also has other advantages that are not discussed herein.
  • There are numerous equivalents and variations of the invention that should be appreciated by those skilled in the art that are not described herein. It is intended that the invention encompass those equivalents and variations. The invention is not intended to be limited solely to the embodiments described herein.

Claims (20)

1. A method for providing at least one sequence of values to a plurality of processors, comprising:
associating a sequence generator from one or more sequence generators with a memory location, the sequence generator being configured to generate the at least one sequence of values;
enabling one or more read accesses of the memory location by a processor from the plurality of processors;
in response to enabling the read access, executing the sequence generator to return a first value from the sequence of values to the processor; and
after executing the sequence generator, advancing the sequence generator so that the next access generates a second value from the sequence of values,
wherein the second value is sequentially subsequent to the first value.
2. The method of claim 1, wherein the sequence generator is an N-bit counter, the sequence of values encompasses {0, 1, . . . , 2N−1, 0, 1, . . . , 2N−1, . . . }, and N is an integer.
3. The method of claim 1, further comprising:
enabling a write access of the memory location by a processor from the plurality of processors to store a write value; and
in response to enabling the write access, reconfiguring the sequence generator to advance from a different value of the sequence of values based on the write value.
4. The method of claim 3, wherein:
a read access following the write access returns the write value.
5 The method of claim 3, wherein:
a read access following the write access returns a value sequentially subsequent to the write value.
6. A method executed by a plurality of processors for a plurality of mutexes, comprising:
associating a sequence generator with each mutex, each sequence generator being adapted to generate a value from a sequence of values, starting from a first value;
associating a turn indicator with each mutex, wherein a first value of the turn indicator is initialized to the first value from the sequence of values;
when entering a critical section of code associated with the mutex,
accessing the associated sequence generator to read a second value from the sequence of values, and
waiting until the associated turn indicator equals the said second value from the sequence of values before accessing the critical section of code; and
when exiting the critical section, setting the turn indicator to a third value subsequent to the second value in the sequence of values.
7. The method of claim 6, wherein the turn indicator comprises a plurality of turn indicators, the method further comprising:
when entering the critical section of code, waiting on at least one of the plurality of turn indicators; and
when exiting the critical section of code, setting all of the plurality of turn indicators to the third value in the sequence of values.
8 The method of claim 7, wherein the number of the turn indicators equals the number of the processors.
9. The method of claim 8, wherein the first value is 0.
10. The method of claim 6, wherein:
the second value is greater than the first value by an integer equal to or greater than 1,
the second value is less than an integer, N, and
if the second value is equal to or greater than N, the second value is restarted to the first value.
11. The method of claim 10, wherein:
if the second value is equal to or greater than N, the second value is restarted to 0.
12. The method of claim 11, wherein:
the second value is greater than the first value by 1.
13. The method of claim 7, wherein the turn indicator that a processor accesses is located in memory positions local to the processor.
14. The method of claim 6, wherein each of the plurality of processors is initialized simultaneously.
15. The method of claim 14, wherein each of the plurality of processors operates disjunctively after initialization.
16. The method of claim 6, wherein all of the plurality of processors share common operating attributes.
17. The method of claim 6, wherein at least one of the plurality of processors has operating attributes that differ from operating attributes of others of the plurality of processors.
18. The method of claim 6, wherein the plurality of processors operate in parallel.
19. The method of claim 7, wherein the synchronization generator and the turn indicator have the same bit width.
20. The method of claim of claim 7, wherein all of the plurality of turn indicators are set to the third value simultaneously.
US12/362,329 2008-01-30 2009-01-29 Method for enabling multi-processor synchronization Active 2030-11-10 US8539188B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US2464908P true 2008-01-30 2008-01-30
US12/362,329 US8539188B2 (en) 2008-01-30 2009-01-29 Method for enabling multi-processor synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US12/362,329 US8539188B2 (en) 2008-01-30 2009-01-29 Method for enabling multi-processor synchronization

Publications (2)

Publication Number Publication Date
US20090193279A1 true US20090193279A1 (en) 2009-07-30
US8539188B2 US8539188B2 (en) 2013-09-17

Family

ID=40900437

Family Applications (1)

Application Number Title Priority Date Filing Date
US12/362,329 Active 2030-11-10 US8539188B2 (en) 2008-01-30 2009-01-29 Method for enabling multi-processor synchronization

Country Status (4)

Country Link
US (1) US8539188B2 (en)
EP (1) EP2250539A1 (en)
KR (1) KR20100120133A (en)
WO (1) WO2009097444A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090235032A1 (en) * 2008-03-13 2009-09-17 Sandbridge Technologies, Inc. Method for achieving power savings by disabling a valid array
US20100122068A1 (en) * 2004-04-07 2010-05-13 Erdem Hokenek Multithreaded processor with multiple concurrent pipelines per thread
US20110004718A1 (en) * 2009-07-02 2011-01-06 Ross John Stenfort System, method, and computer program product for ordering a plurality of write commands associated with a storage device
US8732382B2 (en) 2008-08-06 2014-05-20 Qualcomm Incorporated Haltable and restartable DMA engine

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6071541A (en) 1998-07-31 2000-06-06 Murad; Howard Pharmaceutical compositions and methods for managing skin conditions
US6673374B2 (en) 1998-07-31 2004-01-06 Howard Murad Pharmaceutical compositions and methods for managing skin conditions
JP2009068906A (en) * 2007-09-11 2009-04-02 Panasonic Corp Distance measuring apparatus

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6842848B2 (en) * 2002-10-11 2005-01-11 Sandbridge Technologies, Inc. Method and apparatus for token triggered multithreading
US20050050374A1 (en) * 2003-08-25 2005-03-03 Tomohiro Nakamura Method for synchronizing processors in a multiprocessor system
US20050081204A1 (en) * 2003-09-25 2005-04-14 International Business Machines Corporation Method and system for dynamically bounded spinning threads on a contested mutex
US6904511B2 (en) * 2002-10-11 2005-06-07 Sandbridge Technologies, Inc. Method and apparatus for register file port reduction in a multithreaded processor
US6912623B2 (en) * 2002-06-04 2005-06-28 Sandbridge Technologies, Inc. Method and apparatus for multithreaded cache with simplified implementation of cache replacement policy
US6925643B2 (en) * 2002-10-11 2005-08-02 Sandbridge Technologies, Inc. Method and apparatus for thread-based memory access in a multithreaded processor
US6968445B2 (en) * 2001-12-20 2005-11-22 Sandbridge Technologies, Inc. Multithreaded processor with efficient processing for convergence device applications
US6971103B2 (en) * 2002-10-15 2005-11-29 Sandbridge Technologies, Inc. Inter-thread communications using shared interrupt register
US6990557B2 (en) * 2002-06-04 2006-01-24 Sandbridge Technologies, Inc. Method and apparatus for multithreaded cache with cache eviction based on thread identifier
US20060095729A1 (en) * 2004-04-07 2006-05-04 Erdem Hokenek Multithreaded processor with multiple concurrent pipelines per thread
US20060282839A1 (en) * 2005-06-13 2006-12-14 Hankins Richard A Mechanism for monitoring instruction set based thread execution on a plurality of instruction sequencers
US20070067770A1 (en) * 2005-09-16 2007-03-22 Thomasson Christopher M System and method for reduced overhead in multithreaded programs
US7251737B2 (en) * 2003-10-31 2007-07-31 Sandbridge Technologies, Inc. Convergence device with dynamic program throttling that replaces noncritical programs with alternate capacity programs based on power indicator
US7428567B2 (en) * 2003-07-23 2008-09-23 Sandbridge Technologies, Inc. Arithmetic unit for addition or subtraction with preliminary saturation detection
US7475222B2 (en) * 2004-04-07 2009-01-06 Sandbridge Technologies, Inc. Multi-threaded processor having compound instruction and operation formats
US7593978B2 (en) * 2003-05-09 2009-09-22 Sandbridge Technologies, Inc. Processor reduction unit for accumulation of multiple operands with or without saturation
US20090276432A1 (en) * 2004-11-17 2009-11-05 Erdem Hokenek Data file storing multiple data types with controlled data access
US20100115527A1 (en) * 2006-11-10 2010-05-06 Sandbridge Technologies, Inc. Method and system for parallelization of pipelined computations
US7797363B2 (en) * 2004-04-07 2010-09-14 Sandbridge Technologies, Inc. Processor having parallel vector multiply and reduce operations with sequential semantics
US20100241834A1 (en) * 2007-11-05 2010-09-23 Sandbridge Technologies, Inc. Method of encoding using instruction field overloading
US20100299319A1 (en) * 2007-08-31 2010-11-25 Sandbridge Technologies, Inc. Method, apparatus, and architecture for automated interaction between subscribers and entities

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090078790A (en) 2006-09-26 2009-07-20 샌드브리지 테크놀로지스, 인코포레이티드 Software implementation of matrix inversion in a wireless communication system

Patent Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6968445B2 (en) * 2001-12-20 2005-11-22 Sandbridge Technologies, Inc. Multithreaded processor with efficient processing for convergence device applications
US6990557B2 (en) * 2002-06-04 2006-01-24 Sandbridge Technologies, Inc. Method and apparatus for multithreaded cache with cache eviction based on thread identifier
US6912623B2 (en) * 2002-06-04 2005-06-28 Sandbridge Technologies, Inc. Method and apparatus for multithreaded cache with simplified implementation of cache replacement policy
US6904511B2 (en) * 2002-10-11 2005-06-07 Sandbridge Technologies, Inc. Method and apparatus for register file port reduction in a multithreaded processor
US6925643B2 (en) * 2002-10-11 2005-08-02 Sandbridge Technologies, Inc. Method and apparatus for thread-based memory access in a multithreaded processor
US6842848B2 (en) * 2002-10-11 2005-01-11 Sandbridge Technologies, Inc. Method and apparatus for token triggered multithreading
US6971103B2 (en) * 2002-10-15 2005-11-29 Sandbridge Technologies, Inc. Inter-thread communications using shared interrupt register
US7593978B2 (en) * 2003-05-09 2009-09-22 Sandbridge Technologies, Inc. Processor reduction unit for accumulation of multiple operands with or without saturation
US7428567B2 (en) * 2003-07-23 2008-09-23 Sandbridge Technologies, Inc. Arithmetic unit for addition or subtraction with preliminary saturation detection
US20050050374A1 (en) * 2003-08-25 2005-03-03 Tomohiro Nakamura Method for synchronizing processors in a multiprocessor system
US20050081204A1 (en) * 2003-09-25 2005-04-14 International Business Machines Corporation Method and system for dynamically bounded spinning threads on a contested mutex
US7251737B2 (en) * 2003-10-31 2007-07-31 Sandbridge Technologies, Inc. Convergence device with dynamic program throttling that replaces noncritical programs with alternate capacity programs based on power indicator
US20100122068A1 (en) * 2004-04-07 2010-05-13 Erdem Hokenek Multithreaded processor with multiple concurrent pipelines per thread
US20100199075A1 (en) * 2004-04-07 2010-08-05 Erdem Hokenek Multithreaded processor with multiple concurrent pipelines per thread
US7475222B2 (en) * 2004-04-07 2009-01-06 Sandbridge Technologies, Inc. Multi-threaded processor having compound instruction and operation formats
US20060095729A1 (en) * 2004-04-07 2006-05-04 Erdem Hokenek Multithreaded processor with multiple concurrent pipelines per thread
US20100199073A1 (en) * 2004-04-07 2010-08-05 Erdem Hokenek Multithreaded processor with multiple concurrent pipelines per thread
US7797363B2 (en) * 2004-04-07 2010-09-14 Sandbridge Technologies, Inc. Processor having parallel vector multiply and reduce operations with sequential semantics
US20090276432A1 (en) * 2004-11-17 2009-11-05 Erdem Hokenek Data file storing multiple data types with controlled data access
US20060282839A1 (en) * 2005-06-13 2006-12-14 Hankins Richard A Mechanism for monitoring instruction set based thread execution on a plurality of instruction sequencers
US20070067770A1 (en) * 2005-09-16 2007-03-22 Thomasson Christopher M System and method for reduced overhead in multithreaded programs
US20100115527A1 (en) * 2006-11-10 2010-05-06 Sandbridge Technologies, Inc. Method and system for parallelization of pipelined computations
US20100299319A1 (en) * 2007-08-31 2010-11-25 Sandbridge Technologies, Inc. Method, apparatus, and architecture for automated interaction between subscribers and entities
US20100241834A1 (en) * 2007-11-05 2010-09-23 Sandbridge Technologies, Inc. Method of encoding using instruction field overloading

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100122068A1 (en) * 2004-04-07 2010-05-13 Erdem Hokenek Multithreaded processor with multiple concurrent pipelines per thread
US20100199073A1 (en) * 2004-04-07 2010-08-05 Erdem Hokenek Multithreaded processor with multiple concurrent pipelines per thread
US20100199075A1 (en) * 2004-04-07 2010-08-05 Erdem Hokenek Multithreaded processor with multiple concurrent pipelines per thread
US8074051B2 (en) 2004-04-07 2011-12-06 Aspen Acquisition Corporation Multithreaded processor with multiple concurrent pipelines per thread
US8892849B2 (en) 2004-04-07 2014-11-18 Qualcomm Incorporated Multithreaded processor with multiple concurrent pipelines per thread
US8918627B2 (en) 2004-04-07 2014-12-23 Qualcomm Incorporated Multithreaded processor with multiple concurrent pipelines per thread
US8959315B2 (en) 2004-04-07 2015-02-17 Qualcomm Incorporated Multithreaded processor with multiple concurrent pipelines per thread
US20090235032A1 (en) * 2008-03-13 2009-09-17 Sandbridge Technologies, Inc. Method for achieving power savings by disabling a valid array
US8762641B2 (en) 2008-03-13 2014-06-24 Qualcomm Incorporated Method for achieving power savings by disabling a valid array
US8732382B2 (en) 2008-08-06 2014-05-20 Qualcomm Incorporated Haltable and restartable DMA engine
US20110004718A1 (en) * 2009-07-02 2011-01-06 Ross John Stenfort System, method, and computer program product for ordering a plurality of write commands associated with a storage device
US8930606B2 (en) 2009-07-02 2015-01-06 Lsi Corporation Ordering a plurality of write commands associated with a storage device

Also Published As

Publication number Publication date
KR20100120133A (en) 2010-11-12
EP2250539A1 (en) 2010-11-17
US8539188B2 (en) 2013-09-17
WO2009097444A1 (en) 2009-08-06

Similar Documents

Publication Publication Date Title
US9135178B2 (en) Efficient non-blocking K-compare-single-swap operation
US9262173B2 (en) Critical section detection and prediction mechanism for hardware lock elision
JP5902209B2 (en) Vector instructions that enable efficient synchronous and parallel reduction operations
Boyd-Wickizer et al. Non-scalable locks are dangerous
Shavit Data structures in the multicore age
Li et al. Algorithmic improvements for fast concurrent cuckoo hashing
US9081803B2 (en) Performance of RCU-based searches and updates of cyclic data structures
US8997110B2 (en) Resolving RCU-scheduler deadlocks
US9002791B2 (en) Logging modifications to a variable in persistent memory
Kogan et al. Wait-free queues with multiple enqueuers and dequeuers
US8375175B2 (en) Fast and efficient reacquisition of locks for transactional memory systems
US8041926B2 (en) Transparent concurrent atomic execution
US8973004B2 (en) Transactional locking with read-write locks in transactional memory systems
US4604694A (en) Shared and exclusive access control
Fraser et al. Concurrent programming without locks
US6167424A (en) Method and apparatus for concurrent thread synchronization
US7353346B2 (en) Read-copy-update (RCU) operations with reduced memory barrier usage
Kogan et al. A methodology for creating fast wait-free data structures
Crain et al. A contention-friendly binary search tree
US7818306B2 (en) Read-copy-update (RCU) operations with reduced memory barrier usage
US7058636B2 (en) Method for prefetching recursive data structure traversals
US7644238B2 (en) Timestamp based transactional memory
Spear et al. A comprehensive strategy for contention management in software transactional memory
Shavit et al. Software transactional memory
Calciu et al. NUMA-aware reader-writer locks

Legal Events

Date Code Title Description
AS Assignment

Owner name: SANDBRIDGE TECHNOLOGIES INC., NEW YORK

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:MOUDGILL, MAYAN;KALASHNIKOV, VITALY;SENTHILVELAN, MURUGAPPAN;AND OTHERS;REEL/FRAME:022355/0946

Effective date: 20090225

AS Assignment

Owner name: ASPEN ACQUISITION CORPORATION, CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:SANDBRIDGE TECHNOLOGIES, INC.;REEL/FRAME:025094/0793

Effective date: 20100910

AS Assignment

Owner name: QUALCOMM INCORPORATED, CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:ASPEN ACQUISITION CORPORATION;REEL/FRAME:029388/0394

Effective date: 20120927

STCF Information on status: patent grant

Free format text: PATENTED CASE

REMI Maintenance fee reminder mailed
SULP Surcharge for late payment
FPAY Fee payment

Year of fee payment: 4