Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device of controlling storage information in orderly manner by threads without locking and server

A technology to control storage and storage location, applied in multi-program device, program control design, program synchronization, etc., can solve the problems of reducing concurrency efficiency and increasing additional overhead, and achieve the effect of reducing additional overhead and improving concurrency efficiency

Active Publication Date: 2018-08-03
JUHAOKAN TECH CO LTD
View PDF5 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In order to enable lock-free threads to read and write stored data in an orderly manner, there are blocking or non-blocking algorithms for storage queues, but they must ensure that concurrent threads access the same storage node synchronously (for ease of description, hereinafter referred to as shared storage nodes) to maintain the integrity of the storage queue Respectively, by delaying the queue (such as: generating and verifying additional unique codes) or restricting multi-threads to complete operations on the shared storage nodes in the storage queue within limited steps (such as: adding virtual nodes and controlling their entry and exit), so that added overhead
[0004] In some cases, such as when more threads on the server need to frequently read and write storage nodes in the storage queue, the outstanding additional overhead will also reduce the concurrency efficiency

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
  • Method and device of controlling storage information in orderly manner by threads without locking and server
  • Method and device of controlling storage information in orderly manner by threads without locking and server
  • Method and device of controlling storage information in orderly manner by threads without locking and server

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0049] In some cases, such as the distributed client centrally produces payment orders based on the user's purchase of goods, and sends the payment order to the server, and the server processes each payment order. In order to improve the user's consumption experience, the server needs to store the consumption data in the payment order in a timely manner. Give client feedback. At this time, concurrent lock-free threads storing consumption data will frequently seize shared storage nodes, and storage nodes will also frequently enter and exit from the storage queue. Correspondingly, multi-threaded reading of consumption data in the server will also increase the frequency of entering and exiting queues. In order to consider the integrity of the data structure in the storage queue, adding virtual nodes or additional identifiers will reduce the concurrency efficiency.

[0050] In order to improve the concurrency efficiency of threads in the above situation, such as figure 1 As shown, ...

Embodiment 2

[0088] In some cases, such as distributed client sharing bullet chatting information through communication and interaction with the server, the bullet chatting information produced based on user editing behavior on a client is sent to the server, and the server feeds back the bullet chatting information based on video requests on other clients. The barrage information is shared by distributed clients, and the live video is played centrally on the client. At this time, the server reads the barrage information and inserts the barrage information into the live video. When the interaction between the server and the distributed client is frequent , different barrage information also needs to be continuously inserted into the live video.

[0089] In order to improve the thread concurrency efficiency in the above situation, such as Figure 5 As shown, the present application provides another method for a lock-free thread to control and store information in a circular queue, and the s...

Embodiment 3

[0113] Based on the same idea, Embodiment 2 of the present invention also provides a device for processing resource data, which can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, the device for processing test data of the present invention, as a device in a logical sense, is formed by reading the corresponding computer program instructions in the memory through the CPU equipped with it and then running it.

[0114] In an exemplary embodiment of the present invention, a lock-free thread controls and stores information in a circular queue. The basic operating environment of the device includes CPU, memory and other hardware. From a logical perspective, the logical structure of the device 800 Such as Figure 8 As shown, it includes: an instruction call unit 810 , a state modification unit 820 , a node allocation unit 830 and a cursor update unit 840 .

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 relates to the field of data storage technology, and provides a method and a device of controlling storage information in an orderly manner by threads without locking and a server. The method includes: invoking, according to non-releasing status of a shared storage node in a cyclic queue, a CAS instruction during storing current data to the shared storage node by a focus thread in the at least two first threads; changing the non-releasing status to releasing status when current-data storing ends, wherein the releasing status is used for indicating that a second thread can read the current data; allocating the shared storage node in the releasing status for the second thread; and updating an original cursor by a single vector according to consistency of the storage location ofthe shared storage node in the circular queue and the original cursor in the CAS instruction to enable the focus thread to lock the shared storage node. Therefore, the threads can be controlled to access data in an orderly manner, the problem of additional overheads generated in controlling the storage queue is overcome, and thread concurrency efficiency is improved.

Description

technical field [0001] The invention relates to the technical field of data storage, in particular to a method and a device for controlling and storing information in a circular queue by a lock-free thread. Background technique [0002] In related technologies, in order to avoid data conflicts caused by threads of applications or operating systems reading and writing stored data from the storage queue at the same time, the thread is locked to control its serial read and write operations. After the lock is released, the suspended thread can be locked to read and write the stored data serially, which limits the concurrency efficiency of the storage queue, so it is obviously more efficient to use the lock-free thread method. [0003] In order to enable lock-free threads to read and write stored data in an orderly manner, there are blocking or non-blocking algorithms for storage queues, but all must ensure that concurrent threads access the same storage node synchronously (for e...

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
IPC IPC(8): G06F9/52G06F9/54
CPCG06F9/522G06F9/542
Inventor 刘希伟王绍民张凡文
Owner JUHAOKAN TECH CO LTD