Task execution time monitoring device and node operation method
Through the combination of the setter and the task monitor, the problem of low task execution time monitoring and memory utilization efficiency in multi-node systems is solved, effective monitoring of task execution time and reasonable allocation of storage resources are achieved, and the system's synchronous operation efficiency is improved.
Patent Information
- Application Number
- CN202111446926.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-12-15
- Filing Date
- 2021-11-30
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In existing real-time operating systems, it is difficult to effectively monitor task execution time and efficiently utilize memory resources, especially in multi-node systems, memory usage efficiency is low.
The setter sets the storage location, storage structure size and quantity of task operation information, and uses the task monitor to monitor the task execution time of multiple nodes. Combined with the use of volatile and nonvolatile memory, monitoring the task execution time and storage management are realized.
It realizes effective monitoring of task execution time in multi-node systems, improves memory usage efficiency, and ensures the system's synchronous operation and reasonable allocation of storage resources.
Smart Images

Figure CN114637580B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a task execution time monitoring device and a node operation method. Background Art
[0002] Generally, a real-time operating system (RTOS) is an operating system developed for real-time applications, and its design focuses on central processing unit (CPU) time management. Basic design methods are divided into event-driven and time-sharing scheduling methods. Event-driven scheduling is also called priority-based scheduling or preemptive scheduling, and is used when an event with a higher priority than the currently executing task requests a task switch service. Time-sharing scheduling performs task switching when periodic events such as clock interrupts or loops occur. The key to a real-time operating system is to always maintain the application's task processing time.
[0003] Prior art documents
[0004] Patent documents
[0005] Patent Document 1: Korean Patent Authorization 10-1928349 (Authorization Date: December 6, 2018, Invention Title: Task Execution Time Monitoring Device and Method for Real-Time Operating System) Summary of the Invention
[0006] An object of the present invention is to provide a task execution time monitoring device and a node operation method for monitoring synchronous operations and effectively using memory.
[0007] According to an embodiment of the present invention, a monitoring device for monitoring task execution time may include: a setter for outputting setting information, wherein the setting information is used to set the storage location, the size of the storage structure or the number of storage structures for storing task operation information in each of a plurality of nodes; and a task monitor for outputting a task operation information request signal to each of the plurality of nodes and receiving the task operation information from each of the plurality of nodes.
[0008] In an embodiment, the task operation information includes a start time and an end time of the task measured from a corresponding node, and each of the start time and the end time includes a synchronized time and a local time.
[0009] In an embodiment, the synchronization time is output from a time synchronizer for confirming synchronization operations of tasks of different nodes.
[0010] In an embodiment, the local time is the running time of the corresponding node after it is powered on.
[0011] In an embodiment, the storage location is set to one of a volatile memory and a non-volatile memory.
[0012] In an embodiment, the setting information includes protocol version information, magic byte information, data length information, cyclic redundancy check (CRC) information and setting data, and the setting data includes storage location information, maximum storage size information, maximum storage quantity information and reserved information.
[0013] In an embodiment, the task monitor calculates the task execution time from each of the plurality of nodes based on the task operation information, and outputs the calculated time to a screen.
[0014] According to an embodiment of the present invention, a method for operating a node in a task execution monitoring system includes: a step of receiving setting information from a monitoring device; a step of collecting task operation information; a step of judging whether the size of the task operation information exceeds a first reference value of the setting information; when the size of the task operation information is greater than the first reference value, a step of judging whether the amount of the task operation information exceeds a second reference value of the setting information; when the amount of the task operation information is not greater than the second reference value, a step of regenerating the task operation information; and a step of storing the generated task operation information in a storage location of the setting information, the task operation information includes the start time and end time of the task measured at the corresponding node, and each of the start time and the end time includes a synchronization time and a local time.
[0015] In an embodiment, the method may further include storing the collected task operation information in the storage location when the size of the task operation information is not greater than the first reference value.
[0016] In an embodiment, the method may further include a step of deleting old task operation information when the amount of the task operation information is greater than the second reference value.
[0017] In an embodiment, the setting information includes protocol version information, magic byte information, data length information, cyclic redundancy check (CRC) information and setting data, and the setting data includes storage location information, a maximum storage size corresponding to the first reference value, a maximum storage quantity information corresponding to the second reference value and reserved information.
[0018] According to an embodiment of the present invention, a method for operating a node in a task execution monitoring system includes: a step of initializing a monitoring device and a communication channel; a step of receiving setting data from the monitoring device; a step of judging whether the received setting data is valid; when the received setting data is valid, a step of judging whether the setting data stored in a memory is the same as the received setting data; when the setting data stored in the memory is different from the received setting data, a step of updating the received setting data in the memory; and a step of updating the setting data of the node, wherein the setting data includes storage location information, size information of task operation information, and quantity information of task operation information.
[0019] In an embodiment, the step of determining whether the received setting data is valid may include the step of verifying the validity of the received setting data using protocol version information, magic byte information, data length information, and cyclic redundancy check (CRC) information of a header of the setting data.
[0020] In an embodiment, the method may further include a step of waiting for receiving the setting data.
[0021] In an embodiment, when the received setting data is invalid, the process proceeds to a step of waiting for receiving the setting data.
[0022] In an embodiment, the method may further include the step of not updating the received setting data when the setting data stored in the memory is the same as the received setting data.
[0023] According to the task execution time monitoring device and node operation method of the embodiment of the present invention, by adding synchronization time to the monitoring reference time, the system synchronization operation of each node can be monitored.
[0024] According to the task execution time monitoring device and node operation method of the embodiment of the present invention, by limiting the size and number of the storage structure of task operation information, the volatile / non-volatile memory of each node can be effectively utilized. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The following drawings are used to help understand the present embodiment and are provided together with the detailed description. The technical features of the present embodiment are not limited to specific drawings, and the features disclosed in each drawing can be combined to form a new embodiment.
[0026] Figure 1 FIG. 1 is an illustrative diagram of a task execution time monitoring system 10 according to an embodiment of the present invention.
[0027] Figure 2FIG. 4 is an illustrative diagram of a result of monitoring task operations of different nodes according to start / end times based on synchronization time according to an embodiment of the present invention.
[0028] Figure 3 FIG. 2 is an illustrative diagram of a data transmission protocol between the setter 210 of the monitoring device 200 and a memory of a node according to an embodiment of the present invention.
[0029] Figure 4 is a flowchart illustrating a method for storing task operation information in a node according to an embodiment of the present invention.
[0030] Figure 5 is a flowchart illustrating a setting data update process of a node according to an embodiment of the present invention.
[0031] Description of Reference Numerals
[0032] 10: Task execution time monitoring system, 110, 120: Node, 200: Monitoring device, 210: Setter, 220: Task monitor, 111, 121: Time synchronizer, 112, 122: Measuring instrument, 113, 123: Memory, 114, 124: Outputter. DETAILED DESCRIPTION
[0033] The present invention will be described below with reference to the accompanying drawings in detail so that those skilled in the art can easily implement the present invention.
[0034] The present invention is susceptible to various modifications and forms. Specific embodiments are shown in the drawings and described in detail herein. However, it should be understood that the present invention is not limited to the specific disclosed forms and encompasses all modifications, equivalents, and even substitutes within the spirit and technical scope of the present invention. Terms such as "first" and "second" may be used to describe various components, but the components are not limited to these terms.
[0035] The terms are used to distinguish one component from other components. For example, without departing from the scope of the present invention, a first component may be named a second component, and similarly, a second component may be named a first component. When a component is referred to as being "connected" or "coupled" to another component, it should be understood that it can be directly connected or coupled to the other component, but other components may also be present in between. Conversely, when a component is referred to as being "directly connected" or "directly coupled" to another component, it should be understood that there are no other components in between.
[0036] Other expressions used to describe the relationship between constituent elements, such as "between" and "directly between" or "adjacent to" and "directly adjacent to," should also be interpreted in the same manner. The terms used in this specification are merely for describing specific embodiments and are not intended to limit the present invention. Unless the context clearly indicates a different meaning, expressions in the singular include the plural.
[0037] In this specification, the terms "including" or "having" specify the existence of the features, numbers, steps, actions, constituent elements, parts or combinations thereof to be implemented, and shall not be understood as excluding the existence or additional possibilities of one or more other features or numbers, steps, actions, constituent elements, parts or combinations thereof. Unless otherwise defined, all terms used in this specification, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art to which the invention belongs. Terms defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning they have in the context of the relevant technology, and, unless expressly defined in this specification, should not be interpreted in an ideal or overly formulaic sense.
[0038] Figure 1 FIG is an illustrative diagram of a task execution time monitoring system 10 according to an embodiment of the present invention. Figure 1 The task execution time monitoring system 10 may include multiple nodes 110 , 120 , and a monitoring device 200 . Figure 1 In the figure, only two nodes are shown for the convenience of explanation. However, the number of nodes of the present invention is not limited thereto.
[0039] Each of the first node 110 and the second node 120 may be implemented to transmit task operation information data to the monitoring apparatus 200 by measuring the execution time of the task.
[0040] The first node 110 may include a time synchronizer 111 , a measuring instrument 112 , a memory 113 , and an outputter 114 .
[0041] The time synchronizer 111 may be implemented to synchronize the time of the first node 110 with the same reference time.
[0042] The meter 112 can be implemented to measure the operation time of a task by storing the start and end times of the task. For example, the meter 112 can be implemented to measure the measured start and end times as the local time and the synchronized time. Here, the local time can be the time indicating the operation time after power-on, and the synchronized time can be the time sent from the time synchronizer 111. In other words, the synchronized time can be used to confirm the operation time of the task after the target is powered on. Furthermore, the synchronized time can be used to confirm whether multiple nodes are operating synchronously.
[0043] The memory 113 may be implemented to store the task operation information received from the measuring instrument 114 in a memory (volatile or non-volatile memory). In an embodiment, the memory 113 may be implemented to efficiently store the task execution time data in a memory of a limited target. In addition, the memory 113 may be implemented to set the storage location (volatile / non-volatile) through the setter 210 to set the measurement data to be stored. In addition, the memory 113 may be implemented to set the maximum size of the storage structure to be stored through the setter 210. In addition, the memory 113 may be implemented to set the maximum number of storage structures to be stored through the setter 210. In an embodiment, when the number of storage structures exceeds the number of storage structures set in the setter 210 of the monitoring device 200, the oldest storage structure may be deleted.
[0044] The outputter 114 may be implemented to receive a task operation information request including a start time and an end time corresponding to task execution of the first node 110 from the task monitor 220 , and output the task operation information to the task monitor 220 .
[0045] The second node 120 may include a time synchronizer 121 , a meter 122 , a memory 123 , and an outputter 124 . Each of the time synchronizer 121 , the meter 122 , the memory 123 , and the outputter 124 may be implemented in the same manner as each of the first nodes 110 .
[0046] The monitoring device 200 may include a setter 210 and a task monitor 220 .
[0047] The setter 210 may be implemented to set the measurement data storage location for each node, the maximum size of the storage structure for each node, or the maximum number of storage structures for each node. Furthermore, the setter 210 may confirm the current setting state by obtaining setting data (storage location information, storage structure size, number of storage structures, etc.) of the memory of each node.
[0048] The task monitor 220 may be implemented to send a request for task operation information required for task execution to each node 110 , 120 , and receive task operation information from each node 110 , 120 .
[0049] The task execution time monitoring system 10 according to the embodiment of the present invention monitors the synchronous operation of the system in which each node 110 and 120 operates synchronously by adding the synchronization time to the monitoring reference time. Furthermore, the task execution time monitoring system 10 according to the embodiment of the present invention can effectively use the volatile / non-volatile memory of the node by limiting the size and number of storage structures storing task information.
[0050]
Table 1
[0051]
[0052] Table 1 illustrates an example of task operation information collected by the meter on each node. A task identifier is a unique identifier across all nodes. The task start / end times, expressed in local time, are used to confirm the operation time of tasks running on a node after startup. The task start / end times, expressed in synchronized time, are used to confirm the status of tasks and synchronized operations on other nodes.
[0053] Figure 2 FIG. 4 is an illustrative diagram of a result of monitoring task operations of different nodes according to start / end times based on synchronization time according to an embodiment of the present invention.
[0054] On node 1, the first task starts at the synchronization time of 10769.1 and ends at the synchronization time of 10769.11. On node 2, the second task starts at the synchronization time of 10770.1 and ends at the synchronization time of 10770.2.
[0055] Figure 3 FIG. 2 is an illustrative diagram of a data transmission protocol between the setter 210 of the monitoring device 200 and a memory of a node according to an embodiment of the present invention.
[0056] refer to Figure 3 The monitoring setting information may include protocol version information, magic byte information, data length information, CRC information, and setting data. In an embodiment, the size of the monitoring setting information may be 32 bytes. In addition, the size of the monitoring setting information of the present invention is not limited thereto.
[0057] The protocol version information is a field used to confirm the transmission protocol version. In an embodiment, the size of the protocol version information can be 2 bytes.
[0058] The magic byte information is a field used to verify the validity of the protocol data. In an embodiment, the size of the magic byte information can be 2 bytes.
[0059] The data length information is a field used to indicate the size of the data field. In an embodiment, the size of the data length information can be 4 bytes.
[0060] The CRC information is a cyclic redundancy check (CRC) field used to verify the validity of the data field. In an embodiment, the size of the CRC information may be 2 bytes.
[0061] The setting data may include storage location information, maximum storage size information, maximum storage quantity information, and reservation information.
[0062] The storage location information is information indicating the storage location of the task operation information. For example, the storage location information may include information indicating whether the storage location is a random access memory (RAM) area or a non-volatile memory (NVM) area. In an embodiment, the storage location information may be 4 bytes in size.
[0063] The maximum storage size information is information indicating the maximum size of the data of the task operation information. In an embodiment, the size of the maximum storage size information can be 4 bytes.
[0064] The maximum storage quantity information is information indicating the maximum quantity of task operation information. In an embodiment, the size of the maximum storage quantity information may be 4 bytes.
[0065] The reserved information is an area for data of a setter to be added later. In an embodiment, the size of the reserved information may be 10 bytes.
[0066] Figure 4 FIG. 1 is an exemplary flow chart of a method for storing task operation information at a node according to an embodiment of the present invention. Figures 1 to 4 , the task operation information can be stored as follows.
[0067] The setting data of the corresponding node can be loaded from the setter 210 of the monitoring device 200 (S110). The task operation information can be collected from the node (S120). Here, the task operation information can include the local time and the synchronization time for the start / end time of the task operation.
[0068] It may be determined whether the data size of the task operation information is greater than a first reference value ( S130 ). Here, the first reference value may be obtained from information on the maximum storage size of the setting data sent by the setter 210 of the monitoring device 200 .
[0069] If the data size is greater than the first reference value, it is determined whether the amount of task operation information is greater than a second reference value (S140). Here, the second reference value can be obtained from the maximum storage amount information of the setting data transmitted by the setter 210 of the monitoring device 200. If the amount of task operation information is greater than the second reference value, the old task operation information can be deleted (S150). Then, the task operation information can be generated (S160).
[0070] In step (S130), the size of the data is not greater than the first reference value, or in step (S140), the amount of task operation information is not greater than the second reference value, or after step (S160), the task operation information can be stored in the memory of the node (S170).
[0071] Figure 5 1 is a flowchart illustrating a process of updating setting data of a node according to an embodiment of the present invention. Figures 1 to 5 , the setting data update process of the node's memory can be performed as follows.
[0072] The setter 210 and the communication channel of the monitoring device 200 may be initialized (S210). It should be understood that the monitoring device 200 and the channel for updating the setting data of the node are not limited. In an embodiment, all channels that can communicate between the node and the monitoring device (e.g., UART, Ethernet, etc.) may be supported.
[0073] The setting data may be waited for to be received (S220). It may be determined whether the setting data has been received (S230). If the setting data is received in step (S230), it may be determined whether the received setting data is valid (S240). In an embodiment, the setting data may be received by Figure 3 The protocol version, magic byte, data length, and CRC of the setting data header are used to verify the validity of the setting data received from the monitoring device. On the other hand, if the setting data is not received in step (S230), step (S220) can be performed.
[0074] If the setting data is valid in step (S240), it is then determined whether the setting data in the memory differs from the received setting data (S250). After receiving the setting data from the monitoring device, the setting data stored in the node and loaded into the memory is compared with the setting data received from the monitoring device to prevent unnecessary updates. Only if the comparison shows a difference can the update be performed. Alternatively, if the setting data is invalid in step (S240), step (S220) can be performed.
[0075] If the setting data in the memory differs from the received setting data, the setting data loaded into the memory may be updated (S260). Then, the setting data of the node may be updated (S270). Conversely, if the setting data in the memory is the same as the received setting data in step (S260), or after step (S270), the setting data update operation may be completed.
[0076] As will be appreciated by those skilled in the art, the steps and / or operations according to the present invention may be performed simultaneously in other embodiments in other orders, in parallel, or for other specific epochs. According to an embodiment, part or all of the steps and / or operations may be completed or executed at least in part by means of instructions, programs, interactive data structures, or one or more processors driving the client and / or server stored in one or more non-transitory computer-readable media. As an example, one or more non-transitory computer-readable media may be software, firmware, hardware, and / or any combination thereof. In addition, the functions of the "modules" discussed in this specification may be composed of software, firmware, hardware, and / or any combination thereof.
[0077] One or more non-transitory computer-readable media and / or means for implementing / executing one or more operations / steps / modules of an embodiment of the present invention may include application-specific integrated circuits (ASICs), standard integrated circuits, microcontrollers, controllers that execute appropriate instructions and / or embedded controllers, field-programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), and equivalents, but are not limited thereto.
[0078] The above contents of the present invention are merely specific examples for implementing the invention. The present invention includes not only specific and practical means itself but also abstract and conceptual technical ideas that can be used as technology in the future.
Claims
1. A monitoring device for monitoring task execution time, characterized in that: include: a setter, configured to output setting information, wherein the setting information is used to set a storage location, a size of a storage structure, or the number of the storage structures, wherein task operation information is stored in each of a plurality of nodes at the storage location, wherein each of the plurality of nodes includes a time synchronizer, a measuring instrument, a memory, and an outputter; as well as a task monitor configured to output a task operation information request signal to each of the plurality of nodes and receive the task operation information from each of the plurality of nodes; The task operation information includes a start time and an end time of the task measured from a corresponding node among the plurality of nodes, Each of the start time and the end time includes a synchronized time and a local time, The setting information includes protocol version information, magic byte information, data length information, cyclic redundancy check information and setting data. The setting data includes storage location information, maximum storage size information, maximum storage quantity information and reservation information.
2. The monitoring device according to claim 1, characterized in that The synchronization time is output from a time synchronizer for confirming synchronization operations of tasks of different nodes.
3. The monitoring device according to claim 1, characterized in that The local time is the running time of the corresponding node after it is turned on.
4. The monitoring device according to claim 1, characterized in that The storage location is set to one of a volatile memory and a non-volatile memory.
5. The monitoring device according to claim 1, characterized in that The task monitor calculates a task execution time from each of the plurality of nodes based on the task operation information, and outputs the calculated time to a screen.
6. A node operation method, which is a node operation method in a task execution monitoring system, characterized in that: include: receiving setting information from a monitoring device; Steps to collect information about task operations; a step of determining whether the size of the task operation information exceeds a first reference value of the setting information; When the size of the task operation information is greater than the first reference value, determining whether the amount of the task operation information exceeds the second reference value of the setting information; When the amount of the task operation information is not greater than the second reference value, regenerating the task operation information; as well as The step of storing the task operation information in the storage location of the setting information, The task operation information includes the start time and end time of the task measured at the corresponding node, Each of the start time and the end time includes a synchronized time and a local time, The setting information includes protocol version information, magic byte information, data length information, cyclic redundancy check information and setting data. The setting data includes storage location information, maximum storage size information, maximum storage quantity information and reservation information, The monitoring device comprises: a setter, configured to output setting information, wherein the setting information is used to set a storage location, a size of a storage structure, or the number of the storage structures, wherein task operation information is stored in each of a plurality of nodes at the storage location, wherein each of the plurality of nodes includes a time synchronizer, a measuring instrument, a memory, and an outputter; as well as The task monitor is configured to output a task operation information request signal to each of the plurality of nodes and receive the task operation information from each of the plurality of nodes.
7. The method according to claim 6, characterized in that The method further includes storing the task operation information in the storage location when the size of the task operation information is not greater than the first reference value.
8. The method according to claim 6, characterized in that The method further includes a step of deleting old task operation information when the amount of the task operation information is greater than the second reference value.
9. A node operation method, which is a node operation method in a task execution monitoring system, characterized in that: include: Steps for initializing monitoring devices and communication channels; a step of receiving setting data from the monitoring device; a step of determining whether the setting data is valid; When the setting data is valid, determining whether the first setting data stored in the memory is the same as the setting data; When first setting data stored in the memory is different from the setting data, updating the first setting data in the memory according to the setting data; and the step of updating the setting data of the node, The setting data includes storage location information, size information of task operation information and quantity information of task operation information. Determining whether the setting data is valid includes the steps of verifying the validity of the setting data using protocol version information, magic byte information, data length information, and cyclic redundancy check information in the header of the setting data. The monitoring device comprises: a setter, configured to output setting information, wherein the setting information is used to set a storage location, a size of a storage structure, or the number of the storage structures, wherein task operation information is stored in each of a plurality of nodes at the storage location, wherein each of the plurality of nodes includes a time synchronizer, a measuring instrument, a memory, and an outputter; as well as The task monitor is configured to output a task operation information request signal to each of the plurality of nodes and receive the task operation information from each of the plurality of nodes.
10. The method according to claim 9, characterized in that The method further includes the step of waiting for receiving the setting data.
11. The method according to claim 10, characterized in that The method further includes a step of waiting to receive the setting data when the setting data is invalid.
12. The method according to claim 9, characterized in that The method further includes the step of not updating the setting data when the first setting data stored in the memory is the same as the setting data.
Citation Information
Patent Citations
Apparatus for monitoring run-time of real time operating system and thereof
KR101928349B1
Distributed system
US20080273527A1
Inter-Processor Protocol in a Multi-Processor System
US20120089814A1
Information processing system, control method of information processing system, and recording medium
US20150277801A1
System and method of performing high availability configuration and validation of virtual desktop infrastructure (VDI)
US20160182284A1