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

Task stealing method and system based on task stealing algorithm

A task and algorithm technology, applied in the field of multi-threaded load balancing, can solve problems such as poor load balancing effect and inability to solve high delay, and achieve the effect of reducing delay

Active Publication Date: 2020-03-24
SHANGHAI JIAO TONG UNIV
View PDF8 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, the traditional Work Stealing mechanism is hardly triggered, and cannot solve the problem of high latency caused by some requests being blocked by complex computing tasks in a high-concurrency request processing system
[0008] The traditional Work Stealing technology only steals computing tasks when the task queue is empty, and it is rare for a thread task queue to be empty in a high-concurrency request processing system. Therefore, the traditional Work Stealing algorithm (task stealing algorithm) The load balancing effect is poor in a high-concurrency system

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 stealing method and system based on task stealing algorithm

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0044] The present invention will be described in detail below in conjunction with specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0045] According to a task stealing method based on a task stealing algorithm provided by the present invention, comprising:

[0046]Step 1: Arrange the threads in the high-concurrency request processing system in ascending order to form a queue, and the queues are connected end to end to form a ring;

[0047] Step 2: For the current thread, judge the state of the next thread; if it is in an overload state, execute step 3; if it is in a normal state, execute step A;

[0048] Step 3: According to the th...

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 stealing method and system based on a task stealing algorithm, and the method comprises the steps: 1, enabling all threads in the system to be arranged from small to large according to numbers to form a queue, and enabling the queue to be connected end to end to form a ring; 2, judging the state of the next thread according to the current thread; if the thread is in the overload state, stealing the calculation task from the task queue of the overload thread, and if the thread is in the normal state, executing the step A; 3, locally executing the calculation task stolen in the step 2, then executing the step 2, and continuing to check the state of the next thread of the overload thread; step A, judging whether a queued computing task exists in a local queue ornot, and if the queue is not empty, executing the computing task in a current thread queue; and if the queue is empty, completing the Ring Steering process once. According to the method and the device, the thread in a normal state can share the load pressure of a plurality of overload threads, and the request delay is reduced.

Description

technical field [0001] The present invention relates to the field of multi-thread load balancing, in particular to a task-stealing method and system based on a task-stealing algorithm, and in particular to a task-stealing algorithm based on Work Stealing for low-latency and high-concurrency multi-threaded systems. Background technique [0002] Since the performance improvement of a single CPU core has a serious bottleneck problem, more and more systems have begun to use multiple threads to perform parallel computing to improve the concurrent processing capabilities of the system. This type of high-concurrency request processing system usually receives new requests continuously, and the requests are stored in the task queue. Each request is actually a computing task, and the computing tasks are independent of each other. The system is generally composed of multiple threads, each thread is equipped with a task queue, each thread takes requests from its own task queue, and the...

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/50
CPCG06F9/5088Y02D10/00
Inventor 陈榕龚振晗陈海波臧斌宇
Owner SHANGHAI JIAO TONG UNIV
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