EVENT QUEUE MANAGEMENT FOR EMBEDDED SYSTEMS
20170262324 · 2017-09-14
Assignee
Inventors
Cpc classification
International classification
Abstract
An event management structure for an embedded system, which supports multiple waiters waiting on the same event without replicating the events for each waiter, is provided. Notifications of events are received from entities within an embedded system. The event management architecture then posts the events to a central queue and generates a unique identification tag for each posted event. Additionally, entities within the embedded system are allowed to wait on specific events. More specifically, entities may request access to specific events based on the unique identification tag associated with a particular event. In further implementations, data associated with queued events may be provided to the waiters. In some implementations, events matching a specific description since a particular event, identified by its unique identification tag, may be requested by entities in the embedded system.
Claims
1. A real-time operating system executable by an embedded system comprising: an event queue configured to store information about events occurring within an embedded system; an event posting module configured to allow entities within the embedded system to post events to the event queue; a waiter registration module configured to allow entities within the embedded system to wait on the occurrence of a particular event; a waiter notification module configured to notify entities within the embedded system of particular events within the event queue; and an event data access module configured to allow entities within the embedded system to access data associated with an event.
2. The real-time operating system recited in claim 1, wherein the event queue is a circular buffer.
3. The real-time operating system recited in claim 1, further comprising an event queue size module configured to dynamically adjust the size of the event queue.
4. The real-time operating system recited in claim 1, further comprising: a plurality of event queues; and an event queue access module configured to authenticate entities within the embedded system for posting and waiting privileges to each of the plurality of event queues based on a selected access control scheme.
5. A computer-implemented method for managing an event queue within a real-time operating system executable on an embedded system, the method comprising: receiving a request from a first entity within an embedded system to wait on a first event; determining when the first event is posted to an event queue; notifying the first entity once the event is posted; and providing access to data associated with the event to the first entity.
6. The computer-implemented method recited in claim 5, further comprising: receiving a request to post a second event to the event queue from a second entity within the embedded system; generating a unique identification tag for the second event; and adding the second event to the event queue.
7. The computer-implemented method recited in claim 6, further comprising adding data associated with the second event to the event queue.
8. The computer-implemented method recited in claim 5, wherein the request from the first entity identifies the first event by a first unique identification tag, the method act of determining when the first event is posted to the event queue comprising: searching the event queue to determine if an event having the first unique identification tag is stored within the event queue; again searching the event queue if determined that an event having the first unique identification tag is stored within the event queue, to determine a first event is stored within the event queue; providing details of the event matching the first unique identification tag to the first entity if it is determined that an event having the first unique identification tag is stored within the event queue; and waiting for the first event if it is determined that an event having the first event is not stored in the event queue; and generating an error if it is determined that an event having the first unique identification tag is not stored within the event queue.
9. The computer-implemented method recited in claim 8, further comprising modifying the size of the event queue.
10. One or more non-transient computer readable storage media having instructions stored thereon that cause a computer to perform a set of operations, the set of operations comprising: receiving a request from an entity within an embedded system to wait on an event; determining when the event is posted to an event queue; notifying the entity once the event is posted; and providing access to data associated with the event to the entity.
11. The one or more non-transient computer readable media recited in claim 10, the set of operations further comprising: receiving a request to post a second event to the event queue from a second entity within the embedded system; generating a unique identification tag for the second event; and adding the second event to the event queue.
12. The one or more non-transient computer readable media recited in claim 11, the set of operations further comprising adding data associated with the second event to the event queue.
13. The one or more non-transient computer readable media recited in claim 10, wherein the request from the first entity identifies the first event by a first unique identification tag, the operations for determining when the first event is posted to the event queue comprising: searching the event queue to determine if an event having the first unique identification tag is stored within the event queue; providing details of the event matching the first unique identification tag to the first entity if it is determined that an event having the first unique identification tag is stored within the event queue; and generating an error if it is determined that an event having the first unique identification tag is not stored within the event queue.
14. The one or more non-transient computer readable media recited in claim 13, the set of operations further comprising modifying the size of the event queue.
15. An embedded system comprising: a processor; a plurality of entities; an event queue; and a memory having a set of instructions stored thereon that cause the embedded system to perform a set of operations, the set of operations comprising: receiving a request from a first one of the plurality of entities to wait on a first event; determining when the first event is posted to the event queue; notifying the first entity once the event is posted; and providing access to data associated with the event to the first entity.
16. The embedded system recited in claim 15, the set of operations further comprising: receiving a request to post a second event to the event queue from a second one of the plurality of entities; generating a unique identification tag for the second event; and adding the second event to the event queue.
17. The embedded system recited in claim 16, the set of operations further comprising adding data associated with the second event to the event queue.
18. The embedded system recited in claim 15, wherein the request from the first entity identifies the first event by a first unique identification tag, the operation for determining when the first event is posted to the event queue comprising: searching the event queue to determine if an event having the first unique identification tag is stored within the event queue; providing details of the event matching the first unique identification tag to the first entity if it is determined that an event having the first unique identification tag is stored within the event queue; and generating an error if it is determined that an event having the first unique identification tag is not stored within the event queue.
19. The embedded system recited in claim 18, the set of operations further comprising modifying the size of the event queue.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The present invention will be described by way of illustrative implementations shown in the accompanying drawings in which like references denote similar elements, and in which:
[0015]
[0016]
[0017]
[0018]
[0019]
DETAILED DESCRIPTION OF THE INVENTION
[0020] The operations of the disclosed implementations may be described herein in a particular sequential order. However, it should be understood that this manner of description encompasses rearrangements, unless a particular ordering is required by specific language set forth below. For example, operations described sequentially may in some cases be rearranged or performed concurrently. Moreover, for the sake of simplicity, the illustrated flow charts and block diagrams typically do not show the various ways in which particular methods can be used in conjunction with other methods.
[0021] It should also be noted that the detailed description sometimes uses terms such as “generate” to describe the disclosed implementations. Such terms are often high-level abstractions of the actual operations that are performed. The actual operations that correspond to these terms will often vary depending on the particular implementation.
[0022] Furthermore, in various implementations, a mathematical model may be employed to represent an electronic device. For example, a model describing the connectivity of the device, such as a netlist, might be employed. Those of ordinary skill in the art will appreciate that the models, even mathematical models, represent real world physical device designs and real world physical phenomenon corresponding to the operation of the device. Additionally, those of ordinary skill in the art will appreciate that during many electronic design and verification processes, the response of a device design to various signals or inputs is simulated. This simulated response corresponds to the actual physical response the device being modeled would have to these various signals or inputs.
[0023] Some of the methods described herein can be implemented by software stored on a computer readable storage medium, or executed on a computer. Accordingly, some of the disclosed methods may be implemented as part of a computer implemented electronic design automation (“EDA”) tool. The selected methods could be executed on a single computer or a computer networked with another computer or computers.
[0024] Illustrative Computing Environment and Embedded System
[0025] As the techniques of the present invention may be implemented using software instructions, the components and operation of a general purpose computer system with which various implementations of the invention may be employed are described. Accordingly,
[0026] The processing unit 105 and the system memory 107 are connected, either directly or indirectly, through a bus 113 or alternate communication structure, to one or more peripheral devices. For example, the processing unit 105 or the system memory 107 may be directly or indirectly connected to one or more additional devices, such as: A fixed memory storage device 115, for example, a magnetic disk drive; a removable memory storage device 117, for example, a removable solid state disk drive; an optical media device 119, for example, a digital video disk drive; or a removable media device 121, for example, a removable floppy drive. The processing unit 105 and the system memory 107 also may be directly or indirectly connected to one or more input devices 123 and one or more output devices 125. The input devices 123 may include, for example, a keyboard, a pointing device (such as a mouse, touchpad, stylus, trackball, or joystick), a scanner, a camera, and a microphone. The output devices 125 may include, for example, a monitor display, a printer and speakers. With various examples of the computing device 101, one or more of the peripheral devices 115-125 may be internally housed with the computing unit 103. Alternately, one or more of the peripheral devices 115-125 may be external to the housing for the computing unit 103 and connected to the bus 113 through, for example, a Universal Serial Bus (“USB”) connection.
[0027] With some implementations, the computing unit 103 may be directly or indirectly connected to one or more network interfaces 127 for communicating with other devices making up a network. The network interface 127 translates data and control signals from the computing unit 103 into network messages according to one or more communication protocols, such as the transmission control protocol (“TCP”) and the Internet protocol (“IP”). Also, the interface 127 may employ any suitable connection agent (or combination of agents) for connecting to a network, including, for example, a wireless transceiver, a modem, or an Ethernet connection.
[0028] It should be appreciated that the computing device 101 is shown here for illustrative purposes only, and it is not intended to be limiting. Various embodiments of the invention may be implemented using one or more computers that include the components of the computing device 101 illustrated in
[0029] As stated above, various implementations of the present invention are applicable to event management in an embedded system. As such, an illustrative embedded system is described in conjunction with
[0030] The software 205, which may also be referred to as the “firmware” or the “operating system” (OS), is typically stored on a non-transient memory component. More particularly, the software 205 may be stored on the memory 215. In this manner, the functionality “programmed” into the software 205 may be accessed and used to interact with and control the hardware 203 of the embedded system 201.
[0031] Those of ordinary skill in the art will appreciate that many embedded systems, such as, for example, the embedded system 201, share some of the same componentry and operation to a general purpose computer, such as, for example, the computing system 101 of
[0032] Event Management Queue
[0033] As stated above, various implementations of the invention provide an “event” queue management architecture that enables a single event queue to support all “waiters” in the system. As used herein, an “event” may be any change in state within the system. For example, a change in state of the power source 213 from 100% charged to 90% charged may be considered an event. Another example of an event may be the software 205 changing state. Typically, an entity within the system, that is, any component of the system or any software, or sub-portion thereof, executing on the system may notify the system of an event. Often this is referred to as “posting” an event. In alternative implementations, event posting may be restricted to certain entities. As just detailed, and as those of skill in the art will appreciate, any number of different occurrences within an embedded system may be considered events. As such, an exhaustive list is not produced herein.
[0034] A “waiter” may be any component within the system, such as, for example, the output unit 209 or a one of the peripheral units 217 may be a waiter. In some implementations, components of the software 205 may also be waiters. Typically, any entity may be a waiter. As those of ordinary skill in the art will appreciate, various different types and classes of components or “entities” may be found within a system. Various implementations of the invention do not have restrictions of which of these entities can be waiters. In alternative implementations, only certain entities are allowed to be waiters. Alternatively still, as will be further described below, in some instances multiple queues may be established wherein event posting and waiting privileges in the system may be restricted based upon the event queue.
[0035]
[0036] As can be seen from
[0037] The system 301 additionally includes an event posting module 305, a waiter registration module 307, a waiter notification module 307, a notification module 309 and an event data access module 311. In various implementations, these modules may be implanted by a computer readable medium having software instructions stored thereon, computer-executable instructions executing on a programmable computer, or some combination of the two.
[0038] Turning to
[0039] Event Posting
[0040] With various implementations, the operation 403 for receiving a request from an entity receives a request to post an event. As indicated above, in some implementations any entity may post an event. As can be seen from
[0041] In various implementations, the request to post an event includes a description of the event, such as, for example, a listing of the event type, or other information about the event that may be selected when the system is configured. The operation 409 then causes the event along with the unique identification tag to be included into the event queue 303. In some implementations, the event description is also stored in the event queue 303. As can be seen from
[0042] Wait Registration
[0043]
[0044] As those of ordinary skill in the art will appreciate, queues often store items based on when the items were added to the queue. Accordingly, as indicated above, the event queue 303 may be searched, by for example, the event data access module 311, based on the order events were added to the event queue 303. More specifically, events added to the event queue 303 after a specified event was added may be searched. Those of ordinary skill in the art will appreciate that alternative methods of managing queue's may also be used. Various implementations of the invention may be adapted to accommodate such queues without departing from the spirit and scope of the invention.
[0045] Subsequent to a request being received from a waiter, the operation 413 operates to identify the event or events specified by the waiter. As stated above, the event management system includes the waiter registration module 307 and the notification module 309. In various implementations, an entity, such as for example, the entity 313b, contacts the wait registration module 307 with a request to wait on a specified event. The wait registration module then passes the request to the notification module 309, which identifies the specified event from the event queue 303. In various states of operation, the specified event will not yet be in the event queue 303. In which case, the notification module 309 will hold the request until the specified event is identified in the event queue 303. The event queue 303 may then periodically be searched, or new events may be checked as they are added to the event queue 303, in order to find events that match the request. Once the specified event is identified, the waiter is notified of the event. In some implementations, the unique identification tag associated with the identified event is provided to the requesting entity 313b (i.e. the waiter.)
[0046] The operation 417 provides for a waiter to access associated data from an event. For example, as described above, the notification module 309 notifies a waiter once the specified events are identified and provides the unique identification tag to the waiter. In some implementations the operation 415 also provides a ticket to the waiter. This ticket may then be used by the waiter to access event details as well as any data associated with the event. For example, if the associated data is stored outside of the event queue 303, then is the ticket a link to the memory location where that information is stored. Alternately, if the information is stored in the event queue 303, the ticket is permission, or some reference allowing the waiter to request the information from the event queue 303 through a follow-up request to the event data access module 311. In alternative implementations, the operations 415 and 417 may be combined into a single operation.
[0047] As indicated above, many systems, such as the system 201 are event driven. More specifically, system operations are triggered by particular events occurring within the system. Accordingly, waiters within the system may use the event information provided by the event queue management system 301 to know when to perform specific operations.
[0048] Error Recovery and Dynamic Queue Sizing
[0049] As stated above, the event management system 301 may optionally include an event queue size module 313. With some implementations, the event queue size module 313 may be used to dynamically adjust the size of the event queue 303. As detailed above, in some implementations, a request to wait on a first event may be made by specifying that the event queue 303 be searched since the occurrence of a second event, identified by the second events unique identification tag. If the wait registration module 307 determines that the second event is no longer within the event queue 303, an error may be reported to the event queue size management module 313, which may, increase the size of the event queue in response. In various implementations, the error may be used to determine if the size of the event queue 303 is too small. More specifically, if errors are continually generated, then it may be assumed that the size of the event queue 303 it is too small as evenest are purged from the vent queue prior to being available for waiters.
[0050] Multiple Queues
[0051] As stated above, in some implementations, multiple event queues 303 may be provided.
[0052] Where multiple event queues 303 are provided, the event queue access module 503 may authenticate the different entities when they request to post an event or request to wait on an event. If the entity is properly authorized, and authenticated by the event queue access module 503, the request will be processed as detailed above. More specifically, depending upon the type of request (i.e. event posting request or event waiting request,) the event will be posted to the requested event queue 303, or alternatively, the event queue searched, as described above.
CONCLUSION
[0053] Although certain devices and methods have been described above in terms of the illustrative embodiments, the person of ordinary skill in the art will recognize that other embodiments, examples, substitutions, modification and alterations are possible. It is intended that the following claims cover such other embodiments, examples, substitutions, modifications and alterations within the spirit and scope of the claims.