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

Task scheduling optimization implementation method based on JAVA single thread pool

A technology of task scheduling and implementation method, which is applied in the direction of program control design, multi-program device, program startup/switching, etc. It can solve problems such as system resource waste, wrong task execution sequence, and equipment operation problems, so as to improve efficiency and reduce The effect of resource consumption

Active Publication Date: 2021-03-09
TOEC TECH
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] With the development of communication and computer technology, many equipment control software systems now have more and more requirements for concurrent execution of tasks, and at the same time require the realization of serialization between tasks of the same equipment. Now the most used method is to use queues in time, which will be different The sub-tasks in the task are placed in different queues, but too many devices connected to the software system control need to create a lot of device task processing queues, and tasks still need to be taken out of the device queues and added to the thread pool when processing instructions Execute tasks, but because the number of CPU cores in the system is fixed, doing so will not improve efficiency, but will cause serious waste of system resources
And when using the queue, the task serialization of the same device cannot be well controlled, and the tasks of different devices are parallel, and sometimes the execution order of the tasks of the same device is wrong, causing problems in the operation of the device

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
  • Task scheduling optimization implementation method based on JAVA single thread pool
  • Task scheduling optimization implementation method based on JAVA single thread pool

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] The present invention will be further described below with reference to the accompanying drawings.

[0019] Based on the task scheduling optimization method of newSingleThreadExecutor single thread pool in Java language, the queue in the single thread pool is used to realize the serial processing of tasks in the same thread pool, and the task scheduling is realized at the upper level of the single thread pool. The scheduling method is implemented by the following three classes, which are: single thread pool task processing class, task distribution control class and device thread task processing class.

[0020] 1. Establish a single-threaded pool task processing class. The single-threaded pool task processing class contains a newSingleThreadExecutor single-threaded pool and a MAP named sequenceMap; two methods are established in the class, one is used to submit threads to the single-threaded pool task, a method used to record the task number of the thread task submitted ...

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 task scheduling optimization implementation method based on a JAVA single thread pool. According to the method, scheduling optimization of tasks is realized by using a singlethread pool technology in java language. Firstly, a certain number of single-thread pools are newly built, each single-thread pool is used for processing tasks of different devices, and the task scheduling mode is achieved according to a single-thread pool task processing class, a task distribution control class and a task distribution control class. According to the method, task serial processing in the same thread pool is realized by utilizing a built-in queue in the single thread pool, and task scheduling is realized at the upper level of the single thread pool, so that the efficiency is improved, and resources are saved.

Description

technical field [0001] The invention relates to the field of device control application software, in particular to a task scheduling optimization implementation method based on a JAVA single thread pool. It uses the single-threaded pool technology in the java language to achieve task scheduling optimization. Background technique [0002] With the development of communication and computer technology, many equipment control software systems now have more and more requirements for concurrent execution of tasks, and at the same time require the realization of serialization between tasks of the same equipment. Now, the most used method is to use queues in time, to separate different tasks. The subtasks in the task are placed in different queues, but if there are too many devices controlled by the software system, it is necessary to create a lot of device task processing queues, and when processing instructions, the tasks are still taken out of the device queue and added to the th...

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/48G06F9/50
CPCG06F9/4843G06F9/4806G06F9/5005G06F2209/5018G06F2209/5011
Inventor 宋慧鹏贾伟涛张晓峰石艳梅
Owner TOEC TECH
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