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

Multi-thread data processing method and device, electronic equipment and readable storage medium

A data processing and multi-threading technology, applied in the computer field, can solve problems such as processor performance overhead, achieve the effect of reducing performance overhead and ensuring synchronization

Pending Publication Date: 2021-02-23
龙芯中科(合肥)技术有限公司
View PDF0 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] At present, the way to solve the above problems is usually to use thread locks, that is, during the process of thread A accessing data, other threads cannot access the data, and only after waiting for thread A to release the thread lock, other threads can access the data. Guarantee data synchronization, but using thread locks will bring significant performance overhead to the processor

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
  • Multi-thread data processing method and device, electronic equipment and readable storage medium
  • Multi-thread data processing method and device, electronic equipment and readable storage medium
  • Multi-thread data processing method and device, electronic equipment and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0046] The multi-thread data processing method provided in the embodiment of the present application can be applied to various forms of electronic devices, such as mobile terminals, computers, vehicle-mounted terminals, wearable devices, and the like.

[0047] refer to figure 1 , figure 1 It is a schematic diagram of a hardware structure of an e...

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 provides a multi-thread data processing method and device, electronic equipment and a readable storage medium, and the method comprises the steps: firstly determining whether the numberof bytes of to-be-processed data is smaller than or equal to the width of a register or not, and generating an instruction sequence corresponding to a current thread when the number of bytes of the to-be-processed data is smaller than or equal to the width of the register; wherein the instruction sequence comprises to-be-processed data and an atomic operation instruction, and the atomic operationinstruction is used for processing the to-be-processed data; and executing an instruction sequence corresponding to the current thread, the to-be-processed data being data shared by a plurality of threads. According to the embodiment of the invention, when the byte number of the to-be-processed data is smaller than or equal to the width of the register, the to-be-processed data can be written intothe instruction sequence, and the reading or writing operation of the to-be-processed data can be completed through the atomic operation instruction, so that the synchronization of multi-thread datacan be ensured without adopting a thread lock; and the performance overhead of the processor in the multi-thread data synchronization process is reduced.

Description

technical field [0001] The embodiments of the present invention relate to the field of computer technology, and in particular, to a multi-thread data processing method, device, electronic equipment, and readable storage medium. Background technique [0002] As a technology that can realize concurrent execution of multiple threads from software or hardware, multi-threading technology can effectively improve the resource utilization rate of the central processing unit (Central Processing Unit, referred to as CPU) and speed up the program response speed. use. [0003] However, while realizing multi-threaded concurrent execution, it also brings about the problem of data synchronization. For example, when thread A accesses a certain data, thread B also accesses and modifies a constant in the data at the same time, which will cause thread A to finally get a wrong access result. [0004] At present, the way to solve the above problems is usually to use thread locks, that is, duri...

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/30
CPCG06F9/5027G06F9/30098
Inventor 余银赵家众穆涛
Owner 龙芯中科(合肥)技术有限公司
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