Skip to content

Commit a8c89b3

Browse files
committed
Partial subsection on resources
1 parent 6ee2ba7 commit a8c89b3

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

doc/ch_conceptual_design/resources.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,42 @@ As mentioned in :numref:`ch_conceptual_design/algorithms:Algorithms`, the typica
1010
where the types :cpp:`P1, Pn...` represent data products, and the types :cpp:`Rm...` represent resources.
1111

1212
Resources are used by algorithms that require access to a shared entity that is not semantically related to the data-product set hierarchy.
13+
An example registration of an algorithm that requires both a data product and a resource is found in :numref:`ch_conceptual_design/hofs/observers:Observers`.
14+
The details of the registration code express to the framework which arguments correspond to data products and which correspond to resources :need:`DUNE 52`.
15+
They may be stateless objects (e.g. a resource that denotes that an algorithm requires the use of a specific thread-unsafe library) or stateful objects (e.g. a resource that denotes access to a GPU, when the platform on which the framework program is running contains several GPUs).
16+
Neither of these examples contain mutable state.
17+
Resources (unlike data products) may have mutable state accessible to the algorithm (e.g. a histogram instance that could be shared across multiple algorithms).
18+
For resources that are mutable, the framework ensures that two algorithms are not interacting with the resource at the same time.
19+
The framework is responsible for efficiently scheduling algorithms based, in part, upon the availability of resources :need:`DUNE 50`.
20+
1321
Examples of resources include:
1422

1523
- GPUs
1624
- Network connections
1725
- Thread-unsafe utilities
1826
- Inference servers
19-
- Database handles
27+
- Database handles :need:`DUNE 35`, :need:`DUNE 40`
2028

2129
Whereas data products have provenance associated with them, resources do not.
2230

23-
.. todo::
24-
25-
Refer to :need:`DUNE 35`, :need:`DUNE 40`, :need:`DUNE 50`, :need:`DUNE 52`
26-
27-
.. todo::
28-
29-
Mention that resources are directly integrated into the framework scheduler.
30-
3131
Limited Resources
3232
-----------------
3333

3434
.. todo::
3535

3636
Refer to :need:`DUNE 45`, :need:`DUNE 145`
3737

38+
Explain what a limited resource is and why it is useful.
39+
3840
GPUs
3941
----
4042

4143
.. todo::
4244

4345
Refer to :need:`DUNE 54`
4446

47+
Say what access to the GPU resource provides (perhaps sole access to the GPU hardware for the time the resource is in scope).
48+
4549
Random Number Resource
4650
----------------------
4751

0 commit comments

Comments
 (0)