A method and device for acquiring a spin lock

A spin lock and serial number technology, applied in the computer field, can solve the problem of low spin lock acquisition efficiency, and achieve the effect of improving concurrency efficiency

Inactive Publication Date: 2019-04-02
RUIJIE NETWORKS CO LTD
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] Embodiments of the present invention provide a method and device for obtaining spin locks, which are used to solve the technical problem of low efficiency of obtaining spin locks in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for acquiring a spin lock
  • A method and device for acquiring a spin lock
  • A method and device for acquiring a spin lock

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0060] "First" and "second" in the description and claims of the present invention and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the term "comprise", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.

[0061] Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and device for obtaining a spin lock, and the method comprises the steps of carrying out the queuing of a plurality of tasks through an atomic operation function of aCPU; determining a sequence number queue used for representing the sequence of the plurality of task access critical areas, and a queue head sequence number and a queue tail sequence number of the sequence number queue, the queue head sequence number and the queue tail sequence number being used for representing queuing information of spin locks of the critical areas acquired by corresponding tasks; determining an atomic sequence number corresponding to a first task to be accessed to the critical region based on the queue head sequence number; and if the queue tail serial number is equal to the atomic serial number, controlling the first task to obtain the spin lock of the critical region. According to the present invention, the technical problem that an existing spin lock is low in obtaining efficiency is solved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for acquiring a spin lock. Background technique [0002] With the development of CPU (Central Processing Unit, central processing unit) multi-core and parallel technology, in the multi-node large-scale NUMA (Non Uniform Memory Access Architecture, non-uniform memory access) system using NC (Node Controller, node controller), in order to To ensure the consistency of shared resources, the spinlock mechanism is usually used to control the concurrent operations of multiple transactions. [0003] Specifically, spin lock is a lock mechanism proposed to protect shared resources. Spin locks are similar to mutexes, they are all to solve the mutually exclusive use of a certain resource. Whether it is a mutex or a spin lock, there can only be at most one holder at any time. That is, at most one execution unit can acquire the lock at any time. But the two are slight...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/50G06F9/48
CPCG06F9/4881G06F9/5022
Inventor 唐友灿
Owner RUIJIE NETWORKS CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products