摘要:
Each processing resource in a scheduler of a process executing on a computer system maintains counts of the number of tasks that arrive at the processing resource and the number of tasks that complete on the processing resource. The counts are maintained in storage that is only writeable by the corresponding processing resource. The scheduler collects and sums the counts from each processing resource and provides statistics based on the summed counts and previous summed counts to a resource manager in response to a request from the resource manager. The scheduler does not reset the counts when the counts are collected and stores copies of the summed counts for use with the next request from the resource manager. The counts may be maintained without synchronization and with thread safety to minimize the impact of gathering statistics on the application.
摘要:
A compositional model referred to as a source-target pattern for connecting processes into process networks in a general, flexible, and extensible manner is provided. The model allows common process algebra constructs to be combined with data flow networks to form process networks. Process algebraic operations may be expressed in terms of the compositional model to form data flow networks that provide fully interoperable process algebraic operations between processes.
摘要:
A scheduler in a process of a computer system schedules tasks of a task group for concurrent execution by multiple execution contexts. The scheduler provides a mechanism that allows the task group to be cancelled by an arbitrary execution context or an asynchronous error state. When a task group is cancelled, the scheduler sets a cancel indicator in each execution context that is executing tasks corresponding to the cancelled task group and performs a cancellation process on each of the execution contexts where a cancel indicator is set. The scheduler also creates local aliases to allow task groups to be used without synchronization by execution contexts that are not directly bound to the task groups.
摘要:
The present invention extends to methods, systems, and computer program products for transforming source code to await execution of asynchronous operations. Embodiments of the invention simplify authoring and use of asynchronous methods, by generating statements that use well-defined awaitable objects to await completion of asynchronous operations. For example, a computer system can transform a statement that requests to await the completion of an asynchronous operation into a plurality of statements that use a predefined pattern of members of an awaitable object corresponding the asynchronous operation. The pattern can include one or more members configured to return a completion status of the asynchronous operation, one or more members configured to resume execution of the asynchronous method at a resumption point when the asynchronous operation completes, and one or more members configured to retrieve completion results. Accordingly, the plurality of statements can use these members to await execution of the asynchronous operation.
摘要:
Local storage may be allocated for each processing resource in a process of a computer system. Each processing resource may be virtualized and may have a one-to-one or a many-to-one correspondence with with physical processors. The contents of each local storage persist across various execution contexts that are executed by a corresponding processing resource. Each local storage may be accessed without synchronization (e.g., locks) by each execution context that is executed on a corresponding processing resource. The local storages provide the ability to segment data and store and access the data without synchronization. The local storages may be used to implement lock-free techniques such as a generalized reduction where a set of values is combined through an associative operator.
摘要:
The isolation of user-interactive components form the logical components of an exemplary computing application environment is provided. In an illustrative implementation, an exemplary computing application environment comprises one or more user interface (UI) elements that run on an exemplary user-interface processing thread and application logic that illustratively operatively runs asynchronously on at least one other processing thread. In an illustrative implementation an isolation boundary is provided between an exemplary user interface and the application logic of the exemplary computing application environment. In the illustrative implementation, the isolation boundary can comprise an asynchronous view contract comprising a channel between an exemplary view layer of an exemplary user interface (e.g., one or more user-interactive components) and application logic.
摘要:
Unsuspended co-routines are handled by the machine call stack mechanism in which the stack grows and shrinks as recursive calls are made and returned from. When a co-routine is suspended, however, additional call stack processing is performed. A suspension message is issued, and the entire resume-able part of the call stack is removed, and is copied to the heap. A frame that returns control to a driver method (a resumer) is copied to the call stack so that resumption of the co-routine does not recursively reactivate the whole call stack. Instead the resumer reactivates only the topmost or most current frame called the leaf frame. When a co-routine is suspended, it does not return to its caller, but instead returns to the resumer that has reactivated it.
摘要:
A process in a computer system creates and uses a meta-scheduler with meta-contexts that execute on meta-virtual processors. The meta-scheduler includes a set of schedulers with scheduler-contexts that execute on virtual processors. The meta-scheduler schedules the scheduler-contexts on the meta-contexts and schedules the meta-contexts on the meta-virtual processors which execute on execution contexts associated with hardware threads.
摘要:
A scheduler in a process of a computer system includes a local collection of tasks for each processing resource allocated to the scheduler and at least one general collection of tasks. The scheduler assigns each task that becomes unblocked to the local collection corresponding to the processing resource that caused the task to become unblocked. When a processing resource becomes available, the processing resource attempts to execute the most recently added task in the corresponding local collection. If there are no tasks in the corresponding local collection, the available processing resource attempts to execute a task from the general collection.
摘要:
Systems and methods that integrate data type conversion(s) into a programming language, and describe external formats within a syntax thereof. A mapping component defines a declarative mapping from an external data format to one or more of its internal data types (e.g., expressing external data types in terms of source languages.) Moreover, a rule establishing component can define value-based rules, such as invariants to the external data format, wherein the schema declaration further defines data fields that make up the schema. Accordingly, by expressing rules in form of predicate logic (instead of imperative program logic) the subject innovation increase a likelihood that compilers can reason about the data.