Designing ParallelZone’s ResourceSet Class
The need for a ResourceSet
class grew out of Designing ParallelZone’s Parallel Runtime.
This page fleshes the details out more.
Why Do We Need the ResourceSet Class?
When viewing resources we need to know the total set of resources, the
responsibility of which falls to RuntimeView
, and also which of those
resources are local/directly accessible by the current process. As discussed
in Designing ParallelZone’s Parallel Runtime, the ResourceSet
class is ParallelZone’s
abstraction for delimiting which resources are part of the process’s local
runtime environment.
ResourceSet Responsibilities
As enumerated in Designing ParallelZone’s Parallel Runtime the main responsibilities of
the ResourceSet
is to:
Scheduling per-thread tasks.
Tracking hardware instances available to the local runtime environment.
Facilitating data movement among
ResourceSet
instances.Track resource usage.
Allow logical partitioning of resources.
Additional considerations:
Separate API concerns from backend.
May need to use different runtime systems in the future.
May need to support different hardware.
Hopefully keep dependencies private.
ResourceSet Architecture
Fig. 8 shows the architecture of the ResourceSet
class.
It addresses the responsibilities by:
Having a scheduler which is in charge of scheduling thread-based tasks.
Instances for each hardware resource actually present.
Actual instances can be implicit (made on the fly)
ResourceSet’s constructor is responsible for finding resources.
CommPP
object to send/receive data in object-oriented manner.We decided to have the hardware instances control the process of actually sending/receiving data. For example
rs.ram().gather()
would gather data into the RAM of theResourceSet
objectrs
, it’s called on.Decision facilitates controlling the end-point (RAM or memory on the GPU).
Exposes a multi-process operation below
RuntimeView
, which is somewhat awkward.
Accomplished by using PIMPL design paradigm.
At present:
Tracking of resource usage
Logical partitioning
are not yet implemented or designed.
Additional Notes
We right now assume one RAM bank. Should we generalize this?