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

Multi-thread scheduling method and device based on thread pool

A scheduling method and technology of a scheduling device, applied in the computer field, can solve problems such as inability to determine thread start time, inability to accurately locate Crash, inability to reproduce start time, etc.

Active Publication Date: 2021-09-14
TENCENT TECH (SHENZHEN) CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, because many crashes on existing terminals are caused by multi-threaded competition for resources, in the Android system, in the process of scheduling and managing threads through the thread pool ThreadPoolExecutor, the start method is not called directly, but through The thread pool is used to determine the start time of each thread, that is to say, the start time of the thread is not determined by the developer, with uncertainty, for example, it will be affected by related factors such as the size of the thread pool, thread cache queue, etc. This leads to the fact that in the process of reproducing Crash, the developer cannot determine the specific start time of each thread, cannot reproduce the specific start time of each thread when the previously reported Crash occurred, and cannot restore it in program debugging or The specific usage scenario when the user uses it, and the real reason that triggers the Crash cannot be known
[0004] That is to say, in the above-mentioned related technologies, there is a problem that the Crash cannot be accurately located when the Crash occurs

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
  • Multi-thread scheduling method and device based on thread pool
  • Multi-thread scheduling method and device based on thread pool
  • Multi-thread scheduling method and device based on thread pool

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0040] In order to solve the technical problem of insufficient recurrence rate when locating the cause of program crash (Crash) in the traditional technology, in this embodiment, a kind of multi-thread scheduling method based on thread pool is specially proposed. The implementation of the method may depend on a computer program, which may run on a computer system based on the von Neumann architecture, and the computer program may be a thread scheduler in the process...

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 embodiment of the present invention discloses a thread pool-based multi-thread scheduling method, including: detecting the calling process of the thread scheduling function of the thread pool, obtaining the stack characteristic information and the target task object of the call stack corresponding to the calling process; The running function of the target task object, adding a counting lock and / or countdown lock corresponding to the stack feature information on the running function of the target task object, detecting the locking state of the counting lock and / or countdown lock, and counting the lock Release when the number of threads corresponding to the target task object is greater than or equal to the threshold of the count lock, and the countdown lock is released after waiting for a preset period of time; when the count and / or countdown lock is in a locked state, suspend execution of the target task The running function of the object; when the lock state of the counting lock or the countdown lock is released, the running function of the target task object is executed. By adopting the invention, the recurrence rate of program crash can be improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a thread pool-based multi-thread scheduling method and device. Background technique [0002] With the development of communication and Internet technologies, various application programs are more and more widely used in users' lives, and users have higher and higher requirements on the performance of the application programs. Among them, stability is an important index to measure the performance of an application, and the stability of the application determines the retention rate and reputation of the application to a certain extent. Therefore, improving the stability of the application is very important for the application development is of great significance. During the development and use of the application, it will analyze and reproduce the program crash (Crash) that occurs during the running of the application, determine the specific cause of the trigger Crash, and make c...

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/48G06F9/50G06F11/36
CPCG06F9/4881G06F9/5027G06F11/3688
Inventor 鲁可黄闻欣
Owner TENCENT TECH (SHENZHEN) CO LTD
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