Unlock instant, AI-driven research and patent intelligence for your innovation.

Thread pool unified scheduling monitoring method and system

A monitoring system and thread pool technology, applied in the field of thread pool, can solve problems such as unbalanced CPU core load and low reliability of individual threads, and achieve the effects of ensuring full utilization, avoiding waste of thread resources, and improving flexibility

Inactive Publication Date: 2020-11-24
SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
View PDF0 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In order to solve the problems existing in the prior art, the present invention innovatively proposes a thread pool unified scheduling and monitoring method and system, which effectively solves the problems of unbalanced CPU core load and low reliability of setting individual threads in the prior art, effectively Improve the reliability of thread pool monitoring, make the CPU core load balance, CPU resources are fully utilized

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
  • Thread pool unified scheduling monitoring method and system
  • Thread pool unified scheduling monitoring method and system
  • Thread pool unified scheduling monitoring method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] Such as figure 1 As shown, the present invention provides a thread pool unified scheduling monitoring method, including:

[0044] S1, obtain the number of processor cores, and determine the number of threads to be created according to the number of processor cores;

[0045] S2, establish a corresponding queue according to the number of threads to be created, for storing tasks to be processed;

[0046] S3, calculate the remainder of the first attribute value of the task and the total number of threads, and schedule the corresponding thread to execute the task according to the result of the remainder calculation;

[0047] S4, the running clock cycle of the thread is monitored between adjacent threads.

[0048] Wherein, in step S1, the number of threads to be created is not greater than the number of processor cores. When the number of created threads is less than the number of CPU cores, if there are other additional task processes that need to occupy CPU resources and ...

Embodiment 2

[0066] Such as Figure 4 As shown, the technical solution of the present invention also provides a thread pool unified scheduling monitoring method, including:

[0067] S1, obtain the number of processor cores, and determine the number of threads to be created according to the number of processor cores;

[0068] S2, establish a corresponding queue according to the number of threads to be created, for storing tasks to be processed;

[0069] S3, calculate the remainder of the first attribute value of the task and the total number of threads, and schedule the corresponding thread to execute the task according to the result of the remainder calculation;

[0070] S4, the thread pool creates a callback function, which is used to complete the scheduling task when polling the task;

[0071] S5, monitor the running clock cycles of the threads between adjacent threads.

[0072] In step S4, the thread pool creates a callback function (callback_function), which is used to call the call...

Embodiment 3

[0076] Such as Figure 5 As shown, the technical solution of the present invention also provides a thread pool unified scheduling monitoring system, including:

[0077] The acquisition unit 101 acquires the number of processor cores, and determines the number of threads to be created according to the number of processor cores;

[0078] The queue establishment unit 102 establishes a corresponding queue according to the number of threads to be created for storing tasks to be processed;

[0079] The calculation unit 103 performs a remainder calculation on the first attribute value of the task and the total number of threads, and schedules the corresponding thread to execute the task according to the result of the remainder calculation;

[0080] The monitoring unit 104 monitors the running clock cycles of the threads between adjacent threads.

[0081] The invention effectively solves the problems of unbalanced CPU core load and low reliability of setting individual threads in 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

In order to solve the problems in the prior art, the invention innovatively provides a thread pool unified scheduling monitoring method, which comprises the following steps of obtaining the number ofprocessor cores, and determining the number of threads to be created according to the number of processor cores; establishing a corresponding queue according to the to-be-created thread number, wherein the queue is used for storing to-be-processed tasks; performing remainder calculation on the first attribute value of the task and the total number of the threads, and scheduling the corresponding threads to execute the task according to a remainder calculation result; and monitoring the running clock periods of the threads between the adjacent threads. The invention further provides a thread pool unified scheduling monitoring system, the problems that in the prior art, CPU core loads are unbalanced, and the reliability of setting single threads is not high are effectively solved, the monitoring reliability of the thread pool is effectively improved, the CPU core loads are balanced, and CPU resources are fully utilized.

Description

technical field [0001] The invention relates to the field of thread pools, in particular to a method and system for unified scheduling and monitoring of thread pools. Background technique [0002] At present, CPU processors are developing rapidly, including CPU frequency increase, cache capacity increase, cache classification, etc., but there is a certain limit to CPU frequency increase. [0003] After the development of the main frequency of the CPU is limited, the parallel processing capability of the CPU is generally realized by expanding the number of CPU cores. [0004] However, in the existing thread pool scheduling, on the one hand, the load of each core of the CPU is not balanced enough, and the CPU resources are not fully utilized; Resources are wasted, and once the individual monitoring thread hangs, other threads will not be able to monitor, and the reliability is not high. Contents of the invention [0005] In order to solve the problems existing in the prior...

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/50G06F9/48G06F9/54G06F11/30G06F11/14
CPCG06F9/4881G06F9/505G06F9/546G06F11/1438G06F11/3017G06F2209/5011G06F2209/548
Inventor 刘树亮
Owner SUZHOU LANGCHAO INTELLIGENT TECH CO LTD