Supercharge Your Innovation With Domain-Expert AI Agents!

Coroutine-based calculation program execution efficiency optimization method and system

A technology of execution efficiency and calculation program, applied in the direction of calculation, multi-program device, program control design, etc., can solve the problems of execution efficiency and data throughput performance improvement bottlenecks, etc., to achieve outstanding substantive features, reliable design principles, and extensive The effect of applying the foreground

Active Publication Date: 2020-09-22
SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Aiming at the blockage in the execution of the above-mentioned computer programs in the prior art, the coroutine can solve the blockage, but when there are large batches of tasks, the execution efficiency and data throughput are still the defects of performance improvement bottlenecks. The present invention provides a coroutine-based Calculation program execution efficiency optimization method and system to solve the above technical problems

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
  • Coroutine-based calculation program execution efficiency optimization method and system
  • Coroutine-based calculation program execution efficiency optimization method and system
  • Coroutine-based calculation program execution efficiency optimization method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0082] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0083] Such as figure 1 As shown, the present invention provides a method for optimizing the execution efficiency of computing programs based on coroutines, including the following steps:

[0084] S1. Start the coroutine scheduler to assign a coroutine to each task, and start the coroutine timing task;

[0085] S2. The CPU judges whet...

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 coroutine-based calculation program execution efficiency optimization method and system, and the method comprises the following steps that S1, a CPU starts a coroutine scheduler to distribute a coroutine for each task, and starts a coroutine timing task; s2, the CPU judges whether all coroutine tasks are blocked or not; if yes, the coroutine scheduler starts a timing coroutine to perform blocking timing; if not, S4 is executed; s3, whether a coroutine task is unblocked or not is juged in real time by the CPU; if yes, blocking timing is stopped, and the blocking duration is counted; if not, S3 is executed; s4, the CPU waits for completion of execution of the coroutine task; s5, the CPU judges whether the coroutine scheduler only has a coroutine timing task or not; if yes, coroutine timing is stopped, the total duration of the task is counted, and S6 is executed; if not, S1 is executed; s6, the CPU calculates the running efficiency, calculates the data throughput, adjusts the number of coroutine tasks according to the running efficiency and the data throughput, and achieves the optimization of the execution efficiency of a calculation program.

Description

technical field [0001] The invention belongs to the technical field of coroutine execution efficiency, and in particular relates to a coroutine-based computing program execution efficiency optimization method and system. Background technique [0002] In the process of program or service development, data and network requests are often processed, especially when the amount of data is relatively large, the program often encounters blockage. When a single thread encounters program blockage, the CPU will wait for the blockage to complete before performing the next logic processing. At this time, CPU resources are wasted. Coroutine, English name Coroutine, also known as micro-thread, fiber. A coroutine is essentially a thread. In the past, the switching of thread tasks was controlled by the operating system, and it automatically switched when encountering a blockage. In this way, when a subtask is blocked, the CPU can be switched to another subtask to run, ensuring that CPU reso...

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/50
CPCG06F9/5027G06F2209/5018G06F2209/508G06F2209/5022
Inventor 侯纪祥
Owner SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More