A wait-free stack operation method based on an array structure in a multi-core environment

A technology of array structure and stack operation, which is applied in the direction of multi-channel program device, electrical digital data processing, program control design, etc., and can solve the problems of complex design and low performance of waiting-free data structure

Active Publication Date: 2019-04-26
INST OF INFORMATION ENG CHINESE ACAD OF SCI
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the design of wait-free data structures is often more complicated, and the performance is lower

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 wait-free stack operation method based on an array structure in a multi-core environment
  • A wait-free stack operation method based on an array structure in a multi-core environment
  • A wait-free stack operation method based on an array structure in a multi-core environment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0083] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

[0084] The present invention utilizes as figure 1The data structure shown is used to build a stack, the global array is divided into multiple segments containing N array elements, and a doubly linked list structure is formed between segments. Among them, each segment has a unique identifier id, a next pointer pointing to the next segment, a prev pointer pointing to the previous segment, and a variable coun...

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 wait-free stack operation method based on an array structure under multinuclear environment. The method includes the steps that 1, a main program initializes a global array representing a stack and namely allocates a segment comprising N array elements; 2, m threads are started, and each thread maintains a variable hi for storing own operation state, wherein the variable hi includes a pointer next, a push partner pointer and a pull partner pointer; 3, the pointer next in the variable hi is used for linking the operation state of the m threads into a ring shape; 4, the main program waits to receive the request of conducting operation on the stack by the threads, if the operation request of the threads is a push request, the wait-free push operation is executed, if the operation request of the threads is a pull request, the wait-free pull operation is executed, if the operation request of the threads is a destroy request, the main program first destroys the stack, and execution of all threads including the main program is finished. The wait-free stack operation method is high in parallelism degree and low in complexity and provides a wait-free schedule guarantee for thread operation.

Description

technical field [0001] The invention belongs to the technical field of parallel algorithms, and in particular relates to a wait-free stack operation method based on an array structure in a multi-core environment. Background technique [0002] With the rapid popularization of multi-core processors, the computer programming mode has changed from the traditional serial programming mode to the thread-level parallel programming mode, so as to achieve the actual effect consistent with the increase in the number of cores. Shared data structures (for example: stacks and queues), as a common means of communication between threads, are important components of multi-threaded applications. In order to ensure that multi-threaded applications run efficiently on multi-core platforms, it is necessary to design high-performance concurrent data structures. In addition, progress guarantee is another big feature that concurrent data structures need to provide. Concurrent data structures gener...

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/30G06F9/52
CPCG06F9/3004G06F9/526
Inventor 彭亚琼郝志宇刘永继李大辉崔磊
Owner INST OF INFORMATION ENG CHINESE ACAD OF SCI
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