Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A lock-free multi-thread data synchronization method

A data synchronization and multi-threading technology, applied in the computer field, can solve problems such as time-consuming, and achieve the effect of solving deadlocks

Active Publication Date: 2019-01-08
WUXI FANTIAN INFORMATION TECH
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

All kernel objects have the function of protecting shared data, and all need to wait for the signal object, which will take a lot of time in the waiting process

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 lock-free multi-thread data synchronization method
  • A lock-free multi-thread data synchronization method
  • A lock-free multi-thread data synchronization method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] The present invention will be further described below in conjunction with drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only parts related to the present invention are shown in the drawings but not all content.

[0019] Please refer to figure 1 as shown, figure 1 It is a flowchart of a lock-free multi-thread data synchronization method provided by an embodiment of the present invention.

[0020] In this embodiment, the lock-free multi-thread data synchronization method specifically includes the following steps:

[0021] Step S101, the main thread receives a message, and dispatches and processes the message.

[0022] Step S102, the main thread judges whether the sub-thread is in a suspended state or a dormant state (sleep), if yes, execute step S103, otherwise...

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 lockless multithread data synchronization method. The method includes the following steps that A, a main thread receives information and dispatches and processes information; B, whether child threads are in the suspended state or not is judged, if yes, the step C is executed, and if not, no operation is executed; C, the main thread creates a queue 1, files in the queue 1 are copied to a queue 2, and then data in the queue 1 are eliminated; D, a signal object is set through the main thread to be in the state with signals; E, the child threads obtain signals, traverse files in the queue 2 and circularly call and load objects, and the created objects are inserted into a queue 3; F, whether the child threads are in the suspended state or not is judged, if yes, the step G is executed, and if not, no operation is executed; G, data in the queue 3 are copied to a queue 4 through the main thread, and the data in the queue 3 are eliminated; H, the created objects are inserted into the queue 1, and the signal object is set to be in the state with signals. By means of the lockless multithread data synchronization method, the problem that deadlock phenomenon happens to access objects of the main thread and the child threads is solved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a lock-free multi-thread data synchronization method. Background technique [0002] With the development of computer systems, the rendering function of a graphics processing unit (Graphic Processing Unit, GPU) is liberated from a central processing unit (CPU). This greatly improves the speed of graphics drawing. In the past, all calculations for image rendering were done by the CPU, and the reconstruction speed was slow, making it difficult to meet the requirements of real-time rendering. However, the continuous improvement of computer graphics hardware performance has made it possible to use graphics processing units to perform real-time interactive operations on data. In the application program, each application program is a process, and the process is composed of one or more threads. Without threads, the resources of the process cannot be utilized by the CPU. For an appli...

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/46G06F9/52
Inventor 张翼
Owner WUXI FANTIAN INFORMATION TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products