Task processing method and device

A task processing and task technology, applied in the field of task processing, can solve problems such as system resource occupation, affecting user experience, and the inability of thread pools to provide scalability.

Active Publication Date: 2011-02-02
YONYOU NETWORK TECH CO LTD
View PDF3 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The advantage of the former is that it will not take up a lot of system resources due to too many tasks, but the disadvantage is that it wastes the parallel processing capacity of the computer and is inefficient.
The latter has the advantage of maximizing the use of the parallel computing capabilities of the system, but the disadvantages are also obvious. On the one hand, due to the constraints or competition of tasks executed at the same time, thread synchronization is required, which brings additional system resources. Overhead (thread switching, lock competition, etc.), when there are many constraints and competitions between tasks, it will cause low system efficiency. On the other hand, most thread pools cannot provide good scalability (load controllable) ), resulting in excessive occupation of system resources under heavy load, which greatly affects the user experience
[0003] Therefore, there is a need for a task processing method that can maximize the use of the computer's parallel capabilities, while avoiding the problem of thread synchronization caused by constraints between tasks and consuming system resources.

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
  • Task processing method and device
  • Task processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] In order to understand the above-mentioned purpose, features and advantages of the present invention more clearly, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0023] In the following description, many specific details are set forth in order to fully understand the present invention, but the present invention can also be implemented in other ways different from those described here, therefore, the present invention is not limited to the specific embodiments disclosed below limit.

[0024] figure 1 is a flowchart of a task processing method according to an embodiment of the present invention.

[0025] Such as figure 1 As shown, the task processing method according to the embodiment of the present invention includes: step 102, receiving an input task; step 104, judging whether the task has a synchronization attribute, and when the task has a synchronization attribute, enter step...

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 task processing method and device. The method comprises the following steps: step102, the input tasks are received; step 104, whether the tasks have synchronous attributes is judged, if so, the step 106 is performed; if not, the step 110 is performed; step 106, according to the synchronous attributes of the tasks, the exclusion tasks corresponding to the tasks are searched in the currently executed task; step 108, if the exclusion tasks corresponding to the tasks exist in the currently executed task, the tasks are not executed until the exclusion tasks do not exist inthe currently executed task; and step 110, the tasks are executed. The invention also provides a task processing device. According to the technical scheme of the invention, synchronous queuing is performed on the tasks in constraint relations, thus avoiding the competition between the tasks; then the execution hysteresis of the tasks in the queue is adjusted by means of the priority; and the waitqueue and the set task number are utilized to execute the maximum number of tasks, thus the load capacity can be controlled and the good system scalability can be obtained.

Description

technical field [0001] The invention relates to task processing technology, in particular to a task processing method and device. Background technique [0002] In enterprise management software, there are a large number of asynchronous tasks, such as sending various notifications (messages, SMS, emails, etc.), and performing certain automatic actions (automatically calling services, etc.). As user stress increases, a large number of these tasks can be generated in a short period of time. Existing solutions are generally divided into two types: one is to arrange these tasks into a first-in-first-out (FIFO) queue, and then execute them one by one in order; the other is to use a thread pool to multi-thread the task Execute in parallel. The advantage of the former is that it will not take up a lot of system resources due to too many tasks, but the disadvantage is that it wastes the parallel processing ability of the computer and is inefficient. The latter has the advantage of...

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/46G06F9/52
Inventor 王昊沙
Owner YONYOU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products