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

Method, system and multi-thread processor for processing data by multi-thread through array

An array processing and multi-threading technology, applied in the field of data processing, can solve problems such as deadlocks in the use of mutex locks, affecting software fluency and efficiency, and achieve the effect of improving efficiency

Active Publication Date: 2016-06-29
ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD +1
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The mutex will make the software run into the kernel mode, which affects the smoothness and efficiency of the software running, and the improper use of the mutex can easily cause troubles such as deadlock

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, system and multi-thread processor for processing data by multi-thread through array
  • Method, system and multi-thread processor for processing data by multi-thread through array
  • Method, system and multi-thread processor for processing data by multi-thread through array

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0068] refer to figure 1 As shown, the present invention constructs an array, each element in the array includes data and a state value for marking whether the element stores data, wherein, the state value is 0 to represent unstored data, and 1 to represent stored data ;The array sets two storage counts and read counts, the storage count is used to mark the number of elements stored in the array, and the read count is used to mark the number of elements that can be read in the array; the array corresponds to the storage count and read respectively There are two sets of cursors for counting. The cursors corresponding to storage counts are storage cursors and extended storage cursors. The storage cursors are used to indicate the element positions that are stored in the current array, and the extended storage cursors are used to indicate the element positions that are being stored in the current array. , the cursor corresponding to the read count is a read cursor and an extended ...

Embodiment 2

[0117] This embodiment further describes the present invention in detail through specific examples.

[0118] in, figure 1 The array shown in is the initialized data, the storage cursor, extended storage cursor, read cursor, and extended read cursor are all -1, and the storage count and read count are both 0.

[0119] After that, assuming that 4 threads need to store data at the same time, refer to Figure 9 As shown in , the storage locations obtained by each thread are shown in the figure. Thread 2 corresponds to location 0, thread 1 corresponds to location 1, thread 3 corresponds to location 2, and thread 4 corresponds to location 3. Since none of the four threads has completed the storage operation , the storage count is set to 4, and the read count is still 0. At this time, the extended storage cursor points to position 3, and the storage cursor is still -1.

[0120] Figure 10 It is a schematic diagram of thread 2, thread 3 and thread 4 after storage is completed. Alth...

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 multithreading method and system for processing data through an array and a multithreading processor. A multithreading reads and stores the data in an array mode, the using of a mutual exclusion lock is avoided, and the reading and storing efficiency is improved; a cursor is used for enabling the positions where the data are stored by the multithreading at the same time not to be overlapped in an atom progressive increase mode, and guaranteeing that the multithreading operates synchronously without interference; the array is set to be 2<N>, the operation of the cursor is simplified into atom progressing increase, and even when the range overflow of the cursor starts from 0, the correct position pointing can be guaranteed; a new designing thought is provided for synchronous design of kernel design, multithreading design and server design.

Description

technical field [0001] The invention relates to the field of data processing, in particular to a method, system and multi-thread processor for multi-thread processing data through an array. Background technique [0002] As the number of CPU cores continues to increase, multi-threaded development and application has become an indispensable and important software technology. The use of multi-threaded concurrent execution mechanism can significantly improve the operating efficiency of software. At present, when data access and exchange operations are performed between multiple threads, mutual exclusion locks are generally used for processing. One thread needs to lock when storing data, and the other thread also needs to lock when reading data. Lock, this method ensures the security of data access and exchange between multiple threads, but also increases the overhead of software operation and programming difficulty. The mutex will make the software run into the kernel mode, whi...

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/38
Inventor 余欣
Owner ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
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