Thread pool management method and system

A management method and thread pool technology, applied in the field of communications, can solve problems such as reduction, thread hang, and excessive time, and achieve the effects of avoiding a large backlog, reducing execution time, and improving operating efficiency.

Active Publication Date: 2009-12-09
ZTE CORP
View PDF0 Cites 78 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

With this thread pool management technology, once an exception occurs during task execution, for example, the thread takes too long to execute a certain task or the thread hangs, it will affect the efficiency of the application server to execute the task
As the application server continues to accept customer requests for business processing, the probability

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 management method and system
  • Thread pool management method and system
  • Thread pool management method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] In the embodiment of the present invention, a task execution monitoring function is added to the thread pool management function to find out whether there is a task running timeout, a new thread is created in time when there is a task running timeout, and the newly created thread is used to execute the running timeout thread. The corresponding tasks are executed, thereby improving the regeneration of the thread pool and the efficiency of task execution. The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0021] Usually, the thread pool mainly includes the following components:

[0022] Thread Pool Manager (ThreadPoolManager): used to create and query thread pools, that is, to maintain all thread pools in the application;

[0023] Thread pool implementation class (ThreadPoolImpl): used to maintain a thread pool, including the creation, destruction, operation monitoring, message backlog control, task a...

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 discloses a thread pool management method and a thread pool management system. The method comprises the following steps: monitoring the running time of each thread to execute a current task by regularly traversing each thread in a thread pool; and when determining that threads with overtime running exist according to the monitored running time, establishing novel threads, and using the newly established threads to execute tasks which are to be executed by the threads with the overtime running, wherein threads in the thread pool correspond to task queues one by one, and execute tasks in the corresponding task queues; and the tasks to be executed by the threads with the overtime running are task queues corresponding to the threads with the overtime running. The method and the system can improve the task processing efficiency of an application server adopting the thread pool management technology, and provide a fault tolerance mechanism and a thread regeneration mechanism for the thread pool.

Description

technical field [0001] The present invention relates to computer application technology in the field of communication, in particular to a thread pool management method and system thereof. Background technique [0002] In object-oriented programming-based applications, creating and destroying objects is time-consuming, because creating an object requires acquiring memory resources or other resources. In applications based on JAVA programming technology, JVM (Java Virtual Machine, JAVA virtual machine) will try to track each object, so as to be able to recycle system resources after the object is destroyed. [0003] In practical applications, in server applications based on object-oriented programming, especially WEB applications, it is common for application servers to use thread technology to respond to client requests. If the application server creates a thread for each request, the overhead is quite large, because this There will be many actions of creating and destroying...

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/46G06F9/48
CPCG06F9/485G06F2201/88G06F11/3419G06F11/1482G06F11/0715G06F2209/5011G06F11/0757G06F2209/5018G06F2209/508
Inventor 王萍
Owner ZTE CORP
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