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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com