Shaft::baseproc: Difference between revisions
Write a bit about shaft::baseproc lifecycles. |
Change name of PendingActive and Active to Ready and Calc based on totk ai nodes QueryGenericIsSleepOrReady and QueryActorHolderIsCalcOrPauseState |
||
| Line 2: | Line 2: | ||
=== BaseProcMgr === | === BaseProcMgr === | ||
Manages BaseProcs and BaseProc related sub-managers. | Manages BaseProcs and BaseProc related sub-managers. BaseProcs with the Calc, Sleeping, or Paused states create a job graph spanning 4 "stages" with 8 "priorities" each, for 32 separate job graphs. The job graphs are processed one after the other, following the priorities from highest (0) to lowest (7) before advancing to the next stage. The jobs within each graph are processed concurrently with respect to their dependencies. | ||
==== Lifecycle ==== | ==== Lifecycle ==== | ||
| Line 11: | Line 11: | ||
===== Building ===== | ===== Building ===== | ||
The system is building the job graph. | The system is building the job graph. BaseProcs in the Calc state will insert their jobs, and paused or sleeping BaseProcs will instead insert their sleep job if they have one. | ||
===== BaseProc Processing ===== | ===== BaseProc Processing ===== | ||
| Line 26: | Line 26: | ||
==== Lifecycle ==== | ==== Lifecycle ==== | ||
A BaseProc has 12 states | A BaseProc has 12 states one can logically group into 4 "cycles"; initialization (3), live (4), removal (3), and finalization (2). | ||
===== Initialization ===== | ===== Initialization ===== | ||
| Line 41: | Line 41: | ||
===== Live ===== | ===== Live ===== | ||
This group of states represents a BaseProc that is "live" in the system. The initial state after "PostInitialize" succeeds is | This group of states represents a BaseProc that is "live" in the system. The initial state after "PostInitialize" succeeds is Ready, from there a BaseProc can move between Calc, Sleeping, or Paused. | ||
====== | ====== Ready ====== | ||
The initial "Live" state of a BaseProc. RequestCancelSleep or RequestCancelPause can be used to attempt to | The initial "Live" state of a BaseProc. RequestCancelSleep or RequestCancelPause can be used to attempt to change the BaseProc to Calc. | ||
====== | ====== Calc ====== | ||
The quintessential "Live" state. All of the BaseProc's | The quintessential "Live" state. All of the BaseProc's Calc jobs will be used in job graph building. | ||
====== Sleeping ====== | ====== Sleeping ====== | ||
A heavyweight break in a BaseProc's processing. The BaseProc's sleep job will be used in job graph building. RequestCancelSleep will | A heavyweight break in a BaseProc's processing. The BaseProc's sleep job will be used in job graph building. RequestCancelSleep will attempt to change the BaseProc to Calc. | ||
====== Paused ====== | ====== Paused ====== | ||