Expand description
GPU Actor Lifecycle Model
Implements the full actor model lifecycle on GPU hardware:
- Create: Activate a dormant actor slot from the pool
- Destroy: Deactivate an actor, return its slot to the pool
- Restart: Destroy + reinitialize state + Create
- Supervise: Parent-child tree with failure detection and restart policies
§Architecture
On a GPU, thread blocks are fixed at kernel launch time — you can’t spawn new blocks dynamically. The solution is a pool-based design:
┌─── Persistent Kernel (N blocks pre-allocated at launch) ──────────┐
│ │
│ Block 0: SUPERVISOR │
│ ├─ Actor registry (who is active, who is dormant) │
│ ├─ Free list (available actor slots) │
│ ├─ Supervision tree (parent-child relationships) │
│ └─ Heartbeat monitor (detect actor failures) │
│ │
│ Block 1: ACTIVE actor "sensor-reader" │
│ ├─ Processing messages from H2K queue │
│ ├─ Created child: Block 3 │
│ └─ Heartbeat: last_seen = 1.2ms ago │
│ │
│ Block 2: DORMANT (in free pool) │
│ └─ Zero cost when idle — just checks is_active flag │
│ │
│ Block 3: ACTIVE actor "data-processor" (child of Block 1) │
│ ├─ Processing K2K messages from Block 1 │
│ └─ Heartbeat: last_seen = 0.5ms ago │
│ │
│ Block 4-N: DORMANT (in free pool) │
│ │
│ "Create actor" = supervisor activates dormant block │
│ "Kill actor" = supervisor deactivates, returns to free pool │
│ "Restart" = destroy + reinit state + create │
└────────────────────────────────────────────────────────────────────┘§Comparison with Erlang/Akka
| Erlang/Akka | RingKernel GPU |
|---|---|
spawn(Fun) | supervisor.create_actor(config) → activates dormant block |
Pid ! Message | K2K channel or H2K queue injection |
exit(Pid, Reason) | supervisor.destroy_actor(id) → deactivates block |
| Supervisor tree | Parent-child tree in mapped memory |
one_for_one restart | Heartbeat timeout → destroy + create |
| Process isolation | Separate control block + queue per block |
Structs§
- Actor
Config - Configuration for creating a new GPU actor.
- ActorId
- Unique identifier for a GPU actor within a persistent kernel.
- Actor
Supervisor - The supervisor manages the actor pool lifecycle.
- Supervision
Entry - Entry in the supervision tree.
Enums§
- Actor
Error - Errors from actor lifecycle operations.
- Actor
State - State of a GPU actor slot.
- Restart
Policy - Restart policy for supervised actors.
- Supervision
Action - Action taken by the supervisor in response to a failure.