From 5a396cc9e55394ae1fa93ae997fc2b7239d93873 Mon Sep 17 00:00:00 2001 From: Carter Edwards Date: Wed, 18 Apr 2018 14:40:27 -0600 Subject: [PATCH 1/2] Add terminology section aligned with P0737 Execution Context. --- affinity/cpp-20/d0796r2.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/affinity/cpp-20/d0796r2.md b/affinity/cpp-20/d0796r2.md index d14c120..6a2bd0d 100644 --- a/affinity/cpp-20/d0796r2.md +++ b/affinity/cpp-20/d0796r2.md @@ -170,6 +170,27 @@ This feature could be easily scaled to heterogeneous and distributed systems, as In this paper we propose an interface for querying and representing the execution resources within a system, queurying the relative affinity metric between those execution resources, and then using those execution resources to allocate memory and execute work with affinity to the underlying hardware. The interface described in this paper builds on the existing initerface for executors and execution contexts defined in the executors proposal [[22]][p0443r4]. +### Terminology + +An **execution agent** executes work, typically implemented by a *callable*, +on an **execution resource** of a given **execution architecture**. +An **execution context** manages a set of execution agents on an +execution resource. +An **executor** submits work to an execution context. +More that one executor may submit work to an execution context. +More than on execution context may manage execution agents +on an execution resource. + +> [*Note:* The execution context terminology used here +and in the Networking TS [[33]][networking-ts] deviate from the +traditional *context of execution* usage that refers +to the state of a single executing callable; *e.g.*, +program counter, registers, stack frame. *--end note*] + +The **concurrency** of an execution resource is the maximum number +of execution agents that could make concurrent forward progress +on that execution resource. + ### Execution resources An `execution_resource` is a light weight structure which acts as an identifier to particular piece of hardware within a system. It can be queried for whether it can allocate memory via `can_place_memory` and whether it can execute work via `can_place_agents`, and for it's name via `name`. An `execution_resource` can also represent other `execution_resource`s, these are refered to as being *members of* that `execution_resource` and can be queried via `resources`. Additionally the `execution_resource` which another is a *member of* can be queried vis `member_of`. An `execution_resource` can also be queried for the concurrency it can provide; the total number of *threads of execution* supported by that *execution_resource* and all resources it represents. @@ -647,3 +668,7 @@ The current proposal requires that all `execution_resource`s are initialised bef [madness-journal]: http://dx.doi.org/10.1137/15M1026171 [[32]][madness-journal] MADNESS: A Multiresolution, Adaptive Numerical Environment for Scientific Simulation + +[networking-ts]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/n4734.pdf +[[33]][networking-ts] N4734 : Working Draft, C++ Extensions for Networking + From 0de4d9f841b98ebee038c66cdbe0475d882b30c3 Mon Sep 17 00:00:00 2001 From: Carter Edwards Date: Tue, 24 Apr 2018 13:41:52 -0600 Subject: [PATCH 2/2] Clarify that concurrency is an upper bound. --- affinity/cpp-20/d0796r2.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/affinity/cpp-20/d0796r2.md b/affinity/cpp-20/d0796r2.md index 6a2bd0d..5e5955e 100644 --- a/affinity/cpp-20/d0796r2.md +++ b/affinity/cpp-20/d0796r2.md @@ -187,9 +187,14 @@ traditional *context of execution* usage that refers to the state of a single executing callable; *e.g.*, program counter, registers, stack frame. *--end note*] -The **concurrency** of an execution resource is the maximum number -of execution agents that could make concurrent forward progress +The **concurrency** of an execution resource is an upper bound of the +number of execution agents that could make concurrent forward progress on that execution resource. +It is guaranteed that no more than **concurrency** execution agents +could make concurrent forward progress; it is not guaranteed that +**concurrency** execution agents will ever make concurrent forward progress. + + ### Execution resources