![]() |
Contur 2
Educational OS kernel simulator
|
Interface for process lifecycle dispatch orchestration. More...
#include <i_dispatcher.h>
Public Member Functions | |
| virtual | ~IDispatcher ()=default |
| virtual Result< void > | createProcess (std::unique_ptr< ProcessImage > process, Tick currentTick)=0 |
| Admits a new process into the system. | |
| virtual Result< void > | dispatch (std::size_t tickBudget)=0 |
| Runs one scheduling/execution dispatch cycle. | |
| virtual Result< void > | terminateProcess (ProcessId pid, Tick currentTick)=0 |
| Terminates a managed process immediately. | |
| virtual void | tick ()=0 |
| Advances dispatcher-owned simulation time by one tick. | |
| virtual std::size_t | processCount () const noexcept=0 |
| Returns number of processes tracked by dispatcher. | |
| virtual bool | hasProcess (ProcessId pid) const noexcept=0 |
| Returns whether process exists. | |
Interface for process lifecycle dispatch orchestration.
Definition at line 17 of file i_dispatcher.h.
|
virtualdefault |
|
nodiscardpure virtual |
Admits a new process into the system.
| process | Owned process image. |
| currentTick | Current simulation tick. |
Implemented in contur::Dispatcher, and contur::MPDispatcher.
|
nodiscardpure virtual |
Runs one scheduling/execution dispatch cycle.
| tickBudget | Time budget for selected process. |
Implemented in contur::Dispatcher, and contur::MPDispatcher.
|
nodiscardpure virtualnoexcept |
Returns whether process exists.
Implemented in contur::Dispatcher, and contur::MPDispatcher.
References hasProcess().
Referenced by hasProcess().
|
nodiscardpure virtualnoexcept |
Returns number of processes tracked by dispatcher.
Implemented in contur::Dispatcher, and contur::MPDispatcher.
|
nodiscardpure virtual |
Terminates a managed process immediately.
| pid | Process identifier. |
| currentTick | Current simulation tick. |
Implemented in contur::Dispatcher, and contur::MPDispatcher.
|
pure virtual |
Advances dispatcher-owned simulation time by one tick.
Implemented in contur::Dispatcher, and contur::MPDispatcher.