Remote direct memory access based global lock
Patent Information
- Application Number
- PCT/EP2024/055695
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2025-10-02
AI Technical Summary
Conventional locking mechanisms in distributed computing environments face challenges such as increased latency, inefficiencies, and system inconsistencies due to concurrent access to shared resources, exacerbated by node failures and network partitions, necessitating a more robust and efficient synchronization solution.
A method utilizing Remote Direct Memory Access (RDMA) with a Shared Receive Queue (SRQ) to implement a global lock, supporting high availability locks and flexible contention policies, minimizing central processing unit consumption, and enabling efficient deadlock detection and recovery.
The method ensures reduced latency, enhanced responsiveness, and robustness in distributed systems by optimizing lock handling, preventing starvation, and ensuring zero latency unlock operations, while maintaining system integrity and scalability.
Smart Images

Figure EP2024055695_02102025_PF_FP_ABST
Abstract
Description
[0001] REMOTE DIRECT MEMORY ACCESS BASED GLOBAL LOCK
[0002] TECHNICAL FIELD
[0003] The disclosure generally relates to synchronization schemes in multithreading, and more particularly, the disclosure relates to a method for a distributed system utilizing Remote Direct Memory Access, RDMA along with other network technologies, for example. Transmission Control Protocol, TCP or Internet Protocol, IP. The disclosure relates to a distributed system utilizing RDMA along with other network technologies, for example. TCP / IP. The disclosure relates to a server in a distributed system utilizing RDMA along with other network technologies, for example. TCP / IP. The disclosure relates to a method for a server in a distributed system utilizing RDMA along with other network technologies, for example. TCP / IP. The disclosure relates to a client in a distributed system utilizing RDMA along with other network technologies, for example. TCP / IP, and a method for a client in a distributed system utilizing RDMA along with other network technologies, for example. TCP / IP.
[0004] BACKGROUND
[0005] In the realm of computer science, particularly in multithreaded and distributed computational environments, a significant challenge arises in managing access to shared computational resources. When multiple threads of execution are involved, the risk of concurrent access to these resources can lead to data corruption and system inconsistencies. The central problem is ensuring mutual exclusion, where only one thread can access a critical section of code or data at any given time, to maintain the integrity and correctness of operations.
[0006] Historically, the concept of locks has been employed as a synchronization mechanism to control this access. However, in distributed computing environments, where resources like databases, files, or network resources are spread across multiple nodes, conventional locking mechanisms face limitations. One of the key challenges is the potential for increased latency and delays, as resources might not be immediately accessible when needed, leading to inefficiencies in data processing and analytics.
[0007] Further complicating the scenario is the inherent nature of distributed systems, characterized by the need for balancing consistency, availability, and partition tolerance - a triad where, according to the CAP theorem, achieving all three concurrently is impossible. This constraint introduces a dilemma in distributed service design: choosing between consistency and availability in the event of network partitions, which are inevitable in distributed systems. This choice impacts the reliability and efficiency of the system, potentially leading to issues such as data inconsistency or decreased availability.
[0008] Additional risks in distributed environments include node failures, unresponsive services due to long-running operations like garbage collection, and time synchronization issues, which further exacerbate the challenge of maintaining a robust and efficient distributed computing environment.
[0009] In summary, while locks provide a basic framework for resource access control in distributed systems, they fall short in addressing the complex dynamics of these environments, necessitating more advanced and nuanced solutions to balance efficiency, reliability, and system integrity.
[0010] Therefore, there arises a need to address the aforementioned technical problem / drawbacks of distributed system. SUMMARY
[0011] It is an object of the disclosure to provide a method for a distributed system utilizing Remote Direct Memory Access, RDMA, along with other network technologies, for example. Transmission Control Protocol, TCP or Internet Protocol, IP, a distributed system utilizing RDMA, a server in a distributed system utilizing RDMA, a method for a server in a distributed system utilizing RDMA, along with other network technologies, for example. TCP / IP, a client in a distributed system utilizing RDMA, along with other network technologies, for example. TCP / IP and a method for a client in a distributed system utilizing RDMA along with other network technologies, for example, TCP / IP, while avoiding one or more disadvantages of prior art approaches.
[0012] This object is achieved by the features of the independent claims. Further, implementation forms are apparent from the dependent claims, the description, and the figures.
[0013] According to a first aspect, there is a method for a distributed system utilizing Remote Direct Memory Access, RDMA. The distributed system includes a server and one or more clients. The method includes utilizing a buffer of requests to implement a global lock between two or more of the plurality of clients. The method includes utilizing a Shared Receive Queue, SRQ, to synchronize the requests to the global lock. An order of the requests in the buffer indicates the state of the global lock.
[0014] This method ensures reduced latency in global lock operations, even in scenarios without contention, thereby enhancing responsiveness of the distributed system. The distributed system supports two types of high availability locks, mirror and slave, offering flexibility based on specific requirements. The high availability locks make the distributed system robust and adaptable which are addition to regular global locks. The distributed system holds up even without the requirement for high availability, but could easily include the properties of the high availability locks. The unlocking process is efficient, with zero latency for a client performing the unlock operation, propagating to the server, which ensures no delays in operations of the distributed system. This method also offers flexible contention policies like tryLock, wait, and spinlock, which optimizes lock handling under various conditions. Consumption of a central processing unit of the distributed system is minimized as there is no constant polling of lock’s state from the server implementing the global lock, and polling is only necessary during clients’ contention. This method ensures recoverability and fairness by identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system reliability, and multiple locks can be managed efficiently on a single Shared Receive Queue, SRQ, or single extended reliable connection, XRC receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system where the plurality of clients are inherent, unlocking is achieved through a RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. The buffer including timestamps further enhances the distributed system’s scalability in each entry aids in debugging and analysis.
[0015] In some implementations, the method further includes a client requesting that the global lock is to be locked by sending a SEND request to the server via a queue pair, QP. The QP is configured to use the SRQ. The SEND request indicates the identity of the client and of the SRQ. Then the method includes sending an RDMA READ request to read the entire buffer. The method includes determining if a previous request from same client or another client has locked the global lock and if so determine that the global lock is locked by another client, or the method includes determining if a previous request has unlocked the global lock and if so determine that the global lock is available and thereby locked by the client. In some implementations, the method further includes the client executing the RDMA READ of the entire buffer repeatedly postponing local processing until it is determined that the global lock is available. The method further includes determining whether the global lock is lock while sending a lock operation.
[0016] In some implementations, the method further includes the client executing the RDMA READ of the buffer reading the whole buffer, thereby also reading the HEAD entry.
[0017] In some implementations, the method further includes the server that periodically cleans the buffer by (i) obsoleting old entries of lock and unlock pairs of requests in the buffer, and (ii) moving a HEADER to a new location in the buffer.
[0018] In some implementations, the method further includes a client sending a SEND request with a command “UNLOCK” to the server when a currently locked lock is to be unlocked and then proceeding with local processing, without waiting for a completion indication for the SEND request.
[0019] Optionally, the buffer is cyclic.
[0020] Optionally, the buffer manages several global locks. Each request indicates an identity of the lock to be requested.
[0021] Optionally, each buffer’s entry indicates a time stamp, that can be used for collecting statistics and / or aid software debugging.
[0022] According to a second aspect, there is provided a distributed system utilizing Remote Direct Memory Access, RDMA. The distributed system includes a server and a plurality of clients. The server includes a controller that is configured to utilize a buffer of requests to implement a global lock between two or more of the plurality of clients, and utilize a Shared Receive Queue, SRQ, to synchronize the requests to the global lock. An order of the requests in the buffer indicates the state of the global lock.
[0023] The distributed system ensures reduced latency in global lock operations, even in scenarios without contention, thereby enhancing responsiveness of the distributed system. The distributed system supports two types of high availability locks, mirror and slave, offering flexibility based on specific requirements. The high availability locks make the distributed system robust and adaptable which are addition to regular global locks. The distributed system holds up even without the requirement for high availability, but could easily include the properties of the high availability locks. The unlocking process is efficient, with zero latency for a client performing the unlock operation, propagating to the server, which ensures no delays in operations of the distributed system. The distributed system also offers flexible contention policies like tryLock, wait, and spinlock, which optimizes lock handling under various conditions. Consumption of a central processing unit of the distributed system is minimized as there is no constant polling of lock’s state from the server implementing the global lock, and polling is only necessary during client’s contention. The distributed system ensures recoverability and fairness by identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system reliability, and multiple locks can be managed efficiently on a single SRQ or single extended reliable connection, XRC receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system where the plurality of clients are inherent, unlocking is achieved through a RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. The buffer including timestamps in each entry aids in debugging and analysis. According to a third aspect, there is provided a server in a distributed system utilizing Remote Direct Memory Access, RDMA. The distributed system includes the server and a plurality of clients. The server includes a controller configured to utilize a buffer of requests to implement a global lock between two or more of the plurality of clients, and to utilize a Shared Receive Queue, SRQ, to synchronize the requests to the global lock. An order of the requests in the buffer indicates the state of the global lock.
[0024] The distributed system also offers flexible contention policies like try Lock, wait, and spinlock, which optimizes lock handling under various conditions. Consumption of a central processing unit of the distributed system consumption is minimized as there is no constant polling of lock’s state from the server implementing the global lock, and polling is only necessary during client contention. The distributed system ensures recoverability and fairness by identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system reliability, and multiple locks can be managed efficiently on a single Shared Receive Queue, SRQ, or single extended reliable connection, XRC receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system where the plurality of clients is inherent, unlocking is achieved through a RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. The buffer including timestamps further enhances the distributed system’s scalability in each entry aids in debugging and analysis.
[0025] According to a fourth aspect, there is provided a method for a server in a distributed system utilizing Remote Direct Memory Access, RDMA. The distributed system includes a server and one or more clients. The server includes a controller configured to utilize a buffer of requests to implement a global lock between the clients, and to utilize a Shared Receive Queue, SRQ, to synchronize the requests to the global lock. An order of the requests in the buffer indicates the state of the global lock.
[0026] This method ensures reduced latency in global lock operations, even in scenarios without contention, thereby enhancing responsiveness of the distributed system. The distributed system supports two types of high-availability locks, mirror, and slave, offering flexibility based on specific requirements. The high availability locks make the distributed system robust and adaptable which are addition to regular global locks. The distributed system holds up even without the requirement for high availability, but could easily include the properties of the high availability locks. The unlocking process is efficient, with zero latency for a client performing the unlock operation, propagating to the server which ensures no delays in operations of the distributed system. This method also offers flexible contention policies like tryLock, wait, and spinlock, which optimizes lock handling under various conditions. Consumption of a central processing unit of the distributed system consumption is minimized as there is no constant polling of lock’s state from the server implementing the global lock, and polling is only necessary during client’s contention. The distributed system ensures recoverability and fairness by always identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system reliability, and multiple locks can be managed efficiently on a single Shared Receive Queue, SRQ, or single extended reliable connection, XRC receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system where the plurality of clients is inherent, unlocking is achieved through a RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. The buffer including timestamps further enhances the distributed system’s scalability in each entry aids in debugging and analysis. According to a fifth aspect, there is provided a client in a distributed system utilizing Remote Direct Memory Access, RDMA. The system includes a server and the client. The client includes a controller configured to request that a global lock is to be locked by sending a SEND request to the server via a queue pair, QP. The QP is configured to use the SRQ. The SEND request indicates the identity of the client and of the SRQ. The controller is configured to send an RDMA READ request to read the buffer. The controller is configured to determine if a previous request from same client or another client has locked the global lock and if so determine that the global lock is locked by another client, or the controller is configured to determine if a previous request has unlocked the global lock and if so determine that the global lock is available and thereby locked by the client.
[0027] The distributed system also offers flexible contention policies like try Lock, wait, and spinlock, which optimizes lock handling under various conditions. Consumption of a central processing unit of the distributed system is minimized as there is no constant polling of lock’s state from the server implementing the global lock, and polling is only necessary during client’s contention. The distributed system ensures recoverability and fairness by identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system reliability, and multiple locks can be managed efficiently on a single Shared Receive Queue, SRQ, or single extended reliable connection, XRC, receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system where the plurality of clients are inherent, unlocking is achieved through a simple RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. The buffer including timestamps further enhances the distributed system’s scalability in each entry aids in debugging and analysis.
[0028] According to a sixth aspect, there is provided a method for a client in a distributed system utilizing Remote Direct Memory Access, RDMA. The distributed system includes a server and the client. The method includes requesting that a global lock is to be locked by sending a SEND request to the server via a queue pair, QP. The QP is configured to use an SRQ. The SEND indicates the identity of the client and of the SRQ. The method includes executing an RDMA READ of the entire buffer. The method includes determining if a previous request from same client or another client has locked the global lock and if so determine that the global lock is locked by another client or determining if a previous request has unlocked the global lock and if so determine that the global lock is available and thereby locked by the client.
[0029] This method also offers flexible contention policies like tryLock, wait, and spinlock, which optimizes lock handling under various conditions. The central processing unit consumption is minimized as there is no constant polling on the lock server, and polling is only necessary during client contention. This method ensures recoverability and fairness by always identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system reliability, and multiple locks can be managed efficiently on a single SRQ, or single extended reliable connection, XRC, receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server also plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system where the plurality of clients is inherent, unlocking is achieved through a simple RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. The buffer including timestamps further enhances the distributed system’s scalability in each entry aids in debugging and analysis.
[0030] According to a seventh aspect, a computer program product includes program instructions for performing the method when executed by one or more processors in an RDMA system. Therefore, in contradistinction to the existing solutions, a server in a distributed system is configured to utilize a buffer of requests to implement a global lock between the clients, and to utilize a Shared Receive Queue, SRQ, to synchronize the requests to the global lock.
[0031] These and other aspects of the disclosure will be apparent from the implementation(s) described below.
[0032] BRIEF DESCRIPTION OF DRAWINGS
[0033] Implementations of the disclosure will now be described, by way of example only, with reference to the accompanying drawings, in which:
[0034] FIG. 1 is a block diagram of a distributed system utilizing Remote Direct Memory Access, RDMA in accordance with an implementation of the disclosure;
[0035] FIG. 2 is a block diagram of a client in a distributed system utilizing Remote Direct Memory Access, RDMA in accordance with an implementation of the disclosure;
[0036] FIG. 3 illustrates an exemplary representation of implementing a global lock between two or more clients in accordance with an implementation of the disclosure;
[0037] FIG. 4 illustrates an exemplary representation of a global lock information data structure and a cyclic buffer in accordance with an implementation of the disclosure;
[0038] FIG. 5 illustrates an optional enhancement exemplary representation of implementing multiple global locks using multiple Shared Receive Queues, SRQs, indicated by the extended RC, XRC, connection’s extended header in accordance with an implementation of the disclosure;
[0039] FIG. 6 illustrates an exemplary representation of a server implementing a global lock in accordance with an implementation of the disclosure;
[0040] FIG. 7 is a flow diagram that illustrates a method for a distributed system utilizing Remote Direct Memory Access, RDMA for implementing a global lock between two or more clients in accordance with an implementation of the disclosure;
[0041] FIG. 8 is a flow diagram that illustrates a method for a client in a distributed system utilizing Remote Direct Memory Access, RDMA in accordance with an implementation of the disclosure; and
[0042] FIG. 9 is an illustration of a computer system (e.g., a controller) in which the various architectures and functionalities of the various previous implementations may be implemented.
[0043] DETAILED DESCRIPTION OF THE DRAWINGS
[0044] Implementations of the disclosure provide a method for a distributed system utilizing Remote Direct Memory Access, RDMA along with other network technologies, for example. Transmission Control Protocol / Intemet Protocol, TCP / IP. The disclosure relates to a distributed system utilizing RDMA along with other network technologies, for example, TCP / IP. The disclosure relates to a server in a distributed system utilizing RDMA along with other network technologies, for example. TCP / IP. The disclosure relates to a method for a server in a distributed system utilizing RDMA along with other network technologies, for example. TCP / IP. The disclosure relates to a client in a distributed system utilizing RDMA along with other network technologies, for example. TCP / IP, and a method for a client in a distributed system utilizing RDMA along with other network technologies, for example. TCP / IP.
[0045] To make solutions of the disclosure more comprehensible for a person skilled in the art, the following implementations of the disclosure are described with reference to the accompanying drawings.
[0046] Terms such as "a first", "a second", "a third", and "a fourth" (if ary) in the summary, claims, and foregoing accompanying drawings of the disclosure are used to distinguish between similar objects and are not necessarily used to describe a specific sequence or order. It should be understood that the terms so used are interchangeable under appropriate circumstances, so that the implementations of the disclosure described herein are, for example, capable of being implemented in sequences other than the sequences illustrated or described herein. Furthermore, the terms "include" and "have" and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, a method, a system, a product, or a device that includes a series of steps or units, is not necessarily limited to expressly listed steps or units but may include other steps or units that are not expressly listed or that are inherent to such process, method, product, or device.
[0047] Definitions:
[0048] Remote Direct Memory Access, RDMA - In computing, RDMA is a direct memory access from a memory of one computer into that of another computer without involving either computer's operating system.
[0049] Global lock - A mechanism to control the access to a memory or a computer resource, and acts as a tool to protect / grant single access to the memory or the computer or shared resource.
[0050] Queue Pair, QP - A queue pair includes a separate transmit and receive queues used by an RDMA capable network adapter.
[0051] Shared Receive Queue, SRQ - A mechanism to reduce the amount of required memory for multiple RQs, of multiple QPs, that store Receive Queue Elements by enabling these QPs to use a shared resource, a Shared Receive Queues, SRQ, that stores the RQEs of multiple QPs.
[0052] FIG. 1 is a block diagram of a distributed system 100 utilizing Remote Direct Memory Access, RDMA in accordance with an implementation of the disclosure. The distributed system 100 includes a server 102 and a plurality of clients 106A-N. The server 102 includes a controller 104 configured to utilize a buffer of requests to implement a global lock between two or more of the plurality of clients 106A-N, and to utilize a Shared Receive Queue, SRQ, to synchronize the requests to the global lock. An order of the requests in the buffer indicates the state of the global lock.
[0053] The distributed system 100 ensures reduced latency in global lock operations, even in scenarios without contention, thereby enhancing responsiveness of the distributed system 100. The distributed system 100 supports two types of high availability locks, mirror, and slave, offering flexibility based on specific requirements. The high availability locks make the distributed system 100 robust and adaptable which are addition to regular global locks. The distributed system 100 holds up even without the requirement for high availability, but could easily include the properties of the high availability locks. The unlocking process is efficient, with zero latency for a client performing the unlock operation, propagating to the server 102, which ensures no delays in the operations of the distributed system 100. The distributed system 100 also enables flexible contention policies such as tryLock, wait, and spinlock, which optimizes lock handling under various conditions. The central processing unit consumption is minimized as there is no constant polling of lock’s state from the server 102 implementing the global lock, and polling is only necessary during client’s contention. The distributed system 100 ensures recoverability and fairness by always identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system 100 reliability, and multiple locks can be managed efficiently on a single SRQ, or single extended reliable connection, XRC, receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system 100 implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server 102 also plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system 100, where the plurality of clients 106A-N are inherent, unlocking is achieved through a simple RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. Optionally, the buffer including timestamps in each entry aids in debugging and analysis can assist in delayed lock, and the buffer including the timestamps is not mandatory on each entry as the global lock can be used with a single timer that is initiated each time the lock has switched an owner, and the like.
[0054] In another implementation, a server 102 in a distributed system 100 utilizing Remote Direct Memory Access, RDMA, is provided. The distributed system 100 includes the server 102 and a plurality of clients 106A-N. The server 102 includes a controller configured to utilize a buffer of requests to implement a global lock between two or more of the plurality of clients 106A-N, and to utilize a Shared Receive Queue, SRQ, to synchronize the requests to the global lock. An order of the requests in the buffer indicates the state of the global lock.
[0055] FIG. 2 is a block diagram of a client 206 in a distributed system 200 utilizing Remote Direct Memory Access, RDMA, in accordance with an implementation of the disclosure. The distributed system 200 includes a server 202 and the client 206. The client 206 includes a controller 204 configured to request that a global lock is to be locked by sending a SEND request to the server 202 via a queue pair, QP. The QP is configured to use the SRQ. The SEND request indicates the identity of the client 206 and of the SRQ. The client 206 is configured to send an RDMA READ request to read the buffer through the controller 204. The controller 204 is configured to determine if a previous request from same client or another client has locked the global lock and if so determine that the global lock is locked by another client, or the controller 204 is configured to determine if a previous request has unlocked the global lock and if so determine that the global lock is available and thereby locked by the client 206.
[0056] The distributed system 200 also offers flexible contention policies like tryLock, wait, and spinlock, which optimizes lock handling under various conditions. The central processing unit consumption is minimized as there is no constant polling of lock’s state from the server 202 implementing the global lock, and polling is only necessary during client’s contention. The distributed system 200 ensures recoverability and fairness by always identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system 200 reliability, and multiple locks can be managed efficiently on a single SRQ, or single extended reliable connection, XRC, receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system 200 implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server 202 plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system 200 where the plurality of clients is inherent, unlocking is achieved through a simple RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. The buffer including timestamps in each entry aids in debugging and analysis.
[0057] FIG. 3 illustrates an exemplary representation of a server 300 implementing a global lock between two or more clients 306A- N in accordance with an implementation of the disclosure. The server 300 includes a host memory 302. The host memory 302 is a Memory, registered by RDMA 304 to two or more clients 306A-N. The server 300 is configured to associate a queue pair, QP 314A-N, created to communicate with the two or more clients 306A-N, with Shared Receive Queue, SRQ 308. The QP 314A-N associated with the SRQ 308, are each connected to their appropriate peer QP 309A-N at corresponding two or more clients 306A-N. The SRQ 308 holds RQEs that each of them points to a single entry in a cyclic Buffer 310. Every single entry in the cyclic buffer 310 is of ENTRY_SIZE size and holds information about a global lock operation from one single client of the two or more clients 306 A-N. The information about the global lock is stored in a lock info 311 and placed in a same memory as the cyclic buffer 310. The cyclic buffer 310 is allocated by the server 300. The SRQ 308 may be predefined with a size of each entry. Optionally, the server 300 includes a controller 312.
[0058] Any of the two or more clients 306A-N may be configured to request locking of a global lock by sending a SEND request to the server 300. Any of the two or more clients 306A-N can send the SEND request to the server 300 via the QP 309 A-N. A QP 314A-N in the server 300 is configured to use the SRQ 308. The SEND request indicates the identity of the client 306A. Then the client 306A sends a RDMA READ request to read cyclic buffer 310. Optionally, the two or more clients 306A-N is configured to send the RDMA READ request to read the cyclic buffer 310. The client 306A executes the RDMA READ of the cyclic buffer 310 repeatedly postponing local processing until the global lock is available. Each of the two or more clients 306A-N sends a READ request to read an entire (contiguous) cyclic buffer 310, after sending the SEND request to lock the global lock. Each of the two or more clients 306A-N processes the received buffer to determine whether it has the lock or if some other client has the lock.
[0059] The determination of acquiring the global lock is done by each of the two or more clients 306A-N when each of the clients receives the READ response. The client 306A searches for a HEADER entry to learn from which point in the cyclic buffer 310 there exist valid entries. The client 306A does not always know where this HEADER entry is, as the periodic “cleaning” by the server 300 could move it to a new entry inside cyclic buffer 310. The reading of the cyclic buffer 310 avoids the need to know the location of the HEADER entry in advance. The client 306A, after receiving the cyclic buffer 310, searches for the HEADER entry so to know from where to look for lock-unlock pairs. The HEADER entry serves as a control data structure of the cyclic buffer 310. The cyclic buffer 310 includes the HEADER entry, client used entries, and client unused entries.
[0060] The server 300 is configured to “clean” the cyclic buffer 310 periodically by obsoleting old CLIENT entries of lock and unlock pairs of requests in the cyclic buffer 310. The server 300 is configured to clean the cyclic buffer 310 by receiving a control request from any of the one or more clients 306A-N. The server 300 is configured to clean the cyclic buffer 310 by determining that at least a portion of the entries in the SRQ 308 hold an active request. Optionally, the portion of the entries in the SRQ 308 is flexible i.e. the portion is half of the entries.
[0061] FIG. 4 illustrates an exemplary representation of a global lock information data structure and a cyclic buffer in accordance with an implementation of the disclosure. The exemplary representation of the cyclic buffer depicts an array of entries. Each entry of each client includes a client_entry 402. Each entry of each client includes an entry_type, a client_id, and a lock_operation. Optionally, each entry of each client includes a lock id and a timestamp. The entry _type may be lock or control. The entry _type may be assigned with 1 bit. The client_id may be identification of each client. The client_id data structure’s field may be smaller or larger’ for example, for a maximum of 127 clients, 7 bits are assigned to the client_id. The client_id may be Cl as shown in the figure. The lock_operation may be lock or unlock. The lock_operation may be assigned with 2 bits. For example, the lock_operation may be “unlock” for the client_id Cl as shown in the figure.
[0062] The lock_id may be used only if a lock group is defined, in case of a lock group, a specific lock must be specified. The lock_id may be assigned with 8 bits.
[0063] The timestamp may be used as a watchdog, or for statistics, or for debugging. The timestamp is a relative value to the one in the HEADER entry. The timestamp in the unlock is more accurate as it has access to the information of the HEADER entry. The timestamp may be assigned with 14 bits.
[0064] The cyclic buffer is logically cyclic due to the SRQ and is allocated as a continuous buffer for high performance of the RDMA READ operation by the clients. The memory also includes a specific area for the lock_info 401, and a header 403. The lock_info 401 is a single updater that changes mostly during initialization and state change. The lock_info 401 includes lock_id or lock_group_id, lock_properties, copy_property, buffer_size, entry_size, state, protection_state, and copies_locations. The lock_properties is “read”, “write”, “mirroring 2way”, “mirroring 3way”, “persistency” and possible other values. The buffer_size is the size of the buffer, the entry_size is the size of each entry inside the buffer. The state is “modification in progress” and possibly other values. The protection_state is “degraded” or “synced”. The copy_properties is "mirror", “slave”, or "master". The copies_locations include information about servers and addresses of the cyclic buffer and its mirrors cyclic buffers and sync state. The header 403 includes entry _type, ctrl_type, server_id, and timestamp, which specifies a number of bits required.
[0065] The following pseudo-code describes the entry of the client in the cyclic buffer or a control entry, used to also define and set a HEADER entry:
[0066] Cyclic_buffer_entry (union): { client_entry { entry _type: lb’ l (lock) [1 bit] client_ID: 0 is reserved [#bits depends on maximal number of clients, e.g. for a maximum of 127 clients, 7 bits are sufficient] lock_operation: LOCK OR UNLOCK OR R\W [2 bits] lock_ID (optional): used only if a “Lock Group” is defined; in case of a lock group, a specific lock in the group must be specified timestamp (optional): used as a watchdog or for statistics or for debugging. The timestamp is a relative value to the one in the “head” entry; The timestamp in the unlock is more accurate as it has access to the info of the head [14 bits] } ctrl_entry { entry _type: lb’O (Ctrl) [1 bit] ctrl ype: 0=head, l=ordering, etc. [1 or more bits] server_id: ID of the server that set this entry; used for mirror and failure handling timestamp (optional): Base timestamp, “head” is resetting the timestamp for later unlock operations }
[0067] }
[0068] The cyclic buffer may be logical as the SRQ causes the buffer to be cyclic, which is a continuous memory including an area for the lock info 401. The client obtains the lock info 401 for at least every N times, to detect a size and a state of the cyclic buffer. A lock handle in the client encodes the lock info 401 and a slot allocated for the lock info 401. The lock handle can be used for unlocking and mirroring of the lock operation. The following pseudo-code describes the lock info 401 of the cyclic buffer which is located at the end or the beginning of the cyclic buffer:
[0069] / * single updater changed mostly on init and state change * / lock_info { lock_id OR lock_group_id lock_properties: “read”, ’’write”, “mirroring (2\3 way)”, “persistency”, ... copy_property: “mirror”, ’’slave”, ’’master” buffer_size: total size of the ring-buffer entry _size : sizeof( Cyclic buff er entry) state: “modification in progress”, ... protection_state: “degraded”, “synced”, ... copies_locations: information about servers and addresses of the cyclic buffers and their mirrored cyclic buffers + sync state
[0070] }
[0071] FIG. 5 illustrates an optional enhancement exemplary representation of implementing multiple global locks using multiple Shared Request Queues, SRQs, indicated by the extended RC, XRC, connection’s extended header in accordance with an implementation of the disclosure. The exemplary representation depicts multiple locks having lock_ids as lock idl, lock id2, and lock id3. The multiple locks including lock id 1 , lock id2, and lock id 3 can also be maintained by different SRQ IDs defined in the extended reliable connection, XRC, transport protocol. FIG. 5 is an optional usage of XRC QP type, in which multiple locks are identified for an existing filed in the XRC transport protocol called DestSRQ, which is defined inside XRCExtHeader of the XRC protocol. This SRQ ID is instead of lock_id. The multiple locks including lock idl, lock id2, and lock id3 can be maintained by different cyclic buffers using different SRQs. Each SRQ maintains a single lock. This simplifies the client_entry and the processing done by each client and also reduces the size of the client_entry itself, which could save memory or enable more entries in the cyclic buffer. When the multiple locks including lock idl, lock id2, and lock id3 are maintained by different cyclic buffers with different SRQs, then number of locks per SRQ is to be limited to control the queue size. The multiple locks including lock idl, lock id2, and lock id3 can be maintained using extended reliable connection, XRC, Queue Pairs, QPs. For example, a single connection may be established between a node m and a node n. The connection includes an XRC extension header. Each QP of node m is connected to remote RQ of node n and can indicate which lock to operate upon by selecting one of the multiple SRQs to use.
[0072] FIG. 6 illustrates an exemplary representation of a server 600 implementing a global lock in accordance with an implementation of the disclosure. The server 600 includes a memory 602. The memory 602 is a memory registered by RDMA to two or more clients. The server600 is configured to associate Queue Pairs, QPs, with the Shared Receive Queue, SRQ 606. A single memory region corresponding to the SRQ 606 is registered as a buffer. Each of the Queue Pairs, QPs includes a send queue, SQ, and a receive queue, RQ. The server 600 is configured to create a generic Queue Pair, QP for each client. For example, the creation of the generic Queue Pair, QP of the client includes registration of a buffer. The buffer is stored in the memory 602 of the server 600. The client is executing the RDMA READ of the entire buffer. The HEADER entry serves as a control data structure of the entire buffer. The buffer is divided into entries, which include a HEADER entry, client used entries, and client unused entries. The server 600 is configured to clean the buffer periodically by obsoleting old CLIENT entries of lock and unlock pairs of requests in the buffer. The server 600 is configured to write new HEADER at newest entry to synchronize all entries before it become obsolete. The server 600 is configured to set all obsolete entries to INVALID ordering from oldest to newest. The server 600 is configured to clean up all obsolete entries in the SRQ 606, by polling them and releasing the outstanding command. The server 600 is configured to post receive queue elements, RQEs, where each RQE points to a single entry in the cyclic buffer, from the last posted entry up to the new HEAD to the SRQ 606.
[0073] Optionally, the server 600 is configured to clean the buffer by receiving a control request from the client. Optionally, the server 600 is configured to clean the buffer by determining that at least a portion of the entries in the SRQ 606 holds an active request. For example, the portion is half of the entries. The server 600 is configured to perform clean-up action when a client identifies that the QP is above a threshold, then the client is configured to send on a potentially separate control queue pair, Ctrl-QP, a request to clean up the cyclic buffer and the SRQ 606, to the server 600 with information. The server 600 upon receiving the clean-up request is configured to check if a clean-up process is already in progress. The server 600 is configured to wait until the number of RQEs stored in the SRQ 606 is low. For example, half. This indication can be signalled by, for example, by using the IB V_EVENT_SRQ_LIMIT_RE ACHED event when the event is raised without polling. The server 600 is configured to perform periodic clean-up, when idle. The server 600 is configured to initialize the buffer and setting up the relevant memory pages’ information. The server 600 is configured to clean up the unlocked locks and update buffer entry periodically. FIG. 7 is a flow diagram that illustrates a method for a distributed system utilizing Remote Direct Memory Access, RDMA for implementing a global lock between one or more clients in accordance with an implementation of the disclosure. The system includes a server and one or more clients. At a step 702, a buffer of requests is utilized to implement a global lock between two or more of the clients. At a step 704, a Shared Receive Queue, SRQ, is utilized to synchronize the requests to the global lock. An order of the requests in the buffer indicates the state of the global lock.
[0074] This method ensures reduced latency in global lock operations, even in scenarios without contention, thereby enhancing responsiveness of the distributed system. The distributed system supports two types of high availability locks, mirror and slave, offering flexibility based on specific requirements. The high availability locks make the distributed system robust and adaptable which are in addition to regular global locks. The distributed system holds up even without the requirement for high availability but could easily include the properties of the high availability locks. The unlocking process is efficient, with zero latency for a client performing the unlock operation, propagating to the server which ensures no delays in operations of the distributed system. This method also offers flexible contention policies like tryLock, wait, and spinlock, which optimizes lock handling under various conditions. Consumption of a central processing unit in the distributed system is minimized as there is no constant polling of lock’s state from the server implementing the global lock, and polling is only necessary during client’s contention. The distributed system ensures recoverability and fairness by always identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system reliability, and multiple locks can be managed efficiently on the SRQ, or single extended reliable connection, XRC, receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system where the plurality of clients are inherent, unlocking is achieved through a simple RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. The buffer including timestamps in each entry aids in debugging and analysis.
[0075] Optionally, the method further includes a client requesting that the global lock is to be locked by sending a SEND request to the server via a queue pair, QP that is configured to use the SRQ. The SEND request indicates the identity of the client and of the SRQ. The method further includes (i) sending an RDMA READ request to read the entire buffer, (ii) determining if a previous request from same client or another client has locked the global lock and if so determine that the global lock is locked by another client, or (iii) determining if a previous request has unlocked the global lock and if so determine that the global lock is available and thereby locked by the client.
[0076] Optionally, the method further includes the client executing the RDMA READ of the entire memory region including the buffer and the lock info, repeatedly postponing local processing until it is determined that the global lock is already locked while sending a lock operation.
[0077] Optionally, the method further comprises the client executing the RDMA READ of the entire memory region comprising the buffer and the lock info thereby also reading a HEADER entry of the buffer.
[0078] Optionally, the method further includes that the server periodically cleans the buffer by (i) obsoleting old entries of lock and unlock pairs of requests in the buffer, and (ii) moving a HEADER to a new location in the buffer.
[0079] Optionally, the method further includes the client sending a SEND request with a command “UNLOCK” to the server when a currently locked lock is to be unlocked the global lock and then proceeding with local processing, without waiting for a completion indication for the SEND request. Optionally, the buffer is cyclic. Optionally, the buffer manages several global locks. Each request indicates an identity of the lock to be requested.
[0080] Optionally, each buffer’s entry indicates a time stamp, that can be used for collecting statistics and / or aid software debugging. Optionally, each entry indicates a time stamp or a timer. Detection of the global lock may include a live lock if each entry indicates the time stamp, or a dead lock if each entry indicates the timer. Optionally, detecting the live lock or the dead lock includes a real-time method or a periodic method. For example, when a client reads the lock buffer, the lock buffer enables analysis of the dead lock, or the client handling the lock for a longer period, the server declares the dead lock or the live lock, for the active locks in the real-time method. Optionally, the real -time method can be an actual identification method. In another example for the clients with less activity on the lock, or edge cases, the server performs periodic check whether the client is holding the lock for a long time, in the periodic method which can be done either by periodically checking an optional timestamp field or if the optional timestamp field is not available. The optional timestamp field may be determined by checking if the same entry is holding the lock since the last periodic check.
[0081] In another implementation, a method for a server in a distributed system utilizing Remote Direct Memory Access, RDMA is provided. The distributed system includes a server and one or more clients. The server includes a controller. The controller is configured to utilize a buffer of requests to implement a global lock between the clients. The controller is configured to utilize a Shared Receive Queue, SRQ, to synchronize the requests to the global lock. An order of the requests in the buffer indicates the state of the global lock.
[0082] FIG. 8 is a flow diagram that illustrates a method for a client in a distributed system utilizing Remote Direct Memory Access, RDMA in accordance with an implementation of the disclosure. The distributed system includes a server and the client. At a step 802, a global lock to be locked is requested. At a step 804 a SEND request is sent to a server via a Queue Pair, QP. The server QP is configured to use a Shared Receive Queue SRQ. The SEND indicates the identity of the client and of the SRQ. At a step 806, an RDMA READ of the entire buffer is executed. At a step 808, if a previous request for another client that has locked the global lock is determined and if so, the global lock that is locked by another client is determined. At a step 810, if a previous request that has unlocked the global lock is determined and if so, the global lock that is available is determined and thereby locked by the client.
[0083] This method ensures reduced latency in global lock operations, even in scenarios without contention, thereby enhancing responsiveness of the distributed system. The distributed system supports two types of high availability locks, mirror and slave, offering flexibility based on specific requirements. The high availability locks make the distributed system robust and adaptable which are addition to regular global locks. The distributed system holds up even without the requirement for high availability, but could easily include the properties of the high availability locks. The unlocking process is efficient, with zero latency for a client performing the unlock operation, propagating to the server which ensures no delays in operations of the distributed system. This method also offers flexible contention policies like tryLock, wait, and spinlock, which optimizes lock handling under various conditions. Consumption of a central processing unit in the distributed system is minimized as there is no constant polling of lock’s state from the server implementing the global lock, and polling is only necessary during client contention. The distributed system ensures recoverability and fairness by always identifying the lock holder and serving locks in the order of requests, thereby preventing starvation and enabling easy recovery in case of client failure. Native deadlock detection enhances the distributed system reliability, and multiple locks can be managed efficiently on a single SRQ, or single extended reliable connection, XRC, receive queue. The XRC is a logical interface, and SRQ and RQs underlying the single XRC. As the basic global lock uses RC connections, the distributed system implementing the global lock utilizes the XRC with one or more SRQs or RQs, or a mixture. The server plays a crucial role in maintaining efficiency by periodically scanning the buffer and deleting old and / or obsolete entries in the buffer. In the distributed system where the plurality of clients is inherent, unlocking is achieved through a simple RDMA SEND request carrying the defined unlock operation, and the cyclic nature of the buffer ensures effective management. The buffer's capability can manage several global locks. The buffer including timestamps further enhances the distributed system’s scalability in each entry aids in debugging and analysis.
[0084] In another implementation, a computer program product comprising program instructions for performing the method, when executed by one or more processors in a method.
[0085] FIG. 9 is an illustration of a computer system (e.g., controller) in which the various architectures and functionalities of the various previous implementations may be implemented. As shown, the computer system 900 includes at least one processor 908 that is connected to a bus 902, wherein the computer system 900 may be implemented using any suitable protocol, such as Peripheral Component Interconnect, PCI-Express, Accelerated Graphics Port, AGP, Hyper Transport, orany other bus or point- to-point communication protocol. The computer system 900 also includes a memory 906.
[0086] Control logic (software) and data are stored in the memory 906 which may take a form of random-access memory, RAM. In the disclosure, a single semiconductor platform may refer to a sole unitary semiconductor-based integrated circuit or chip. It should be noted that the term single semiconductor platform may also refer to multi -chip modules with increased connectivity which simulate on-chip modules with increased connectivity which simulate on-chip operation, and make substantial improvements over utilizing a conventional central processing unit, CPU and bus implementation. Of course, the various modules may also be situated separately or in various combinations of semiconductor platforms per the desires of the user.
[0087] The computer system 900 may also include a secondary storage 910. The secondary storage 910 includes, for example, a hard disk drive and a removable storage drive, representing a floppy disk drive, a magnetic tape drive, a compact disk drive, digital versatile disk, DVD drive, recording device, universal serial bus, USB flash memory. The removable storage drive at least one of reads from and writes to a removable storage unit in a well-known manner.
[0088] Computer programs, or computer control logic algorithms, may be stored in at least one of the memory 906 and the secondary storage 910. Such computer programs, when executed, enable the computer system 900 to perform various functions as described in the foregoing. The memory 906, the secondary storage 910, and any other storage are possible examples of computer-readable media.
[0089] In an implementation, the architectures and functionalities depicted in the various previous figures may be implemented in the context of the processor 904, a graphics processor coupled to a communication interface 912, an integrated circuit (not shown) that is capable of at least a portion of the capabilities of both the processor 904 and a graphics processor, a chipset (namely, a group of integrated circuits designed to work and sold as a unit for performing related functions, and so forth).
[0090] Furthermore, the architectures and functionalities depicted in the various previous-described figures may be implemented in a context of a general computer system, a circuit board system, a game console system dedicated for entertainment purposes, an application-specific system. For example, the computer system 900 may take the form of a desktop computer, a laptop computer, a server, a workstation, a game console, an embedded system.
[0091] Furthermore, the computer system 900 may take the form of various other devices including, but not limited to a personal digital assistant, PDA device, a mobile phone device, a smart phone, a television, and so forth. Additionally, although not shown, the computer system 900 may be coupled to a network (for example, a telecommunications network, a local area network, LAN, a wireless network, a wide area network, WAN such as the Internet, a peer-to-peer network, a cable network, or the like) for communication purposes through an I / O interface 908.
[0092] It should be understood that the arrangement of components illustrated in the figures described are exemplary and that other arrangement may be possible. It should also be understood that the various system components (and means) defined by the claims, described below, and illustrated in the various block diagrams represent components in some systems configured according to the subject matter disclosed herein. For example, one or more of these system components (and means) may be realized, in whole or in part, by at least some of the components illustrated in the arrangements illustrated in the described figures. In addition, while at least one of these components are implemented at least partially as an electronic hardware component, and therefore constitutes a machine, the other components may be implemented in software that when included in an execution environment constitutes a machine, hardware, or a combination of software and hardware.
[0093] Although the disclosure and its advantages have been described in detail, it should be understood that various changes, substitutions, and alterations can be made herein without departing from the spirit and scope of the disclosure as defined by the appended claims.
Claims
CLAIMS1. A method for a distributed system (100, 200) utilizing Remote Direct Memory Access, RDMA, the distributed system (100, 200) comprising a server (102, 202, 300, 600) and a plurality of clients (106A-N, 306A-N), the method comprising: utilizing a buffer (310) of requests to implement a global lock between two or more of the plurality of clients (106A-N, 306A-N), and utilizing a Shared Receive Queue, SRQ (308, 606), to synchronize the requests to the global lock, wherein an order of the requests in the buffer (310) indicates the state of the global lock.
2. The method according to claim 1, wherein the method further comprises: a client (206) requesting that the global lock is to be locked by sending a SEND request to the server (100, 200, 300, 600) via a queue pair, QP, wherein the QP is configured to use the SRQ (308, 606), wherein the SEND request indicates the identity of the client (206) and of the SRQ (308, 606), and then sending an RDMA READ request to read the entire buffer (310), determining if a previous request from same client or another client has locked the global lock and if so determine that the global lock is locked by another client or determining if a previous request has unlocked the global lock and if so determine that the global lock is available and thereby locked by the client (206).
3. The method according to claim 2, wherein the method further comprises the client (206) executing the RDMA READ of the entire memory region comprising the buffer (310) and the lock info (402), repeatedly postponing local processing until it is determined that the global lock is already locked while sending a lock operation.
4. The method according to claim 2, or 3, wherein the method further comprises the client (206) executing the RDMA READ of the entire memory region comprising the buffer (310) and the lock info (402) thereby also reading a HEADER entry of the buffer (310).
5. The method according to any preceding claim, wherein the method further comprises that the server (102, 202, 300, 600) periodically cleans the buffer (310) by (i) obsoleting old entries of lock and unlock pairs of requests in the buffer (310), and (ii) moving a HEADER to a new location in the buffer (310).
6. The method according to any preceding claim, wherein the method further comprises the client (206) sending a SEND request with a command “UNLOCK” to the server (102, 202, 300, 600) when a currently locked lock is to be unlocked the global lock and then proceeding with local processing, without waiting for a completion indication for the SEND request.
7. The method according to any preceding claim, wherein the buffer (310) is cyclic.
8. The method according to any preceding claim, wherein the buffer (310) manages several global locks, wherein each request indicates an identity of the lock to be requested.
9. The method according to any preceding claim, wherein each buffer’s entry indicates a time stamp, that can be used for collecting statistics and / or aid software debugging.
10. A distributed system (100, 200) utilizing Remote Direct Memory Access, RDMA, the distributed system (100, 200) comprising a server (102, 202, 300, 600) and a plurality of clients (106A-N, 306A-N), the server (102, 202, 300, 600) comprising a controller (104, 204 312) configured to: utilize a buffer (310) of requests to implement a global lock between the two or more of the plurality of clients (106A-N, 306A-N), and utilize a Shared Receive Queue, SRQ (308, 606), to synchronize the requests to the global lock, wherein an order of the requests in the buffer (310) indicates the state of the global lock.
11. A server (102, 202300, 600) in a distributed system (100, 200) utilizing Remote Direct Memory Access, RDMA, the distributed system (100, 200) comprising the server (102, 202300, 600) and a plurality of clients (106A-N, 306A-N), the server (102, 202, 300, 600) comprising a controller (104, 204, 312) configured to: utilize a buffer (310) of requests to implement a global lock between the plurality of clients (106A-N, 306A-N), and utilize a Shared Receive Queue, SRQ (308, 606), to synchronize requests to the global lock, wherein an order of the requests in the buffer (310) indicates the state of the global lock.
12. A method for a server (102, 202, 300, 600) in a distributed system (100, 200) utilizing Remote Direct Memory Access, RDMA, the distributed system (100, 200) comprising the server (102, 202, 300, 600) and a plurality of clients (106A-N, 306A- N), the method comprising: utilizing a buffer (310) of requests to implement a global lock between the two or more of the plurality of clients (106A-N, 306A-N), and utilizing a Shared Receive Queue, SRQ (308, 606), to synchronize requests to the global lock, wherein an order of the requests in the buffer (310) indicates the state of the global lock.
13. A client (206) in a distributed system (100, 200) utilizing Remote Direct Memory Access, RDMA, the distributed system (100, 200) comprising a server (102, 202300, 600) and the client (206), the client (206) comprising a controller (104, 204, 312) configured to: request that a global lock is to be locked by sending a SEND request to the server (100, 200, 300, 600) via a queue pair, QP, wherein the QP is configured to use an SRQ (308, 606), wherein the SEND indicates the identity of the client (206) and of the SRQ (308, 606), and then immediately, without any other RDMA operations in between these two operations, sending an RDMA READ request to read the entire buffer (310), determining if a previous request from same client or another client has locked the global lock and if so determine that the global lock is locked by another client or determining if a previous request has unlocked the global lock and if so determine that the global lock is available and thereby locked by the client (206).
14. A method for a client (206) in a distributed system (100, 200) utilizing Remote Direct Memory Access, RDMA, the distributed system (100, 200) comprising a server (102, 202300, 600) and the client (206), the method comprising: requesting that a global lock is to be locked by sending a SEND request to the server (100, 200, 300, 600) via a queue pair, QP, wherein the QP is configured to use an SRQ (308, 606), wherein the SEND indicates the identity of the client (206) and of the SRQ (308, 606), and then executing an RDMA READ of the entire buffer (310), determining if a previous request from same client or another client has locked the global lock and if so determine that the global lock is locked by another client ordetermining if a previous request has unlocked the global lock and if so determine that the global lock is available and thereby locked by the client (206).
15. A computer program product comprising program instructions for performing the method according to any of claims 1 to 9, 12 or 14, when executed by one or more processors in an RDMA system.