Supercharge Your Innovation With Domain-Expert AI Agents!

Method and terminal for dynamically dispatching thread pool

A technology of dynamic scheduling and thread pool, applied in the direction of multi-program installation, program startup/switching, etc., can solve the problems of large access volume, slow interface response, time-consuming multi-service interface, etc., to avoid idle and congestion, reasonable and efficient The effect of scheduling and optimizing thread pool resources

Active Publication Date: 2021-10-08
FUJIAN TIANQUAN EDUCATION TECH LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] At present, a program project has many different business functions, and there may be various business interfaces according to different business functions, such as business interfaces with a large number of visits, business interfaces that consume a lot of time, or services with frequent delays Interface, when the interface response of the underlying service basic services such as database, network or IO is slow, it will occupy a large number of threads to process. If the request volume is large at this time, other interface requests will be blocked, delayed or unable to respond The problem
[0003] In view of the above problems, the existing technology usually allocates business interfaces into different thread pools, and each type of business interface can only run in the corresponding thread pool. When the business interface thread of a certain thread pool is blocked, it will not occupy other thread pools. The resources of the thread pool avoid affecting the running of threads in other thread pools; however, the creation of these thread pools is usually programmed in advance, and a fixed thread pool is created as soon as the program project starts, that is, the business interface and its corresponding thread pool are fixed. Binding relationship, so for some business interfaces with unstable access, the corresponding thread pool will be sometimes idle and sometimes congested, so that the thread pool cannot be called reasonably efficiently

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 and terminal for dynamically dispatching thread pool
  • Method and terminal for dynamically dispatching thread pool
  • Method and terminal for dynamically dispatching thread pool

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0086] Please refer to figure 1 , a method for dynamically scheduling thread pools, including steps:

[0087] S1. Multiple thread pools are preset, and each thread pool has different numbers of threads;

[0088] Wherein, the S1 further includes: setting a thread pool configuration information table corresponding to the plurality of thread pools, the thread pool configuration information table including a thread pool unique identifier field and a thread pool thread number field;

[0089] Specifically, each thread pool corresponds to a record in the thread pool information table, and each record includes related fields such as a thread pool unique identifier field, a thread pool thread number field, and the like;

[0090] S2. Calculating the calling frequency of a business interface;

[0091] Wherein, the S2 further includes: determining the type of the service interface, and determining the priority of the service interface according to the type of the service interface;

[...

Embodiment 2

[0110] Please refer to figure 1 and image 3 The difference between this embodiment and Embodiment 1 is that in the S31, it is judged whether there is a matching thread pool uniqueness in the thread pool configuration information table according to the field of the number of threads, the field of the minimum number of threads in the thread pool, and the field of the field of the maximum number of threads in the thread pool. Identification fields also include:

[0111] If not, then execute step S33;

[0112] S33. Add a new thread pool matching the number of threads, and add a record corresponding to the new thread pool in the thread pool configuration information table, and schedule according to the thread pool unique identifier field of the new thread pool The corresponding thread pool;

[0113] Or re-divide the thread pool, generate new each thread pool, and update the record corresponding to the configuration information table of the thread pool, each of the new thread po...

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 present invention provides a method and a terminal for dynamically scheduling thread pools. By presetting multiple thread pools, each thread pool has different numbers of threads, calculating the call frequency of a service interface, and dynamically scheduling the service interface according to the call frequency. A thread pool that matches the interface; it can dynamically schedule the thread pool corresponding to the business interface, avoid the problem of idleness and congestion of the thread pool caused by the mutual binding of the business interface and the thread pool, and optimize the thread pool resources, so as to realize reasonable and efficient scheduling of the thread pool .

Description

technical field [0001] The invention relates to the field of computer software, in particular to a method and a terminal for dynamically dispatching a thread pool. Background technique [0002] At present, a program project has many different business functions, and there may be various business interfaces according to different business functions, such as business interfaces with a large number of visits, business interfaces that consume a lot of time, or services with frequent delays Interface, when the interface response of the underlying service basic services such as database, network or IO is slow, it will occupy a large number of threads to process. If the request volume is large at this time, other interface requests will be blocked, delayed or unable to respond The problem. [0003] In view of the above problems, the existing technology usually allocates business interfaces into different thread pools, and each type of business interface can only run in the corresp...

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/48
Inventor 刘德建林伟郭玉湖
Owner FUJIAN TIANQUAN EDUCATION TECH LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More