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

Java thread pool hierarchical processing method and device

A technology of hierarchical processing and thread pools, applied in the field of thread pools, which can solve the problems of untimely thread processing, thread starvation, and untimely service response.

Pending Publication Date: 2020-02-25
SUNING COM CO LTD
View PDF3 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Generally speaking, the priority of transaction business must be higher than that of non-transaction business, so it is necessary to prioritize the processing capacity of transaction business. In the case of limited thread pool resources, the processing of non-transaction business can be appropriately reduced or sacrificed. capabilities, but the existing thread pool determines the order of thread scheduling based on sequential execution or priority queuing. In a high-concurrency environment, thread processing may not be processed in time or even thread starvation may occur, resulting in untimely service response and affecting users. to experience

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
  • Java thread pool hierarchical processing method and device
  • Java thread pool hierarchical processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0070] figure 1 It is a schematic flow chart of the java thread pool hierarchical processing method in Embodiment 1 of the present invention. see figure 1 , the present embodiment provides a java thread pool hierarchical processing method, comprising:

[0071] Step S1, classify based on the types of business requests, and configure thread pools equal to the number of classes; Step S2, respectively set the priority levels of each thread pool, forming thread pools with different priority levels from high to low; Step S3, set The priority level of the current business request, and filter out the thread pool applicable to the current business request in turn; among them, the thread pool applicable to the current business request includes a thread pool that matches the priority level of the current business request and is lower than the priority level of the current business request; Step S4, among the applicable multiple thread pools, preferentially call the thread pool with hig...

Embodiment 2

[0088] see figure 1 and figure 2 , the present embodiment provides a java thread pool classification processing device, including a classification unit 1, a configuration unit 2, a first execution unit 3, a second execution unit 4 and a scheduling unit 5;

[0089]Grading unit 1 is used for grading based on the type of business request, and configures thread pools equal in number to the number of gradings;

[0090] The configuration unit 2 is used to respectively set the priority levels of each thread pool to form thread pools with different priority levels from high to low;

[0091] The first execution unit of the screening unit 3 is used to set the priority level of the current business request, and sequentially screen out the thread pool suitable for the current business request; wherein, the thread pool suitable for the current business request includes matching with the priority level of the current business request, and comparing A thread pool with a low priority for c...

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 java thread pool hierarchical processing method and a java thread pool hierarchical processing device, which can allocate limited thread pool resources to preferentially process service requests with higher priorities so as to ensure that the service requests with higher priorities can be efficiently processed. The method comprises the following steps: S1, grading based on the type of a service request, and configuring thread pools with the same number as the grading number; S2, setting priority levels of the thread pools respectively to form thread pools with different priority levels from high to low; S3, setting the priority level of the current service request, and sequentially screening out thread pools suitable for the current service request; S4, in a plurality of applicable thread pools, preferentially calling the thread pool which is high in priority and capable of processing the current service request to process the current service request; and S5,if the current service request is not processed, adding the current service request into the task buffer queue, rescheduling and allocating by the scheduler, and returning to the step S3. The device comprises the method provided by the technical scheme.

Description

technical field [0001] The invention relates to the technical field of thread pools, in particular to a java thread pool hierarchical processing method and device. Background technique [0002] For e-commerce platforms, the growth rate of PV / UV is fast, the concurrent requests are high, and the requirements for the response time of the system are relatively high. Thread pools are usually used to increase the concurrent processing capacity of the system to maximize the performance of the system. [0003] Since the types of user requests on e-commerce platforms include transactional and non-transactional services, different business types use thread pools for different purposes. For transactional services, such as submitting orders, thread pools can be used to concurrently operate the order submission process Processing of various resources involved in the process, thereby reducing the response time for submitting orders; and non-transactional businesses, such as order informa...

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/448G06F9/48
CPCG06F9/4881G06F9/449G06F2209/5018
Inventor 段涛叶国华司孝波陈冬
Owner SUNING COM CO LTD