摘要:
A timer service uses a single timer function to perform timing services for both relative and absolute timers. The first timers from a sorted array of absolute timers and relative timers are used in a function that will return when the earliest absolute timer expires or will timeout when the earliest relative timer expires. The timer function may be interrupted when a new timer is added to one of the arrays. The function will operate in a predictable and consistent manner, even when a system clock is adjusted.
摘要:
A timer service uses a single timer function to perform timing services for both relative and absolute timers. The first timers from a sorted array of absolute timers and relative timers are used in a function that will return when the earliest absolute timer expires or will timeout when the earliest relative timer expires. The timer function may be interrupted when a new timer is added to one of the arrays. The function will operate in a predictable and consistent manner, even when a system clock is adjusted.
摘要:
Sharing access to resources using an inter-process communication (“IPC”) provides a connection in which references to resources may be passed from a sender to a receiver in a trusted third party environment. A sender in possession of a reference to a resource, such as a handle to an object, may initiate the connection with the receiver. In turn, the receiver may accept or refuse the connection, and may further specify the types of resources in which the receiver is interested when accepting through the connection. Sharing access to resources in this manner advantageously insures that only a process that already has access to a resource is able to share that access with another process, and further that only processes that wish to do so will accept such access.
摘要:
A system and method for timer windows is provided. A mechanism is provided for managing actions that need to be started within a specified interval. By exploiting windows of acceptable times for events, timer expirations can be grouped and processed in batches to improve the throughput of the system. For one embodiment, an event is associated with a timer object, which has start and end times that specify an interval during which the associated event should be started. A pair of priority queues prioritizes timers by earliest start times and earliest end times. These times are compared with the current time, and corresponding timers are retired from the queue until the timer at the front of the queue has a start time that is later than the current time.
摘要:
An interlocked object transfer data structure is provided for enabling requests made by multiple threads to update objects in a multi-threaded computing environment to be executed by a single processing thread. An object in the interlocked object transfer data structure contains a pair of flags, which the processing thread manipulates via interlocked operations to manage updates for the object that are requested by multiple threads.
摘要:
The invention provides a temporary master thread mechanism that allows any thread wishing to update a data structure to become the temporary master thread for the data structure. A thread becomes a temporary master thread for the data structure by acquiring a lock associated with the data structure. A temporary master thread is capable of processing all pending updates for the data structure, wherein the pending updates can be introduced by the temporary master thread and/or other threads. The temporary master thread releases the lock after processing the pending updates for the data structure.