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 reproduce startup time, inability to know the real cause of triggering Crash, inability to accurately locate Crash, etc., and achieve the effect of increasing the probability of system crash

Active Publication Date: 2017-05-17
TENCENT TECH (SHENZHEN) CO LTD
View PDF7 Cites 22 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

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 invention discloses a multi-thread scheduling method based on a thread pool. The method comprises the steps that a calling process of a thread scheduling function of the thread pool is detected, and stack characteristic information of a calling stack corresponding to the calling process and a target task object are obtained; an operation function of the target task object is detected and called, a counting lock and/or a countdown lock corresponding to the stack characteristics information are/is added to the operation function of the target task object, the locking state of the counting lock and/or the countdown lock is detected, the counting lock is released when the thread number corresponding to the target task object is larger than or equal to the threshold value of the counting lock, and the countdown lock is released after a preset period of time is waited; when the counting lock and/or the countdown lock are/is in the locked state, the execution of the operation function of the target task object is stopped. When the locked state of the counting lock or the countdown lock is released, the operation function of the target task object is executed. By adopting the multi-thread scheduling method, the program crash recurrence rate can be increased.

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
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 Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products