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

Operation method of task state machine management mechanism

A technology of task state and management mechanism, applied in the field of operating system, can solve the problems of complex design work, high requirements for task-task coupling, difficulty in implementation and improvement of program componentization and standardization, so as to reduce complexity and facilitate operating system , Improve the effect of componentization

Active Publication Date: 2013-02-06
FUJI XEROX SHANGHAI
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In the existing technology, as far as the application of the embedded real-time operating system is concerned, each task manages its own state machine, which results in: the design work is very complicated, the coupling degree between tasks is high, and it is difficult to implement and improve the componentization and standardization of the program

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
  • Operation method of task state machine management mechanism
  • Operation method of task state machine management mechanism
  • Operation method of task state machine management mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0070] This embodiment describes, introduces and illustrates the definition of the state machine data structure.

[0071] The state machine data structure is the core content of the state machine management mechanism, and each task must have the state machine data structure defined by the state machine data structure. The state machine data structure is defined as follows:

[0072]

[0073] In this embodiment, the data structure includes eight members that implement task functions: instance_id (task index number), state (task state), event_count (total number of events), action_count (total number of actions), event_sources (event trigger source), events (event group), actions_table (action list), machine (mechanism).

[0074] (1) instance_id represents the index number of the task to which the state machine belongs.

[0075] (2) state represents the current state of the task.

[0076] (3) event_count represents the total number of events that will occur during the opera...

Embodiment 2

[0100] In this embodiment, the state machine management mechanism is combined with Figure 4 , Figure 5 to describe, introduce and illustrate; of which, Figure 4 The last three process boxes on the left and the last three process boxes on the right, in Figure 5 merged in.

[0101] (1) Description of the state machine management process

[0102] For the working process of the state machine management mechanism, see Figure 4 understand. First, before the task state machine runs, initialize the task state machine, that is, establish the structure of the task state machine. Then start the task state machine management mechanism.

[0103] After initialization, the task waits for an event to occur, that is, using the event flag mechanism of the operating system to wait for the event flag to be triggered. After the event flag is triggered, the task first obtains the event flag data; secondly, it determines whether the event trigger source (event_sources) has the definition...

Embodiment 3

[0115] This Implementation column describes the implementation of the state machine management mechanism.

[0116] 1. Task state machine initialization: First, the task needs to perform the state machine initialization operation of the task. This operation is mainly to implement a state machine data structure, and the state machine management mechanism will link the state machine data structure to the state machine of the state management mechanism. on the linked list. The main purpose of the state machine data structure is to establish the relationship between the state of the task, the event response of the task, and the action of the task. After the state machine data structure is linked to the target linked list, the state machine management mechanism can manage the state machine of the task.

[0117] 2. Wait for the event to occur and obtain the event flag: After the data machine is established, the task can enable the state machine management mechanism to complete subse...

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 relates to the technical field of operating system and discloses an operation mode of a task state machine management mechanism of an embedded real-time operating system. To solve the technical problems of complex design and the like in the prior art, the invention provides the technical scheme which is shown in the specification. The operation mode is characterized by using more than two matched task state machines and comprising the following steps of: 1, initializing; 2, judging whether an event occurs or not and collecting the information; if the event does not occur, continuing collecting and judging; if an event occurs, turning to a step 3; 3, acquiring an index number of the event; 4, searching a response action list of the event according to the acquired index number of the event and acquiring relevant content; 5, executing actions regulated by the relevant content in the action list; and 6, turning to the step 2. The operation mode has the advantages that: a uniform task state machine management mechanism is added, so that the design complexity and the requirements on the coupling degree between the tasks are greatly reduced; the componentization and standardization of the program are facilitated; and the encapsulation performance is high and the operating system is convenient to replace or upgrade.

Description

technical field [0001] The invention relates to the technical field of operating systems, in particular to a method for running a task state machine management mechanism. Background technique [0002] At present, the application of embedded real-time operating system in embedded systems has become more and more extensive. An important purpose of applying real-time operating system to embedded system is to realize the concurrent operation mechanism of multi-task, so as to realize the function of real-time response of embedded system. [0003] State machine (sometimes called task state machine) is an important concept in software programming. In a clear and efficient program, there must be a state machine. When the state machine is applied to the implementation of the operating system, the management of the state machine for each task is a problem that must be solved. [0004] The embedded real-time operating system in the system layer has the function of scheduling and mana...

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 Patents(China)
IPC IPC(8): G06F9/46
Inventor 庞海珑金辉叶成钢薛炯隽徐寒凌龙利平鲁顺
Owner FUJI XEROX SHANGHAI