Scalable spinlock for non-uniform memory access

By introducing local spin locks to protect global spin locks in the multi-slot NUMA system, the performance bottleneck problem caused by spin lock contention is solved, and spin lock access equalization and system scalability are improved under high load conditions.

CN109508240BActive Publication Date: 2025-08-08INTEL CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201810924486.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-09-14
Filing Date
2018-08-14
Publication Date
2025-08-08
Estimated Expiration
2038-08-14

AI Technical Summary

Technical Problem

In high-count multi-slot NUMA systems, spin lock migration and cache line invalidation problems caused by spin lock contention affect the scalability of the system, especially when processing cores on different slots try to acquire the same spin lock, resulting in memory access inhomogeneity and performance bottlenecks.

Method used

Scalable spin lock technology is adopted to protect the global spin lock by allocating local spin locks on each slot. The process first acquires local spin locks when contention is high to reduce direct contention on the global spin lock. The local spin lock is randomly selected to avoid slot preferential treatment and achieve balanced access to the global spin lock.

Benefits of technology

It improves the spin lock access efficiency of high-count multi-slot systems, reduces spin lock contention, and improves the scalability and performance of the system. Especially under high load conditions, it automatically adapts to the global spin lock acquisition method, avoids invalid waiting of processing cores and unnecessary migration of cache lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109508240B_ABST
    Figure CN109508240B_ABST
Patent Text Reader

Abstract

Disclosed are techniques for providing scalable spinlocks for non-uniform memory access (NUMA). In some examples, a global spinlock used to protect access to a shareable resource is protected by multiple local spinlocks, each of which is configured to control access to the global spinlock. In a multi-socket NUMA system, the global spinlock is assigned to one of the sockets, while the local spinlocks are distributed across multiple sockets. In some embodiments, a local spinlock is assigned to each of the multiple sockets. In other embodiments, the multiple local spinlocks may be evenly distributed across the NUMA sockets. When contention for the global spinlock is low, a process may attempt to acquire the global spinlock directly. Conversely, when contention for the global spinlock is high, a process may first acquire one of the local spinlocks associated with the global spinlock before attempting to acquire the global spinlock.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] A multi-socket non-uniform memory access (NUMA) system includes multiple processor sockets with locally attached memory. In these NUMA multi-socket systems, system memory is distributed among multiple processor sockets, and each processor socket manages an individual subset of the entire system memory pool (e.g., locally attached memory). A consequence of the distributed nature of system memory is that memory may have different latencies or "time costs" for accessing memory. That is, a processing core within a processor may have lower latency access to memory local to the processor (memory attached to that processor) than to accessing memory that is not local to the processor (e.g., memory attached to a different processor).

[0002] Many enterprise applications, such as relational database management systems (RDBMS), are installed on systems with 2 to 4 processor sockets. The demand for increased processing has created a need to scale applications on high-count multi-socket systems (e.g., systems with 8, 16, 32, and more processor sockets). BRIEF DESCRIPTION OF THE DRAWINGS

[0003] The accompanying drawings are not intended to be drawn to scale.In the drawings, each identical or nearly identical component illustrated in various figures is represented by a like numeral as will be understood when read in the context.

[0004] Figure 1 An example deployment of a scalable spinlock in a multi-socket system arranged in accordance with at least some embodiments described herein is illustrated.

[0005] Figure 2 Illustrate an arrangement according to at least some embodiments described herein Figure 1 Selected components of a multi-socket system.

[0006] Figure 3 Illustrated are selected fields of a global spinlock structure arranged in accordance with at least some embodiments described herein.

[0007] Figure 4 is a flow diagram illustrating an example process for deploying scalable spinlocks to protect shareable resources, arranged in accordance with at least some embodiments described herein.

[0008] Figure 5A and 5B is a flow diagram illustrating an example process for acquiring a global spin lock protecting a shareable resource, arranged in accordance with at least some embodiments described herein.

[0009] Figure 6Illustrated are selected components of an example computing system that may be used to perform any of the techniques variously described in this disclosure in accordance with at least some embodiments described herein.

[0010] In the following detailed description, reference is made to the accompanying drawings, which form a part of this document. In the drawings, similar symbols generally identify similar components unless the context indicates otherwise. The exemplary embodiments described in the detailed description, drawings, and claims are not intended to be limiting. Other embodiments may be used and other changes may be made without departing from the spirit or scope of the subject matter presented herein. Aspects of the present disclosure as generally described herein and illustrated in the drawings can be arranged, replaced, combined, separated, and designed in a variety of different configurations, which are expressly contemplated herein. DETAILED DESCRIPTION

[0011] Locks (latches) can be used to control access to sharable resources. Locks are synchronization mechanisms used to enforce access restrictions on sharable resources and are designed to implement mutually exclusive concurrency control strategies. For example, locks can be used to protect the integrity of sharable resources. A process (or thread) that needs to access a protected resource acquires a lock before accessing the protected resource. Once a process has acquired the lock, the protected resource becomes "locked" (the lock is locked), and exclusive access to the protected resource is provided to that process. Any other process that needs to access the locked protected resource must wait. When exclusive access to the locked protected resource is no longer required, the process "holding" the lock (i.e., the process that acquired the lock) releases the lock, which "unlocks" the protected resource (unlocks the lock). Other processes can then acquire the lock to obtain exclusive access to the protected resource. Spinlocks are locks that cause the process attempting to acquire a spinlock to simply wait in a loop (e.g., spinning) while repeatedly checking to see if the spinlock is available. Spinlocks are suitable for instances where the expected wait (spin) time is very short (e.g., nanoseconds) because the process remains active (e.g., consuming a large percentage of the processing cores on which the process is running) but does not perform useful work while spinning.

[0012] As previously mentioned, in high-count multi-socket systems, processing cores on a socket can access memory local to the core, or they can also access memory on a remote (different) core with higher latency. For applications that scale on these higher multi-socket systems, access to shareable resources must be successfully synchronized across multiple sockets. On systems with large socket counts, there can be considerable differences in latency. The result of the different latencies is that processing cores running on sockets that are local to the spinlock enjoy local preference for spinlocks compared to processing cores running on sockets that are not local to the spinlock. This can cause processing cores running on sockets that are not local to the spinlock to be spinlock "starved" (and shareable resources are being protected by spinlocks) during periods of increased spinlock contention. Therefore, there is a challenge with spinlock migration when processing cores on different sockets attempt to acquire the same spinlock, which results in the transfer of cache lines across the system and the invalidation of cache lines on processing cores attempting to acquire the same spinlock. This can lead to increased spinlock contention on high-count multi-socket systems and ultimately to a lack of scalability, where this contention and / or starvation is on shareable resources that are important for scalability. Scaling spinlocks is a key aspect of scaling applications (including enterprise applications) on high-count multi-socket systems.

[0013] To this end, a technique for providing scalable spinlocks for non-uniform memory access (NUMA) is disclosed. Scalability is achieved by surrounding a global spinlock with multiple local spinlocks, each of which is configured to control access to the global spinlock. In this way, the global spinlock is protected by multiple local spinlocks. For example, in a NUMA architecture, a global spinlock is allocated to one of the NUMA sockets and protected by multiple local spinlocks. In some embodiments, one local spinlock is allocated to each NUMA socket. In other embodiments, the multiple local spinlocks may be evenly distributed across the NUMA sockets. Similar to current implementations of spinlocks, a process can proceed directly to acquire the global spinlock without first acquiring a local spinlock. This ensures the same level of performance as current implementations when the spinlock is not busy (contention on the spinlock is low). Once a process directly acquires the global spinlock, the process sets a flag indicating that the global spinlock was acquired directly without going through one of the local spinlocks protecting the global spinlock. For example, a flag indicating "global acquisition" can be set to indicate that the global spinlock is directly acquired. Other processes attempting to acquire the global spinlock can read the flag indicating that the global spinlock is globally acquired. In this state (where the global spinlock is directly acquired), other processes can also attempt to directly acquire the global spinlock. However, once a process has spun a predetermined number of times in an unsuccessful attempt to acquire the global spinlock, the process then attempts to acquire one of the local spinlocks protecting the global spinlock. This local spinlock (i.e., the local spinlock the process is attempting to acquire) is randomly selected and is not necessarily the local spinlock on the same socket on which the process is executing. The random selection of local spinlocks ensures that processes running on the same socket as the global spinlock (e.g., the socket to which the global spinlock is assigned) are not given preferential treatment. If a process fails to acquire the local spinlock, the process attempts to acquire another local spinlock protecting the global spinlock. This local spinlock can also be randomly selected. Once a process acquires and holds the local spinlock protecting the global spinlock, the process can then attempt to acquire the global spinlock. If a process successfully acquires the global spin lock, the process sets a flag that indicates that all spin locks are acquired and held by local spin lock holders. For example, a flag indicating "local acquisition" can be set to indicate that the global spin lock is acquired by the local spin lock holder (acquired by the local spin lock that protects the global spin lock). Any process that checks the global spin lock and reads the flag indicating that the global spin lock is held by the local spin lock holder (the global spin lock is locally acquired) then attempts to first acquire the local spin lock without attempting to directly acquire the global spin lock. In some embodiments, the global spin lock can be configured to be acquired by the local spin lock holder as much as possible. For example, if it is known that the system is running under conditions of high global spin lock contention, the system administrator can configure the system to require a process to acquire a local spin lock before attempting to acquire the global spin lock.

[0014] One of the many technical advantages is that once the workload scales and causes global spinlock contention in the system, the system automatically adapts its approach to how it acquires the global spinlock. For example, in situations where there is no global spinlock contention, the system operates in a manner similar to current solutions. However, once contention for the global spinlock is detected, the system automatically adapts by requiring the acquisition of local spinlocks to reduce contention for the global spinlock. In situations where one local spinlock is allocated per NUMA socket, this ensures that no more than a number of processes equal to the number of NUMA sockets will attempt to acquire the global spinlock at the same time. Furthermore, because local spinlocks are randomly selected, no process is given preferential access simply because it is running on the same socket as the global spinlock. If the system is known to be operating in a situation with high latch contention (e.g., with 8 or more sockets), the system can be easily adapted through system parameters to a system in which local spinlocks are always acquired before global spinlocks.

[0015] Turning now to the accompanying drawings, Figure 1 An example deployment of a scalable spin lock in a multi-socket system 100 arranged in accordance with at least some embodiments described herein is illustrated. The multi-socket system 100 is a NUMA system in which memory access time depends on the location or distance of the memory relative to the processor. As depicted, the multi-socket system 100 includes eight sockets 102a-102h. The sockets 102a-102h may be collectively referred to herein as sockets 102 or individually as sockets 102 herein. The sockets 102 may be communicatively coupled to each other. For example, each socket 102 may communicate with each other via a point-to-point The multi-socket system 100 may be configured to connect to each of the other slots 102 using a Quick Path Interconnect (QPI) link. QPI is one suitable interconnect architecture, and other interconnect architectures are contemplated, such as other point-to-point architectures, ring architectures, and bus architectures, to name a few. The number of slots depicted in the multi-socket system 100 is for illustration only, and one skilled in the art will appreciate that a different number of slots may be present. For example, the multi-socket system 100 may include a smaller number of slots (e.g., six, four, or fewer) or a larger number of slots (e.g., sixteen, thirty-two, or more).

[0016] Multi-socket system 100 may also include a global spin lock 104 and eight local spin locks 106a-106h. Local spin locks 106a-106h may be collectively referred to as local spin locks 106 in this article, or may be individually referred to as local spin locks 106 in this article. Global spin lock 104 is assigned to one of slots 102 (particularly, slot 102a) to control access to sharable resources. Each local spin lock 106 is assigned to a corresponding slot 102 to control access to global spin lock 106. In operation, global spin lock 104 is protected by local spin lock 106, as will be explained in more detail below. According to various embodiments, global spin lock 104 and local spin lock 106 can be implemented with a combination of hardware, software, or hardware and software. In certain embodiments, global spin lock 104 and local spin lock 106 are test-and-set spin locks. A test and test and set spin lock utilizes an entry protocol (e.g., test) to wait for the lock to become free. Once the entry protocol indicates that the lock is free, a test and set operation is utilized to attempt to acquire the lock. The goal of a test and test and set spin lock is not to spin in a test and set, but to increase the likelihood of a successful test and set by utilizing the entry protocol. In other embodiments, the global spin lock 104 and the local spin lock 106 are each test and set spin locks. The test and set spin locks utilize a single shared memory location for synchronization. The test and set instruction is an instruction for writing (setting) a "1" to a memory location in a single atomic operation and returning a value from the memory location. If the value returned from the memory location is "0," the lock is acquired; otherwise, a loop (e.g., spin) is entered while waiting to acquire the lock.

[0017] Figure 2 Illustrate an arrangement according to at least some embodiments described herein Figure 12. Selected components of the multi-socket system 100 are shown in FIG. As depicted, each of the slots 102 is communicatively coupled to an interconnect 202. As described above, the interconnect 202 may be a point-to-point QPI link. The slots 102a-102h include processors 204a-204h, respectively. The processors 204a-102h may be collectively referred to herein as processors 204 or individually as processors 204. The processors 204a-204h are communicatively coupled to respective memory controllers 206a-206h, which are communicatively coupled to respective local memories 208a-208h. The memory controllers 206a-206h may be collectively referred to herein as memory controllers 206 or individually as memory controllers 206. Similarly, the memories 208a-208h may be collectively referred to herein as memories 208 or individually as memories 208. In various embodiments, additional components (not illustrated) or a subset of the illustrated components may be employed without departing from the scope of the disclosed embodiments.

[0018] Processor 204 may include any processing unit suitable for use in a multi-socket system, such as Pentium D processor, Xeon processor or any other suitable single-core or multi-core processor. The processor 204 may include any number of processors and / or processor cores configured to individually or collectively perform or direct the execution of any number of operations described in this disclosure. The memory controller 206 may be configured to control and manage the flow of data to and from the communicatively coupled memory 208. The memory controller 206 may be integrated into and become part of the respective processor 204. For example, the memory controller 206a may be integrated into and become part of the processor 204a, the memory controller 206b may be integrated into and become part of the processor 204b, and so on. The memory 208 is socket-local memory because the memory 208 is locally attached to the respective socket 102. For example, the memory 208a is locally attached to the socket 102a, the memory 208b is locally attached to the socket 102b, and so on. The memory 208 may include volatile memory, non-volatile memory, or a combination of volatile and non-volatile memory. Memory 208 may be part of the overall system memory.

[0019] Memory 206a may include a spinlock utilization module 210. Spinlock utilization module 210 may be a software application that utilizes a spinlock to control access to a sharable resource, such as a database server application. In the example operation of a scalable spinlock as described herein, the spinlock utilization module 210, which is run as a process on a processor 204a, determines that there are eight slots 102a-102h and allocates a global spinlock 104 configured to control access to a specific area of memory 208a on the slot. This is illustrated by global spinlock 104 being included in memory 208a. Simultaneously with the allocation of global spinlock 104, spinlock utilization module 210 allocates a local spinlock 106 on each slot 102. This is illustrated by local spinlocks 106a-106h being included in memory 208a-208h, respectively. Each local spinlock 106 is configured to control access to global spinlock 104. Those skilled in the art will appreciate that the spinlock utilization module 210 may allocate one or more other global spinlocks (including local spinlocks associated with each global spinlock) to protect other sharable resources in addition to the global spinlock 104 and the associated local spinlocks 106. Similarly, one or more other processes may each allocate one or more global spinlocks (including local spinlocks associated with each global spinlock) to protect sharable resources on the multi-socket system 100. Thus, the global spinlock 104 and the associated local spinlocks 106 are provided as an example of a scalable spinlock for protecting a sharable resource on the multi-socket system 100, and the multi-socket system 100 may include a large number of global spinlocks and associated local spinlocks in addition to the global spinlock 104 and the associated local spinlocks 106.

[0020] In a NUMA system such as multi-socket system 100, a process running on a core in a socket (e.g., socket 102a) can access all memory in multi-socket system 100. However, the process can more quickly access local memory attached to the socket on which the process is running (e.g., memory 208a managed by memory controller 206a on socket 102a). If the process accesses remote memory (e.g., memory attached to a different socket), the process needs to access the remote memory via a memory controller on another socket, which adds additional computational work and makes access slower.

[0021] Figure 3Selected fields of an example global spinlock structure 300, arranged according to at least some embodiments described herein, are illustrated. The global spinlock structure 300 is augmented with an indicator indicating whether the global spinlock is globally acquired or locally acquired. As depicted, the global spinlock structure 300 may include a spinlock ID 302, a global acquired flag 304, and a local acquired flag 306. The spinlock ID 302 is an identifier that uniquely identifies a global spinlock instance. The global acquired flag 304, when set, indicates that the global spinlock was acquired directly, without passing through a local spinlock. A globally acquired global spinlock is acquired directly by a process without first acquiring a local spinlock. The local acquired flag 306, when set, indicates that the global spinlock was acquired by a local spinlock holder. A locally acquired global spinlock is acquired indirectly by a process by first acquiring a local spinlock that protects the global spinlock. The global spin lock structure 300 may include other information, such as information about whether the global spin lock is "locked" or "unlocked", information about whether the global spin lock is being held by any process, and information about whether the global spin lock is being held by the current process, to name a few.

[0022] Figure 4 is a flowchart 400 illustrating an example process for deploying a scalable spin lock for a shareable resource, arranged in accordance with at least some embodiments described herein. In some embodiments, the operations, functions, or actions illustrated by the example process of flowchart 400 may be performed by multi-socket system 100, and more specifically, by Figure 2 The spin lock utilization module 210 of the flowchart 400 is executed. The operations, functions, or actions described in the corresponding blocks of the example process may also be stored as computer-executable instructions in a computer-readable medium (such as the memory 208 of the socket 102). However, it will be understood that the example process of the flowchart 400 may be performed by a process other than the spin lock utilization module 210.

[0023] As depicted in flowchart 400, an example process for deploying a scalable spinlock to protect a shareable resource may begin at block 402, where the spinlock utilization module 210 (an executing process of the spinlock utilization module 210) determines the number of sockets in a multi-socket system in which the spinlock utilization module 210 is running. For example, the number of sockets may be determined using underlying services provided by the multi-socket system.

[0024] Block 402 may be followed by block 404, in which the spinlock utilization module 210 allocates a global spinlock configured to control access to a shareable resource. Examples of shareable resources include, but are not limited to, a memory location, an interface, a device, and the like. In some embodiments, the spinlock utilization module 210 may allocate the global spinlock on the slot on which the spinlock utilization module 210 is running. In other embodiments, the spinlock utilization module 210 may allocate the global spinlock on a slot different from the slot on which the spinlock utilization module 210 is running. In a more general sense, the global spinlock may be allocated on any of the slots.

[0025] Block 404 may be followed by block 406, in which the spinlock utilization module 210 allocates a plurality of local spinlocks associated with the allocated global spinlock. Each of the plurality of local spinlocks is configured to control access to the associated global spinlock. In some embodiments, the spinlock utilization module 210 allocates a number of spinlocks equal to the number of slots, and allocates one local spinlock to each slot of a multi-slot system. For example, in the case of a multi-slot system 100, the spinlock utilization module 210 allocates eight local spinlocks, one local spinlock to each slot 102. In some embodiments, the spinlock utilization module 210 may allocate a number of spinlocks that differs from the number of slots and distribute the plurality of spinlocks among the slots. For example, the spinlock utilization module 210 may distribute the local spinlocks equally among the slots. The spinlock utilization module 210 may appropriately iterate blocks 402 and 404 to allocate scalable spinlocks (global spinlock and associated plurality of local spinlocks) to control access to other sharable resources.

[0026] Those skilled in the art will appreciate that, for this and other processes and methods disclosed herein, the functions performed in the processes and methods can be implemented in different orders. Additionally or alternatively, two or more operations can be performed at the same time. Furthermore, the actions and operations outlined are provided as examples only, and some of the actions and operations may be optional, may be combined into fewer actions and operations, or may be expanded into additional actions and operations without departing from the essence of the disclosed embodiments.

[0027] Figure 5A and 5B 5 is a flowchart 500 illustrating an example process for acquiring a global spin lock for a shareable resource arranged in accordance with at least some embodiments described herein. In some embodiments, the operations, functions, or actions illustrated by the example process of flowchart 500 may be performed by multi-socket system 100, and more specifically, by Figure 2The spin lock utilization module 210 of the flowchart 500 is executed. The operations, functions, or actions described in the corresponding blocks of the example process may also be stored as computer-executable instructions in a computer-readable medium (such as the memory 208 of the socket 102). However, it will be understood that the example process of the flowchart 500 may be performed by a process other than the spin lock utilization module 210.

[0028] As depicted by flowchart 500, an example process for acquiring a global spin lock protecting a shareable resource may begin at block 502, where the spin lock utilization module 210 (an executing process of the spin lock utilization module 210) attempts to acquire (globally acquire) a global spin lock. For example, the global spin lock may be controlling access to the shareable resource, and the spin lock utilization module 210 may attempt to acquire the global spin lock in order to access the shareable resource.

[0029] Frame 502 may be followed by decision frame 504, wherein the spinlock utilization module 210 checks to determine whether the spinlock utilization module 210 has acquired (global acquire) the global spinlock. If the spinlock utilization module 210 determines that it has acquired the global spinlock, decision frame 504 may be followed by frame 506, wherein the spinlock utilization module 210 sets a global acquire flag to indicate that the global spinlock is directly acquired without first acquiring one of the associated local spinlocks. In this example, the global spinlock is locked, and the spinlock utilization module 210 acquires exclusive use of the sharable resource. When the spinlock utilization module 210 no longer needs exclusive use of the sharable resource, the spinlock utilization module 210 may release the global spinlock.

[0030] Otherwise, if at decision block 504, the spinlock utilization module 210 determines that it has not acquired the global spinlock (the spinlock utilization module 210 has not successfully acquired the global spinlock), decision block 504 may be followed by block 508, in which the spinlock utilization module 210 spins on the global spinlock. That is, the spinlock utilization module 210 spins while repeatedly attempting to acquire the global spinlock.

[0031] Therefore, block 508 may be followed by decision block 510, in which the spinlock utilization module 210 checks the global acquired flag and the local acquired flag of the global spinlock. If, in decision block 510, the spinlock utilization module 210 determines that the global acquired flag is set (the global spinlock is being held by a process that directly acquired the global spinlock), decision block 510 may be followed by decision block 512, in which the spinlock utilization module 210 checks to determine whether the spinlock utilization module 210 has spun a specific number of times, X, in an attempt to acquire the global spinlock. The specific number X specifies a limit on the number of spins that a process may perform in an attempt to directly acquire the global spinlock. The specific number X acts as a limit so that a process does not spin indefinitely in an attempt to directly acquire the global spinlock. The specific number X may be set by a user (e.g., a programmer of the spinlock utilization module 210).

[0032] If, at decision block 512, the spinlock utilization module 210 determines that it has not spun beyond the assigned specific number X, then decision block 512 may be followed by block 508, the operation of which is described above. In this example, the spinlock utilization module 210 may continue to spin for the global spinlock (continue spinning to attempt to obtain the global spinlock). Otherwise, if the spinlock utilization module 210 determines that it has spun beyond the assigned specific number X, then decision block 512 may be followed by block 514, wherein the spinlock utilization module 210 attempts to obtain the local spinlock associated with the global spinlock. In this example, the spinlock utilization module 210 may no longer continue to spin for the global spinlock (cannot continue spinning to attempt to obtain the global spinlock), but needs to first obtain one of the local spinlocks associated with the global spinlock. The local spinlock associated with the global spinlock is configured to protect access to the global spinlock. In some embodiments, the local spin lock is randomly selected from a plurality of local spin locks associated with the global spin lock. For example, the processor on which the spin lock utilization module 210 executes may provide a processor instruction (CPU instruction) that may be used to randomly select one of the local spin locks.

[0033] Referring again to decision block 510, if the spinlock utilization module 210 determines that the local acquire flag is set (the global spinlock is being held by a process that has first acquired one of the local spinlocks associated with the global spinlock), then decision block 510 may be followed by block 514, in which the spinlock utilization module 210 attempts to acquire the local spinlock associated with the global spinlock. In this example, the spinlock utilization module 210 knows that it needs to first acquire one of the local spinlocks associated with the global spinlock before attempting to acquire the global spinlock. The local acquire flag being set indicates to the spinlock utilization module 210 that contention for the global spinlock is high and that the global spinlock can only be acquired by local spinlock holders.

[0034] Referring again to decision block 510, if the spinlock utilization module 210 determines that the global acquire flag and the local acquire flag are not set (global spinlock available), decision block 510 may be followed by decision block 516, in which the spinlock utilization module 210 checks to determine whether the spinlock utilization module 210 has acquired the global spinlock. In this example, the spinlock utilization is spinning in an attempt to acquire the global spinlock. Moreover, other processes besides the spinlock utilization module 210 may have been attempting to acquire the global spinlock. If the spinlock utilization module 210 determines that it has acquired the global spinlock, decision block 516 may be followed by block 506, in which the spinlock utilization module 210 sets the global acquire flag to indicate that the global spinlock is acquired directly without first acquiring one of the associated local spinlocks. Otherwise, if the spinlock utilization module 210 determines that it has not acquired the global spinlock (the spinlock utilization module 210 has not successfully acquired the global spinlock), decision block 516 may be followed by decision block 512, in which the spinlock utilization module 210 checks to determine whether the spinlock utilization module 210 has spun more than the allocated specific number X in an attempt to acquire the global spinlock.

[0035] Referring again to block 514, block 514 may be followed by decision block 516, in which the spinlock utilization module 210 checks to determine whether the spinlock utilization module 210 has acquired the local spinlock. If the spinlock utilization module 210 determines that it has acquired the local spinlock, decision block 516 may be followed by decision block 518, in which the spinlock utilization module 210 checks the global acquired flag and the local acquired flag of the global spinlock (the global spinlock being protected by the local spinlock). If, at decision block 518, the spinlock utilization module 210 determines that the global acquired flag is set (the global spinlock is held by the process that directly acquired the global spinlock) or the local acquired flag is set (the global spinlock is held by the process that first acquired one of the local spinlocks associated with the global spinlock), decision block 518 may be followed by decision block 520, in which the spinlock utilization module 210 checks to determine whether the spinlock utilization module 210 has spun a specific number of times, Y, in an attempt to acquire the global spinlock. The specific number Y specifies a limit on the number of spins that a process holding a local spin lock can perform in an attempt to acquire the global spin lock. The specific number Y acts as a limit so that a process holding a local spin lock does not spin indefinitely as a local spin lock holder in an attempt to acquire the global spin lock. The specific number Y can be set by a user (e.g., a programmer of the spin lock utilization module 210).

[0036] If, at decision block 520, the spinlock utilization module 210 determines that it has not spun more than the assigned specific number Y, decision block 520 may be followed by decision block 518, the operation of which is described above. In this example, the spinlock utilization module 210 may continue spinning to check the global acquired flag and the local acquired flag of the global spinlock. Otherwise, if the spinlock utilization module 210 determines that it has spun more than the assigned specific number Y, decision block 520 may be followed by block 522, in which the spinlock utilization module 210 releases the local spinlock acquired and held by the spinlock utilization module 210. In this example, the spinlock utilization module has spun the assigned number of times as a local spinlock holder in an attempt to acquire the global spinlock and cannot make any more attempts to acquire the global spinlock as a local spinlock holder.

[0037] Block 522 may be followed by block 524, where the spinlock utilization module 210 sleeps (enters a sleep state) because it cannot acquire the global spinlock as a local spinlock holder. The sleep state may be defined by a period of time or clock cycles. The sleep state may also involve a backoff algorithm, i.e., if a sleep has occurred previously, the spinlock utilization module 210 will sleep for a longer period of time in a subsequent sleep.

[0038] Otherwise, if at decision block 518, the spinlock utilization module 210 determines that the global acquire flag and the local acquire flag are not set (global spinlock available), decision block 518 may be followed by decision block 526, in which the spinlock utilization module 210 checks to determine whether the spinlock utilization module 210 has acquired (locally acquired) the global spinlock. In this example, the spinlock utilization is spinning in an attempt to acquire (locally acquire) the global spinlock as a local spinlock holder. Moreover, other processes other than the spinlock utilization module 210 may have been attempting to acquire the global spinlock. If the spinlock utilization module 210 determines that it has acquired the global spinlock, decision block 526 may be followed by block 528, in which the spinlock utilization module 210 sets the local acquire flag to indicate that the global spinlock was not acquired directly, but was acquired by first acquiring one of the associated local spinlocks. That is, the global spinlock is acquired by the local spinlock holder. Block 528 may be followed by block 530, where the spinlock utilization module 210 releases the local spinlock acquired and held by the spinlock utilization module 210. The spinlock utilization module 210 may release the local spinlock because the spinlock utilization module 210 has successfully acquired the global spinlock.

[0039] Otherwise, if at decision block 526 the spinlock utilization module 210 determines that it has not acquired the global spinlock (the spinlock utilization module 210 has not successfully acquired the global spinlock as the local spinlock holder), decision block 526 may be followed by decision block 520, where the spinlock utilization module 210, the operation of which is described above, checks to determine whether the spinlock utilization module 210 has spun more than the assigned specific number Y as the local spinlock holder in an attempt to acquire the global spinlock.

[0040] Referring here to decision block 516, if the spinlock utilization module 210 determines that it has not successfully acquired the local spinlock, decision block 516 may be followed by decision block 532, in which the spinlock utilization module 210 checks to determine whether the spinlock utilization module 210 has attempted to acquire all local spinlocks associated with the global spinlock. That is, the spinlock utilization module 210 checks to determine whether there is another local spinlock in the plurality of local spinlocks that the spinlock utilization module 210 can attempt to acquire. If the spinlock utilization module 210 determines that it has attempted to acquire all local spinlocks associated with the global spinlock, decision block 532 may be followed by block 534, in which the spinlock utilization module 210 sleeps (enters a sleep state) due to the inability to acquire any of the local spinlocks associated with the global spinlock (the inability to acquire any of the local spinlocks that protect access to the global spinlock).

[0041] Otherwise, if the spinlock utilization module 210 determines that another local spinlock exists among the multiple local spinlocks associated with the global spinlock, decision block 532 may be followed by block 536, in which the spinlock utilization module 210 attempts to acquire another local spinlock associated with the global spinlock. In some embodiments, this other local spinlock may also be randomly selected from among the multiple local spinlocks associated with the global spinlock. Block 536 may be followed by decision block 516, the operation of which is described above.

[0042] Figure 6 1 illustrates selected components of an example computing system 600 that can be used to perform any of the techniques described in various ways in this disclosure. In some embodiments, the computing system 600 can be configured to implement or direct one or more operations associated with: Figure 16. The present invention relates to a system 600 for implementing a scalable spinlock. The system 600 may include some or all of the components and / or modules associated with the scalable spinlock. For example, the spinlock utilization module 210, the global spinlock 104, the local spinlock 106, or a combination thereof may be implemented in or using the computing system 600. In an example scenario, for example, each of the spinlock utilization module 210, the global spinlock 104, and the local spinlock 106 is loaded into the memory 604 and can be executed by the processor 602. The computing system 600 can be any computer system, such as a workstation, server, or other form of computing or telecommunications equipment that employs multiple sockets and is capable of communication and has sufficient processor power and memory capacity to perform the operations described herein. A distributed computing system including multiple such computing devices can be provided. As depicted, the computing system 600 may include a processor 602, a memory 604, and a data store 606. The processor 602, the memory 604, and the data store 606 are communicatively coupled.

[0043] In general, the processor 602 may include any suitable special-purpose or general-purpose computer, computing entity, or computing or processing device including various computer hardware, firmware, or software modules, and may be configured to execute instructions stored on any applicable computer-readable storage medium, such as program instructions. For example, the processor 602 may include a microprocessor, a microcontroller, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or any other digital or analog circuit configured to interpret and / or execute program instructions and / or process data. In some embodiments, the processor 602 includes any suitable single-core or multi-core processor suitable for a multi-socket system, including the processor 204. Although in Figure 6 Although illustrated as a single processor, processor 602 may include any number of processors and / or processor cores that are configured, individually or collectively, to perform or direct the performance of any number of operations described in this disclosure. Thus, one or more of the processors may reside on one or more different electronic devices (such as different servers).

[0044] In some embodiments, the processor 602 may be configured to interpret and / or execute program instructions and / or process data stored in the memory 604, the data storage 606, or both the memory 604 and the data storage 606. In some embodiments, the processor 602 may retrieve program instructions from the data storage 606 and load the program instructions into the memory 604. After the program instructions are loaded into the memory 604, the processor 602 may execute the program instructions.

[0045] For example, in some embodiments, any one or more of the components and / or modules of the scalable spin lock (including the spin lock utilization module 210) may be included as program instructions in the data store 606. The processor 602 may retrieve some or all of the program instructions from the data store 606 and may load the retrieved program instructions into the memory 604. After loading the program instructions into the memory 604, the processor 602 may execute the program instructions so that the computing system can implement the operations directed by the instructions.

[0046] In some embodiments, virtualization can be employed in computing device 600 so that the infrastructure and resources of computing device 600 can be dynamically shared. For example, a virtual machine can be provided to handle processes running on multiple processors, so that the processes appear to be using only one computing resource rather than multiple computing resources. Multiple virtual machines can also be used with a single processor.

[0047] Memory 604 and data storage 606 may include computer-readable storage media for carrying or having computer-executable instructions or data structures stored thereon. Such computer-readable storage media may include any available media that can be accessed by a general-purpose or special-purpose computer such as processor 602. By way of example and not limitation, such computer-readable storage media may include non-transient computer-readable storage media, including random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), compact disk read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory devices (e.g., solid-state memory devices), or any other storage medium that can be used to carry or store specific program code in the form of computer-executable instructions or data structures and can be accessed by a general-purpose or special-purpose computer. The above combinations may also be included within the scope of computer-readable media. Computer-executable instructions may include, for example, instructions and data configured to cause processor 602 to perform a certain operation or group of operations.

[0048] Modifications, additions, or deletions may be made to computing system 600 without departing from the scope of the present disclosure. For example, in some embodiments, computing system 600 may include any number of other components, the groups of which may not be explicitly illustrated or described herein.

[0049] As indicated above, the embodiments described in this disclosure may include a dedicated or general-purpose computer (e.g., Figure 6 602) as discussed in greater detail herein. Additionally, as indicated above, computer-readable media (e.g., computer-readable storage media) for carrying or having computer-executable instructions or data structures stored thereon may be used. Figure 6Memory 604) to implement the embodiments described in this disclosure.

[0050] Example Embodiments

[0051] The following examples relate to further embodiments, from which numerous permutations and configurations will become apparent.

[0052] Example 1 is a computer system configured as a scalable latch for non-uniform memory access. The system includes a plurality of sockets, wherein each of the plurality of sockets includes at least one central processing unit (CPU) and locally attached memory, wherein each CPU in each socket is communicatively coupled to the locally attached memory of the socket; a global spinlock configured to control access to a shareable resource, the global spinlock including a first flag and a second flag; and a plurality of local spinlocks, each of the plurality of local spinlocks configured to control access to the global spinlock; wherein the first flag indicates whether the global spinlock is globally acquired, and the second flag indicates whether the global spinlock is locally acquired.

[0053] Example 2 includes the subject matter of Example 1, wherein the plurality of local spin locks is the same in number as the plurality of slots, and each of the plurality of local spin locks is allocated to a corresponding slot of the plurality of slots.

[0054] Example 3 includes the subject matter of Example 1, wherein the plurality of local spin locks are evenly distributed among the plurality of slots.

[0055] Example 4 includes the subject matter of any of Examples 1 to 3, wherein each local spin lock is a test-and-set spin lock.

[0056] Example 5 includes the subject matter of any of Examples 1 to 3, wherein each local spin lock is a test-and-set spin lock.

[0057] Example 6 includes the subject matter of any of Examples 1 to 6, wherein if the first flag indicates that the global spin lock is globally acquired, global acquisition of the global spin lock is granted.

[0058] Example 7 includes the subject matter of any of Examples 1 to 6, wherein global acquisition of the global spin lock is not permitted if the second flag indicates that the global spin lock is locally acquired.

[0059] Example 8 includes the subject matter of any one of Examples 1 to 7, wherein if the second flag indicates that the global spin lock is locally acquired, the global spin lock can only be acquired by a local spin lock of the plurality of local spin locks.

[0060] Example 9 A computer-implemented method for controlling access to a shareable resource. The method includes allocating a global spin lock configured to control access to the shareable resource, the global spin lock including a first flag and a second flag; and allocating a plurality of local spin locks, each of the plurality of local spin locks being configured to control access to the global spin lock; wherein the first flag indicates whether the global spin lock is globally acquired, and the second flag indicates whether the global spin lock is locally acquired.

[0061] Example 10 includes the subject matter of Example 9, wherein the global spin lock is allocated on a slot of the plurality of slots.

[0062] Example 11 includes the subject matter of Example 10, wherein the plurality of local spin locks is the same in number as the plurality of slots, and each of the plurality of local spin locks is allocated on a corresponding slot of the plurality of slots.

[0063] Example 12 includes the subject matter of Example 10, wherein the plurality of local spin locks are distributed among the plurality of slots.

[0064] Example 13 includes the subject matter of any of Examples 9 to 12, wherein the global spin lock is a test-and-set spin lock.

[0065] Example 14 includes the subject matter of any of Examples 9 to 12, wherein the global spin lock is a test-and-set spin lock.

[0066] Example 15 includes the subject matter of any of Examples 9 to 14, further comprising, in response to globally acquiring the global spin lock, setting a first flag to indicate that the global spin lock is globally acquired.

[0067] Example 16 includes the subject matter of any of Examples 9 to 15, further comprising, in response to determining that the first flag indicates that the global spin lock is globally acquired, attempting to globally acquire the global spin lock.

[0068] Example 17 includes the subject matter of any of Examples 9 to 16, further comprising, in response to attempting to globally acquire the global spin lock by spinning a first specific number of times without acquiring the global spin lock, attempting to acquire a first local spin lock of the plurality of local spin locks.

[0069] Example 18 includes the subject matter of Example 17, wherein the first local spin lock is randomly selected.

[0070] Example 4 includes the subject matter of any of Examples 17 and 18, further comprising, in response to acquiring the first local spin lock, attempting to locally acquire the global spin lock.

[0071] Example 20 includes the subject matter of Example 19, further comprising, in response to locally acquiring the global spin lock, setting a second flag to indicate that the global spin lock is locally acquired.

[0072] Example 21 includes the subject matter of any of Examples 17 to 18, further comprising, in response to attempting to acquire the first local spin lock by spinning a second specific number of times and failing to acquire the first local spin lock, attempting to acquire a second local spin lock of the plurality of local spin locks.

[0073] Example 22 includes the subject matter of Example 21, wherein the second local spin lock is randomly selected.

[0074] Example 23 includes the subject matter of any of Examples 9 to 16, further comprising, in response to determining that the second flag indicates that the global spin lock is locally acquired, attempting to acquire a first local spin lock of the plurality of local spin locks.

[0075] Example 24 is a computer program product comprising one or more non-transitory machine-readable media encoded with instructions that, when executed by one or more processors, cause execution of a process for controlling access to a shareable resource. The process includes allocating a global spin lock configured to control access to the shareable resource, the global spin lock comprising a first flag and a second flag; and allocating a plurality of local spin locks, each of the plurality of local spin locks being configured to control access to the global spin lock; wherein the first flag indicates whether the global spin lock is globally acquired, and the second flag indicates whether the global spin lock is locally acquired.

[0076] Example 25 includes the subject matter of Example 24, wherein the shareable resource is part of a non-uniform memory access (NUMA) system.

[0077] Example 26 includes the subject matter of Example 25, wherein the NUMA system comprises a plurality of sockets, the global spin lock being allocated on a socket of the plurality of sockets.

[0078] Example 27 includes the subject matter of Example 26, wherein the plurality of local spin locks is the same in number as the plurality of slots, and each of the plurality of local spin locks is allocated on a corresponding slot of the plurality of slots.

[0079] Example 28 includes the subject matter of Example 26, wherein the plurality of local spin locks are distributed among the plurality of slots.

[0080] Example 29 includes the subject matter of any of Examples 24 to 28, wherein the global spin lock is a test-and-set spin lock.

[0081] Example 30 includes the subject matter of any of Examples 24 to 28, wherein the global spin lock is a test-and-set spin lock.

[0082] Example 31 includes the subject matter of any of Examples 24 to 30, further comprising attempting to globally acquire the global spin lock; and in response to globally acquiring the global spin lock, setting a first flag to indicate that the global spin lock is globally acquired.

[0083] Example 32 includes the subject matter of any of Examples 24 to 31, further comprising, in response to determining that the first flag indicates that the global spin lock is globally acquired, attempting to globally acquire the global spin lock.

[0084] Example 33 includes the subject matter of any of Examples 24 to 32, further comprising spinning a first number of times to attempt to acquire a global spin lock; and in response to spinning a first specific number of times to attempt to globally acquire the global spin lock and not acquiring the global spin lock, attempting to acquire a first local spin lock of the plurality of local spin locks.

[0085] Example 34 includes the subject matter of Example 33, wherein the first local spin lock is randomly selected.

[0086] Example 35 includes the subject matter of any of Examples 33 and 34, further comprising, in response to acquiring the first local spin lock, attempting to locally acquire the global spin lock.

[0087] Example 36 includes the subject matter of Example 35, further comprising, in response to locally acquiring the global spin lock, setting a second flag to indicate that the global spin lock is locally acquired.

[0088] Example 37 includes the subject matter of any of Examples 33 to 34, further comprising, in response to attempting to acquire the first local spin lock by spinning a second specific number of times and failing to acquire the first local spin lock, attempting to acquire a second local spin lock of the plurality of spin locks.

[0089] Example 38 includes the subject matter of Example 37, wherein the second local spin lock is randomly selected.

[0090] Example 39 includes the subject matter of any of Examples 24 and 32, further comprising, in response to determining that the second flag indicates that the global spin lock is locally acquired, attempting to acquire a first local spin lock of the plurality of local spin locks.

[0091] As used in this disclosure, the term "module" or "component" may refer to a specific hardware implementation that is configured to perform the actions of a module or component and / or software object or software routine that may be stored on and / or executed by general-purpose hardware of a computing system (e.g., computer-readable media, processing devices, etc.). In some embodiments, the different components, modules, engines, and services described in this disclosure may be implemented as objects or processes executing on a computing system (e.g., as separate threads). Although some of the systems and methods described in this disclosure are generally described as being implemented in software (stored on and / or executed by general-purpose hardware), specific hardware implementations, firmware implementations, or any combination thereof are also possible and contemplated. In this specification, a "computing entity" may be any computing system as previously described in this disclosure, or a combination of any modules or modulations executing on a computing system.

[0092] Terms used in this disclosure and the appended claims (e.g., the bodies of the appended claims) are generally intended to be “open” terms (e.g., the term “including” should be interpreted as “including but not limited to,” the term “having” should be interpreted as “having at least,” the term “comprising” should be interpreted as “including but not limited to,” etc.).

[0093] Additionally, if a specific number of introduced claim recitations is intended, that intent will be explicitly stated in the claim, and in the absence of such recitation, no such intent exists. For example, to aid understanding, the following appended claims may contain use of the introductory phrases "at least one" and "one or more" to introduce claim recitations. However, the use of such phrases should not be construed to imply that the introduction of a claim by the indefinite article "a" or "an" limits any particular claim containing such introduced claim recitation to embodiments containing only one such recitation, even when the same claim includes the introductory phrases "one or more" or "at least one," as well as indefinite articles such as "a" or "an" (e.g., "a" and / or "an" should be construed as "at least one" or "one or more"); the same is true for the use of definite articles used to introduce claim recitations.

[0094] In addition, even if a specific number of an introduced claim recitation is explicitly recited, one skilled in the art will recognize that such recitation should be interpreted to mean at least the recited number (e.g., merely "two recitations" without other modifiers means at least two recitations, or two or more recitations). Furthermore, in instances where a convention similar to "at least one of A, B, and C, etc." or "one or more of A, B, and C, etc." is used, such construction is generally intended to include A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B, and C together, etc.

[0095] All examples and conditional language described in this disclosure are intended to be used as teaching objects to help readers understand the present disclosure and the concepts provided by the inventors for promoting the field, and should be interpreted as not being limited to such specific examples and conditions. Although the embodiments of the present disclosure have been described in detail, various changes, substitutions and modifications may be made thereto without departing from the spirit and scope of the present disclosure. Therefore, it is intended that the scope of the present disclosure be limited not by this detailed description but by the appended claims.

Claims

1. A computer system comprising: a plurality of sockets, each socket of the plurality of sockets comprising at least one central processing unit (CPU) and locally attached memory, wherein each CPU in each socket is communicatively coupled to the locally attached memory of the socket; a global spin lock configured to control access to a shareable resource, the global spin lock comprising a first flag and a second flag; and a plurality of local spin locks, each local spin lock of the plurality of local spin locks being configured to control access to the global spin lock; The first flag indicates whether the global spin lock is globally acquired, and the second flag indicates whether the global spin lock is locally acquired.

2. The system according to claim 1, wherein The number of the local spin locks is the same as the number of the slots, and each of the local spin locks is allocated to a corresponding slot among the slots.

3. The system according to claim 1, wherein: The plurality of local spin locks are evenly distributed among the plurality of slots.

4. The system according to claim 1, wherein Each local spinlock is a test-and-set spinlock.

5. The system according to claim 1, wherein: Each local spinlock is a test-and-set spinlock.

6. The system according to any one of claims 1 to 5, characterized in that If the first flag indicates that the global spin lock is globally acquired, global acquisition of the global spin lock is granted.

7. The system according to any one of claims 1 to 5, characterized in that If the second flag indicates that the global spin lock is locally acquired, global acquisition of the global spin lock is not permitted.

8. The system according to any one of claims 1 to 5, characterized in that If the second flag indicates that the global spin lock is locally acquired, the global spin lock can be acquired only through a local spin lock among the multiple local spin locks.

9. A computer-implemented method for controlling access to a shareable resource, the method comprising: allocating a global spin lock configured to control access to a shareable resource, the global spin lock comprising a first flag and a second flag; as well as allocating a plurality of local spin locks, each local spin lock of the plurality of local spin locks being configured to control access to the global spin lock; The first flag indicates whether the global spin lock is globally acquired, and the second flag indicates whether the global spin lock is locally acquired.

10. The method according to claim 9, wherein The global spin lock is allocated on one of the plurality of slots.

11. The method according to claim 10, wherein The number of the local spin locks is the same as the number of the slots, and each of the local spin locks is allocated to a corresponding slot among the slots.

12. The method according to claim 10, wherein The plurality of local spin locks are distributed among the plurality of slots.

13. The method according to claim 9, wherein The global spin lock is one of: a test-and-test-and-set spin lock; or a test-and-set spin lock.

14. The method according to any one of claims 9 to 13, characterized in that Further including: In response to the global spin lock being globally acquired, the first flag is set to indicate that the global spin lock is globally acquired.

15. The method according to any one of claims 9 to 13, characterized in that Further including: In response to determining that the first flag indicates that the global spin lock is globally acquired, attempting to globally acquire the global spin lock.

16. The method according to claim 15, wherein Further including: In response to attempting to globally acquire the global spin lock by spinning a first specific number of times without acquiring the global spin lock, attempting to acquire a first local spin lock of the plurality of local spin locks, wherein the first local spin lock is randomly selected.

17. The method according to claim 16, wherein Further including: In response to acquiring the first local spin lock, an attempt is made to locally acquire the global spin lock.

18. The method according to claim 17, wherein Further including: In response to the global spin lock being locally acquired, the second flag is set to indicate that the global spin lock is locally acquired.

19. The method according to claim 16, wherein Further including: In response to attempting to acquire the first local spin lock a second specific number of times without acquiring the first local spin lock, attempting to acquire a second local spin lock from the plurality of local spin locks, wherein the second local spin lock is randomly selected.

20. The method according to any one of claims 9 to 13, characterized in that Further including: In response to determining that the second flag indicates that the global spin lock is locally acquired, attempting to acquire a first local spin lock of the plurality of local spin locks.

21. A computer program product comprising: means for allocating a global spin lock configured to control access to a shareable resource, the global spin lock comprising a first flag and a second flag; as well as means for allocating a plurality of local spin locks, each local spin lock of the plurality of local spin locks being configured to control access to the global spin lock; The first flag indicates whether the global spin lock is globally acquired, and the second flag indicates whether the global spin lock is locally acquired.

22. The computer program product of claim 21, wherein Further including: means for attempting to globally acquire said global spin lock; as well as means for setting the first flag to indicate that the global spin lock is globally acquired in response to the global spin lock being globally acquired.

23. The computer program product according to any one of claims 21 and 22, characterized in that Further including: means for spinning a first number of times to attempt to acquire said global spin lock; as well as Means for attempting to acquire a first local spin lock of the plurality of local spin locks in response to attempting to globally acquire the global spin lock by spinning the first number of times and failing to acquire the global spin lock.

24. The computer program product of claim 23, wherein: Further including: Means for attempting to locally acquire the global spin lock in response to acquiring the first local spin lock.

25. The computer program product of claim 24, wherein Further including: means for setting the second flag to indicate that the global spin lock is locally acquired in response to locally acquiring the global spin lock.

Citation Information

Patent Citations

  • Multiprocessing systems employing hierarchical spin locks

    US20030236817A1