Multi-tasking queue scheduling method based on thread pool

A queue scheduling and task queue technology, applied in the field of computer engineering, can solve problems such as improper logic design of scheduling methods, large maintenance difficulty and difficult maintenance of multiple programmers, and achieve good process or thread number scalability, easy implementation, Reasonable effect of logical design

Inactive Publication Date: 2013-12-25
柳州市博源环科科技有限公司
View PDF5 Cites 28 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Once there are complex connections between these application function modules, the requirements of these application function modules for system resources and devices (such as Camera, memory) will inevitably conflict, and it is difficult to maintain when implemented;
[0017] 2. If multiple applications to be implemented are used as a single application function module, it will bring huge maintenance difficu...

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
  • Multi-tasking queue scheduling method based on thread pool
  • Multi-tasking queue scheduling method based on thread pool
  • Multi-tasking queue scheduling method based on thread pool

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0048] like Figure 1-3 As shown, a thread pool-based multi-task queue scheduling method includes the following steps:

[0049] (1) Create a corresponding task queue for each task type, and record them as TQ1, TQ2, ..., TQn;

[0050] (2) Create one or more task dispatchers, receive tasks and dispatch them to the corresponding task queue according to the task type; the task dispatcher is an independent process or thread;

[0051](3) Initialize the worker thread pool, and the idle worker thread enters the sleep state; the worker thread pool creates more than one worker thread, and the worker thread is not directly associated with the task queue;

[0052] (4) When the task dispatcher receives a certain type of task Ti, it finds its corresponding task queue TQi, and judges whether the tasks to be executed in the task queue are empty; the tasks to be executed include unexecuted tasks and ongoing tasks Tasks performed but not completed;

[0053] (5) If the task to be executed in ...

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 multi-tasking queue scheduling method based on a thread pool. First, a corresponding task queue is created according to task types, and the task queue is not directly associated with work threads in a work thread pool. Then, a task dispatcher is created for receiving a task and dispatching the task to the corresponding task queue according to the type of the task. Finally, when the task is dispatched to the task queue by the task dispatcher, an idle work thread is invoked from the work thread pool to execute the task. After the task is executed, the work thread returns to the work thread pool. The method can adapt to conditions that a large quantity of tasks belonging to different types exist and that all the tasks need to be instantly and orderly processed, one independent work process or thread does not need to be created for each task type, system resources can be greatly and effectively saved, and the work threads in the work thread pool can be created or deleted according to actual conditions, so that the scheduling system adopting the method has great thread count scalability.

Description

technical field [0001] The invention belongs to the technical field of computer engineering and relates to a multi-task queue scheduling method designed based on a working thread pool. Background technique [0002] RTOS (Realtime operation system, real-time operating system) is the foundation and development platform of embedded application software, and is a real-time kernel with high reliability and reliability. RTOS packs resources such as CPU time, interrupts, I / O, timers, etc., and leaves a standard API (Application Program Interface) for users. allocate CPU time among them. [0003] RTOS is usually installed in embedded systems to complete various functions in real time. These embedded systems usually have the characteristics of good real-time performance, small system size, limited resources and no graphical interface. Typical RTOS are: Vxworks, pSOS, Nucleus, eCos, uC / OS-II, etc. [0004] The GUI (Graphic User Interface, Graphical User Interface) system realizes h...

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/50
Inventor 覃祖茂刘为袁增伟杜怡曼何佳李东娥刘晓黄益农黄华峰
Owner 柳州市博源环科科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products