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

A queue data control method, system and queue data structure

A technology of data control and queuing, which is applied in the computer field and can solve problems such as lock-free queues affecting performance, unfriendly garbage collection, and non-blocking operations.

Active Publication Date: 2021-12-07
浙江齐安信息科技有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] However, the implementation of the lock-free queue above still has some problems that affect performance
For example, creating / recycling linked list nodes adds a lot of memory operations, which are not friendly to garbage collection in some languages; frequently exchanging head and / or tail count information between producers and consumers has an impact on performance, and , some adjustments made to improve tail performance do not support non-blocking operations

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 queue data control method, system and queue data structure
  • A queue data control method, system and queue data structure
  • A queue data control method, system and queue data structure

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] The present application will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings, but these embodiments do not limit the present application, and those of ordinary skill in the art make structural, method, or functional transformations based on these embodiments All are included in the scope of protection of this application.

[0054] A queue is a linear list with insertions at one end and removals at the other end. The reading and writing of the queue follows the principle of first-in-first-out, and the elements put into the queue first will be taken out first. Usually, the end that allows insertion is called the tail of the team, and the end that allows removal is called the head of the team. Also, a program that inserts data is called a producer thread, and a program that takes out data is called a consumer thread.

[0055] The queue adopts a sequential storage structure, uses an array as the sequential stora...

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 application discloses a queue data control method, including: setting a circular queue, the circular queue includes at least one address, and the address is used to store elements; setting an insert failure counter, which is used to record the address where the element fails to be inserted in the circular queue; The counter is used to record the address of the failure to remove the element in the circular queue; set the operation lock of the insertion failure counter and the operation lock of the removal failure counter; when performing enqueue operation, if there is a record of the failure to remove the element in the removal failure counter, lock the removal The operation lock of the failure counter, after deleting the record of the failed event of extracting the element, release the operation lock of the failed counter of extracting, and reacquire the tail pointer of the queue; when performing the dequeue operation, if there is a record of the failed event of inserting the element in the insertion failure counter, lock the insertion The operation lock of the failure counter, after deleting the record of the failure event of inserting the element, releases the operation lock of the failure counter operation of the insertion failure, and reacquires the queue head pointer.

Description

technical field [0001] The present application belongs to the field of computer technology, and in particular relates to a queue data control method, system and queue data structure. Background technique [0002] A concurrent program refers to a program composed of several program modules that can be executed at the same time, and such program modules that can be executed at the same time are called threads. Multiple threads that make up a program can execute concurrently on multiple processors at the same time, and can also execute interactively on a single processor. Multiple threads can communicate with each other by reading and writing shared data areas or sending messages, so as to cooperate with each other to complete tasks. The multi-threaded execution method can greatly shorten the execution time of the program and improve the operating efficiency of the computer. [0003] However, the most prominent problem in multithreaded programs is data synchronization. When ...

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 Patents(China)
IPC IPC(8): G06F9/52G06F9/38
CPCG06F9/526G06F9/3834
Inventor 张宙阮涛左海波梁猛郦建新张扬
Owner 浙江齐安信息科技有限公司