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

Dynamic adjustment method for suspension time of message thread

A dynamic adjustment and message technology, applied in inter-program communication, multi-program device, program control design, etc., can solve the problem of no measurement of hang time, etc., to improve CPU utilization, optimize thread hang time, save The effect of CPU time

Active Publication Date: 2017-09-01
CRRC +1
View PDF6 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, if the design changes, this value may need to be re-estimated and tested, and there is no measurement method for the estimated value to evaluate whether the suspension time of thread allocation is reasonable and meets the design requirements (such as response time requirements)

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
  • Dynamic adjustment method for suspension time of message thread
  • Dynamic adjustment method for suspension time of message thread
  • Dynamic adjustment method for suspension time of message thread

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] The detailed features and advantages of the present invention are described in detail below in the specific embodiments, the content of which is sufficient to enable any person skilled in the art to understand the technical content of the present invention and implement it accordingly, and according to the specification, claims and drawings disclosed in this specification , those skilled in the art can easily understand the related objects and advantages of the present invention.

[0038] figure 1 A flowchart showing a conventional message processing thread processing messages.

[0039] Step 101: the thread starts running;

[0040] Step 102: It is judged whether the thread exit condition is met in each loop. If the thread does not exit, that is, the thread exit condition is not satisfied, proceed to step 103, otherwise proceed to step 107 to exit the message loop and end the thread;

[0041] Step 103: judge whether there is a message in the queue, if so, proceed to s...

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 provides a dynamic adjustment method for suspension time of a message thread. The method comprises the steps of 1) setting TS as sleep time of the thread; 2) enabling a frequency of sending messages to a queue to be smaller than a frequency of obtaining message processing from the queue; 3) allowing the message processing not to exceed allowed message response time, namely, if processing time of the last message in the message queue meets a response time requirement, then all the messages meet the response time requirement; 4) enabling the thread to continue to process the messages only after sleeping for a period of time, and setting shortest sleep time of the thread; 5) setting longest sleep time of the thread; and 6) performing organizing on the steps to ensure that the sleep time of the thread is longest when TS=TSmax_R.

Description

technical field [0001] The invention relates to a message processing thread, in particular to the dynamic adjustment of the message thread suspension time. Background technique [0002] The message processing thread is a thread that continuously receives messages through the message loop and then processes them. Due to limited CPU resources, a thread cannot occupy the CPU all the time. Therefore, after processing a message, the thread needs to be suspended, that is, the thread is suspended, so that other threads with the same priority have the opportunity to obtain the CPU. In this way, it is necessary to set a reasonable thread suspension time, which should not be too short or too long. If the suspension time is too short, the CPU will be wasted, and it will be difficult for other threads to seize the CPU; if the time is too long, it may cause urgent messages to be processed to wait for a long time, thus failing to meet the performance requirements, resulting in a backlog ...

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/44G06F9/54
CPCG06F9/4418G06F9/546
Inventor 黎邓根尹安旭岳龙
Owner CRRC
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