![]() |
Contur 2
Educational OS kernel simulator
|
Multiprocessor dispatcher delegating to child dispatchers. More...
#include <mp_dispatcher.h>
Public Member Functions | |
| MPDispatcher (std::vector< std::reference_wrapper< IDispatcher > > dispatchers, IDispatchRuntime &runtime) | |
| Constructs MP dispatcher with worker dispatchers and required injected runtime strategy. | |
| ~MPDispatcher () override | |
| Destroys MP dispatcher. | |
| MPDispatcher (const MPDispatcher &)=delete | |
| Copy construction is disabled. | |
| MPDispatcher & | operator= (const MPDispatcher &)=delete |
| Copy assignment is disabled. | |
| MPDispatcher (MPDispatcher &&) noexcept | |
| Move-constructs MP dispatcher state. | |
| MPDispatcher & | operator= (MPDispatcher &&) noexcept |
| Move-assigns MP dispatcher state. | |
| Result< void > | createProcess (std::unique_ptr< ProcessImage > process, Tick currentTick) override |
| Routes a process to one child dispatcher. | |
| Result< void > | dispatch (std::size_t tickBudget) override |
| Runs dispatch cycle across all child dispatchers. | |
| Result< void > | terminateProcess (ProcessId pid, Tick currentTick) override |
| Terminates process in the child dispatcher that owns it. | |
| void | tick () override |
| Ticks all child dispatchers. | |
| std::size_t | processCount () const noexcept override |
| Aggregated number of processes across children. | |
| bool | hasProcess (ProcessId pid) const noexcept override |
| Returns true if any child contains process pid. | |
| Public Member Functions inherited from contur::IDispatcher | |
| virtual | ~IDispatcher ()=default |
Private Attributes | |
| std::unique_ptr< Impl > | impl_ |
Multiprocessor dispatcher delegating to child dispatchers.
Definition at line 17 of file mp_dispatcher.h.
| contur::MPDispatcher::MPDispatcher | ( | std::vector< std::reference_wrapper< IDispatcher > > | dispatchers, |
| IDispatchRuntime & | runtime ) |
Constructs MP dispatcher with worker dispatchers and required injected runtime strategy.
| dispatchers | Dispatcher lanes used by the runtime. |
| runtime | Runtime strategy injected by composition root. |
Referenced by MPDispatcher(), MPDispatcher(), operator=(), and operator=().
|
override |
Destroys MP dispatcher.
|
delete |
Copy construction is disabled.
References MPDispatcher().
|
noexcept |
Move-constructs MP dispatcher state.
References MPDispatcher().
|
nodiscardoverridevirtual |
Routes a process to one child dispatcher.
Implements contur::IDispatcher.
References createProcess().
Referenced by createProcess().
|
nodiscardoverridevirtual |
Runs dispatch cycle across all child dispatchers.
Implements contur::IDispatcher.
References dispatch().
Referenced by dispatch().
|
nodiscardoverridevirtualnoexcept |
Returns true if any child contains process pid.
Implements contur::IDispatcher.
References hasProcess().
Referenced by hasProcess().
|
delete |
Copy assignment is disabled.
References MPDispatcher().
|
noexcept |
Move-assigns MP dispatcher state.
References MPDispatcher().
|
nodiscardoverridevirtualnoexcept |
Aggregated number of processes across children.
Implements contur::IDispatcher.
References processCount().
Referenced by processCount().
|
nodiscardoverridevirtual |
Terminates process in the child dispatcher that owns it.
Implements contur::IDispatcher.
References terminateProcess().
Referenced by terminateProcess().
|
overridevirtual |
Ticks all child dispatchers.
Implements contur::IDispatcher.
References tick().
Referenced by tick().
|
private |
Definition at line 59 of file mp_dispatcher.h.