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

Semaphore permission adjustment method and device

An adjustment method and semaphore technology, applied in the computer field, can solve the problems of long task waiting time and low processing efficiency

Pending Publication Date: 2019-07-19
PINGAN PUHUI ENTERPRISE MANAGEMENT CO LTD
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If there are no idle threads in the thread pool for a long time or the idle threads in the thread pool process tasks slowly, there may be a large number of pending tasks in the license waiting queue of the thread pool, which will lead to long waiting times for tasks, Low processing efficiency

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
  • Semaphore permission adjustment method and device
  • Semaphore permission adjustment method and device
  • Semaphore permission adjustment method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0035] It should be understood that the terms "first", "second", and "third" in the description and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not lim...

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 semaphore permission adjustment method and device. The method is suitable for the business process optimization and comprises the following steps of obtaining the number of tasks in a permission waiting queue of a target thread pool, obtaining a first semaphore parameter matched with the target thread pool; when the number of the tasks is greater than apreset target threshold value and a first borrowing parameter corresponding to the first semaphore parameter is yes, obtaining the number of the to-be-borrowed permissions of the target thread pool, acquiring a semaphore parameter group to which the first semaphore parameter belongs, determining M third semaphore parameters from N second semaphore parameters of the semaphore parameter group, and requesting to borrow the number of to-be-borrowed permissions from M thread pools matched with the M third semaphore parameters, and calling the idle threads indicated by the borrowed permissions to process tasks in a permission waiting queue of the target thread pool. By adopting the embodiment of the invention, the permission of the thread pool can be adjusted through the semaphore parameter.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a method and device for adjusting semaphore permission. Background technique [0002] At present, most of the tasks are processed by the threads in the thread pool, and generally after the parameters of the thread pool are configured, the parameters of the thread pool cannot be adjusted dynamically. If you want to adjust the parameters of the thread pool, you must reconfigure the thread pool. When a task needs to call the thread processing in the thread pool, if there is no idle thread in the thread pool at this time, then the task will be sequentially stored in the permission waiting queue of the thread pool to wait for the thread pool to appear idle When a thread is used, the idle thread that appears in the thread pool is called to process this task. If there are no idle threads in the thread pool for a long time or the idle threads in the thread pool process task...

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/48
CPCG06F9/485G06F9/4881
Inventor 柳芊
Owner PINGAN PUHUI ENTERPRISE MANAGEMENT CO LTD