Event-based synchronization
First Claim
1. A system comprising:
- a Unix operating system;
a plurality of execution entities, the plurality of execution entities including a first execution entity;
an event control module adapted to create event objects representing respective events each having a state, the first execution entity to wait on plural events;
a data structure associated with the first execution entity, the data structure containing information of the plural events that the first execution entity is waiting on, the data structure further containing an indicator settable to one of plural values to specify respective plural logical relationships between the plural events; and
a controller adapted to awaken the first execution entity by signaling the first execution entity in response to one or more event state changes of the states of the plural events according to the logical relationship specified by the indicator,wherein each event object contains an indication of the state of the event, wherein the indication has a first state to indicate that the corresponding event has been signaled and a second state to indicate that the corresponding event has not been signaled,wherein each event object has a type indication to indicate whether the event object state indication is to be automatically reset to the second state from the first state once the event has been signaled or to be manually reset to the second state from the first state by an explicit action,wherein if a particular one of the event objects is to be automatically reset, then only one of plural execution entities waiting on the particular event object will be awakened in response to the corresponding event being signaled, andwherein if the particular event object is to be manually reset, then all execution entities waiting on the particular event object will be awakened in response to the corresponding event being signaled.
2 Assignments
0 Petitions
Accused Products
Abstract
A synchronization method and apparatus defines event objects to enable synchronization of execution entities (e.g., threads). In one arrangement, the synchronization method and apparatus is used in conjunction with a Unix operating system. By defining event objects on which threads or other execution entities can wait upon, multiple threads can wait on one event, or alternatively, one thread can wait on multiple events. Furthermore, using the event-based synchronization method and apparatus, it is possible to specify behavior, particularly when one thread or other execution entity waits on multiple events. For example, the behavior specified can be that a condition is satisfied if any of the events occur, if all of the events occur, or some other logical combination of events occur.
21 Citations
25 Claims
-
1. A system comprising:
-
a Unix operating system; a plurality of execution entities, the plurality of execution entities including a first execution entity; an event control module adapted to create event objects representing respective events each having a state, the first execution entity to wait on plural events; a data structure associated with the first execution entity, the data structure containing information of the plural events that the first execution entity is waiting on, the data structure further containing an indicator settable to one of plural values to specify respective plural logical relationships between the plural events; and a controller adapted to awaken the first execution entity by signaling the first execution entity in response to one or more event state changes of the states of the plural events according to the logical relationship specified by the indicator, wherein each event object contains an indication of the state of the event, wherein the indication has a first state to indicate that the corresponding event has been signaled and a second state to indicate that the corresponding event has not been signaled, wherein each event object has a type indication to indicate whether the event object state indication is to be automatically reset to the second state from the first state once the event has been signaled or to be manually reset to the second state from the first state by an explicit action, wherein if a particular one of the event objects is to be automatically reset, then only one of plural execution entities waiting on the particular event object will be awakened in response to the corresponding event being signaled, and wherein if the particular event object is to be manually reset, then all execution entities waiting on the particular event object will be awakened in response to the corresponding event being signaled. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. An article comprising at least one storage medium containing instructions for providing event-based synchronization in a system in which execution entities are running, the instructions when executed causing the system to:
-
generate event objects in a Unix operating system environment representing events used for synchronizing execution entities in the system, each event object having a state to indicate if the corresponding event has been signaled; provide a queue containing entries associated with a first event object, each entry associated with a corresponding execution entity, the plural entries of the queue enabling plural execution entities to wait on the first event object; and selectively set a type variable to one of a first value and a second value, the first value indicating that the first event object is of an auto-reset type, and the second value indicating that the first event object is of a manual reset type; in response to the state of the first event object indicating the corresponding event has been signaled, automatically clear the state of the first event object to an un-signaled state and awaken only one of the plural execution entities waiting on the first event object in response to the type variable being set to the first value, and not clear the state of the first event object until manually cleared and awaken all threads waiting on the first event object in response to the type variable being set to the second value. - View Dependent Claims (19, 20, 21, 22, 23, 24, 25)
-
Specification