Processing method and system of timers and asynchronous events
An asynchronous event and processing method technology, applied in the field of data communication, can solve the problem that the use time does not meet the high precision and affect the execution efficiency of the system, and achieve the effect of facilitating maintenance and debugging, improving execution efficiency and ensuring flexibility.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0043] Asynchronous events and user timers require simultaneous multi-thread scheduling processing:
[0044] In this embodiment, multi-thread scheduling needs to process asynchronous events and user timers at the same time. Messages from the system or control messages from external devices need to be processed by the system (asynchronous event). In this embodiment, there are two user timers that need to be started, user timer Timer1 (the timing interval is 30 milliseconds) and user timer Timer2 (the timing interval is 50 milliseconds). Event; in the first cycle, when the scheduling task module is waiting for the synchronous semaphore, the interface module receives an asynchronous event that needs to be scheduled.
[0045] Such as image 3 As shown, the process steps of multi-thread scheduling in Embodiment 1 are described in detail, wherein the execution process of steps 303-310 is an infinite loop process:
[0046] Step 301, the queue module initializes the user queue and ...
Embodiment 2
[0057] Only asynchronous events require multi-threaded scheduling.
[0058] In addition to processing multiple asynchronous events and timers simultaneously in the multi-thread scheduling process of Embodiment 1, it can also be used to only process asynchronous events or timers. This embodiment describes in detail the process of multi-thread scheduling for processing asynchronous events, wherein the execution process of steps 403-409 is an infinite loop process:
[0059] In this example, if Figure 4 As mentioned above, the method and system of the present invention are used to process various asynchronous events. According to the nature of the asynchronous events, corresponding to multiple different priorities, the asynchronous events requiring high priority are processed first. For ease of illustration, asynchronous events are recorded as event1, event2, and event3, and the order of occurrence among them is random.
[0060]Step 401: The queue module initializes the user qu...
Embodiment 3
[0069] Embedded multi-thread scheduling system, the system is composed of four parts: interface module, queue module, scheduling task module and interrupt module, such as Figure 5 , where the direction of the arrow represents the flow of data, and the letters in the figure represent the interaction labels between modules.
[0070] The interface module provides a unified interface for external asynchronous events or timers, and is responsible for converting them into an executable thread control block and storing it in the user queue. The thread structure can be recognized by the scheduling task module.
[0071] The queue module is responsible for creating and maintaining the ready queue and the user queue. The user queue receives notifications of asynchronous events that need to be scheduled or timer events that need to be started from other task modules through the interface module, and the ready queue is responsible for storing the tasks that will be executed by the scheduli...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com