Task processing method and device, electronic equipment and storage medium

A task processing and task technology, applied in the computer field, can solve problems such as system performance degradation, production task blocking, high system delay, etc., and achieve the effect of improving task processing performance and avoiding locking and blocking

Pending Publication Date: 2022-05-13
INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At present, thread pool implementations use some advanced data structures such as queues and linked lists to organize tasks. When using these data, such as enqueueing and dequeueing of tasks, it is necessary to use a lock mechanism to protect the queue structure and prevent data corruption. In some application scenarios The use of locks will cause system performance degradation. For example, in the storage system, the use of locks will cause excessive system delay
[0005] In addition, the producer and consumer models are used for the generation and execution of tasks. When the production efficiency of producers is higher than that of consumers, the task queue will be full, which will also cause production tasks to block and affect performance.
[0006] Therefore, how to avoid low performance caused by locking and blocking is a technical problem to be solved by those skilled in the art

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
  • Task processing method and device, electronic equipment and storage medium
  • Task processing method and device, electronic equipment and storage medium
  • Task processing method and device, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Apparently, the described embodiments are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application. In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.

[0046] The embodiment of the present application discloses a task processing method, which avoids the problem of low performance caused by locking and blocking, and improves task processing performance.

[0047] see figure 1 , a flow chart of a task processing method shown accor...

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 task processing method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: determining a production thread and a consumption thread of a first target task when an enqueue request of the first target task is received; determining a corresponding first target task queue unit in the two-dimensional task queue matrix based on the generation thread and the consumption thread; wherein the two-dimensional task queue matrix comprises a plurality of task queue units in n rows and n columns, and n is the number of production threads or the number of consumption threads; and storing the first target task in the first target task queue unit. Therefore, according to the task processing method provided by the invention, the problem of low performance caused by locking and blocking is avoided, and the task processing performance is improved.

Description

technical field [0001] The present application relates to the field of computer technology, and more specifically, to a task processing method and device, an electronic device, and a computer-readable storage medium. Background technique [0002] A thread pool is a form of multithreading in which tasks are added to a queue and then automatically started after threads are created. Thread pool threads are all background threads. Each thread uses the default stack size, runs at the default priority, and is in a multithreaded apartment. If a thread is idle in managed code, the thread pool will insert another worker thread to keep all processors busy. If all thread pool threads are kept busy all the time, but the queue contains pending work, the thread pool will create another worker thread after a while but the number of threads will never exceed the maximum. Threads that exceed the maximum can be queued, but they won't start until other threads have finished. [0003] Too m...

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 & AuthorityApplications(China)
IPC IPC(8): G06F9/54
CPCG06F9/546G06F2209/548
Inventor孙明刚
OwnerINSPUR SUZHOU INTELLIGENT TECH CO LTD