Task scheduling method and task scheduling device for embedded software

A technology of embedded software and task scheduling, applied in the directions of multi-programming device, program startup/switching, inter-program communication, etc., to achieve the effect of high cohesion, convenient software modification and maintenance, and avoiding the consumption of RAM resources

Active Publication Date: 2018-09-14
SHANDONG ACAD OF SCI INST OF AUTOMATION
View PDF5 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] Aiming at the deficiencies in the prior art, solve how to avoid the consumption of RAM resources by loading the operating system in the prior art, avoid the consumption of MCU computing resources by task context switching, and how to reduce the coupling between software modules to facilitate software modification and Maintenance problem, the present invention proposes a task scheduling method and device for embedded software, divides several logical tasks according to specific applications, these logical tasks share a system stack, and each logical task has its own event queue and task processing program , tasks communicate by sending events; the invention not only avoids the consumption of system RAM resources and MCU computing resources by loading the operating system, but also implements a task scheduling mechanism similar to the operating system

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 method and task scheduling device for embedded software
  • Task scheduling method and task scheduling device for embedded software

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0057] The purpose of Embodiment 1 is to provide a task scheduling method for embedded software.

[0058] In order to achieve the above object, the present invention adopts the following technical scheme:

[0059] Such as figure 1 as shown,

[0060] A task scheduling method for embedded software, the method comprising:

[0061] Initialize the MCU in the order of logical task priority from low to high, and enter the main loop body;

[0062] Execute the task scheduler in the main loop body, and execute the task handlers of each logical task in sequence according to the priority of the logical tasks from high to low, until the priority of the current logical task is the lowest, exit the task scheduler and return to the main loop. loop body;

[0063] Logical tasks communicate by sending events. When the interrupt handler or task handler of a logical task sends an event to another logical task, the logical task structure is filled with events;

[0064] The logical task structu...

Embodiment 2

[0081] The purpose of Embodiment 2 is to provide a computer-readable storage medium.

[0082] In order to achieve the above object, the present invention adopts the following technical scheme:

[0083] A computer-readable storage medium, wherein a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor of an embedded terminal device and performing the following processing:

[0084] Initialize the MCU in the order of logical task priority from low to high, and enter the main loop body;

[0085] Execute the task scheduler in the main loop body, and execute the task handlers of each logical task in sequence according to the priority of the logical tasks from high to low, until the priority of the current logical task is the lowest, exit the task scheduler and return to the main loop. loop body;

[0086] Logical tasks communicate by sending events. When the interrupt handler or task handler of a logical task sends an event to anoth...

Embodiment 3

[0089] The purpose of Embodiment 3 is to provide an embedded terminal device.

[0090] In order to achieve the above object, the present invention adopts the following technical scheme:

[0091] An embedded terminal device includes a processor and a computer-readable storage medium, the processor is used to implement instructions; the computer-readable storage medium is used to store multiple instructions, and the instructions are suitable for being loaded by the processor and performing the following processing:

[0092] Initialize the MCU in the order of logical task priority from low to high, and enter the main loop body;

[0093] Execute the task scheduler in the main loop body, and execute the task handlers of each logical task in sequence according to the priority of the logical tasks from high to low, until the priority of the current logical task is the lowest, exit the task scheduler and return to the main loop. loop body;

[0094] Logical tasks communicate by sendi...

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 method and a task scheduling device for embedded software. The task scheduling method includes partitioning a plurality of logic tasks according to particularapplication. A system stack is shared by the logic tasks, each logic task is provided with independent event queues and task processing programs, and the tasks are communicated with one another in event transmission forms. The task scheduling method and the task scheduling device have the advantages that system RAM (random access memory) resource and MCU (microprogrammed control unit) computationresource consumption of loading operating systems can be prevented, and task scheduling mechanisms similar to operating systems can be implemented.

Description

technical field [0001] The invention belongs to the technical field of embedded systems, and in particular relates to a task scheduling method and device for embedded software. Background technique [0002] In the software design of the embedded system, according to the specific application requirements and the size of the system resources, select the appropriate embedded operating system, transplant the MCU of the embedded system, divide the tasks according to the application logic, and then use a series of APIs provided by the operating system , establish a task queue, communicate between tasks in the form of messages or events, manage system ticks, and implement task scheduling. This design method allows developers to focus on the development of application logic, not only to achieve software modularization, Modifications and maintenance are also flexible. [0003] Generally speaking, in this way, when the MCU is powered on and initialized, the task queue is first establ...

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/48G06F9/54
CPCG06F9/4881G06F9/542
Inventor 马建辉王知学侯冬冬孙常青
Owner SHANDONG ACAD OF SCI INST OF AUTOMATION
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