Resources assignment
The assignment of Capabilities to a subarray (subarray composition) is performed in advance of a scan configuration. Assignable Capabilities for CSP Subarrays are:
receptors (MID) or stations (LOW)
tied-array beams: Search Beams, Timing Beams and Vlbi Beams.
In general resource assignment to a subarray is exclusive, but in some cases the same Capability instance may be used in shared manner by more then one subarray.
Inherent Capabilities
Each CSP subarray has also a set of permanently assigned inherent Capabilities: the number and type is different for LOW and MID instance.
Only the Inherent Capabilities related to the Processing Mode are common to both instances.
These are:
Correlation
PSS
PST
VLBI
An inherent Capability can be enabled or disabled, but cannot assigned or removed to/from a subarray.
PST Beam assignment
PST Beams (the Timing Beam inherent Capability) are the one assignable resource whose
availability spans the whole telescope rather than a single Subarray: any PST Beam
can, in principle, be requested by any Subarray, so exclusivity has to be arbitrated
somewhere all Subarrays can see. That role belongs to the ResourceManager device, which
is the sole authority on which PST Beam is currently assigned to which Subarray.
Reservation, assignment and confirmation
When a Subarray’s AssignResources command includes PST Beams, the
PstBeamsCoordinator:
reserves every requested PST Beam with
ResourceManagerin a single batch call. Each beam is checked for availability independently, so one beam already held by another Subarray does not prevent the rest of the batch from being reserved;for every beam it was able to reserve, assigns it on the hardware and validates the outcome;
confirms the reservation with
ResourceManageronce hardware assignment has been validated - or releases it, if assignment failed.
Reservation, hardware assignment and confirmation for a given beam all complete, one
way or another, before the AssignResources command itself returns: a beam is
never left reserved-but-unconfirmed for something else to resolve later.
A beam already reserved by the same Subarray, but never confirmed - an orphaned
reservation left behind by an earlier AssignResources attempt that was
interrupted before it could confirm or release it - is reclaimed rather than
rejected, so a Subarray can retry a crashed assignment for its own beams without
first requiring an explicit Restart. A beam already confirmed, or currently
held by a different Subarray, is never affected by this and is rejected as
normal.
All-or-nothing vs. best-effort
What happens when one requested PST Beam cannot be reserved or assigned is
controlled by PstBeamsCoordinator.best_effort (BEST_EFFORT_PST_ASSIGN in
pst_beams_coordinator):
all-or-nothing (the current default): a single beam failing - whether at reservation or at hardware assignment - fails the whole
AssignResourcesrequest and rolls back every beam reserved in it, including any already fully assigned and confirmed. If any beam is rejected at reservation, hardware assignment is not even attempted for the others, since they would only be released again regardless.best-effort: each requested PST Beam is handled independently. A beam that cannot be reserved, or that fails hardware assignment, does not prevent the other requested beams from being assigned - whatever succeeds stays assigned.
Either way, the command result reports every beam that could not be assigned together with the specific reason (for example, that it is already held by another Subarray, or that hardware assignment failed); only whether the beams that did succeed are kept or rolled back differs between the two modes.
Release
Releasing a PST Beam always goes through ResourceManager as well, which verifies
that the releasing Subarray is actually the one currently holding that beam before
freeing it - a Subarray cannot release a PST Beam it does not hold, even by mistake.
As a recovery path (for example during a Subarray Restart), every PST Beam
currently held by a given Subarray can also be released unconditionally, by
Subarray id rather than a per-beam claim. This covers beams the Subarray’s own
local tracking may have lost - including ones that were only ever reserved and
never confirmed - regardless of what the Subarray currently believes it holds.