47 std::vector<Block>
code,
63 [[nodiscard]] const
PCB &
pcb() const noexcept;
75 [[nodiscard]] const std::vector<
Block> &
code() const noexcept;
78 [[nodiscard]] std::
size_t codeSize() const noexcept;
94 [[nodiscard]] std::string_view
name() const noexcept;
Block — the fundamental unit of simulated memory.
Process Control Block — stores all metadata for a single process.
ProcessState state() const noexcept
Returns the current process state.
const RegisterFile & registers() const noexcept
Returns a const reference to the register file.
const std::vector< Block > & code() const noexcept
Returns a const reference to the code segment.
std::size_t codeSize() const noexcept
Returns the size of the code segment (number of Blocks).
ProcessImage(ProcessImage &&) noexcept
void setCode(std::vector< Block > newCode)
Replaces the code segment with new code.
ProcessImage(const ProcessImage &)=delete
std::string_view name() const noexcept
Returns the process name.
std::unique_ptr< Impl > impl_
const Block & readCode(std::size_t offset) const
Reads a single Block from the code segment.
const Priority & priority() const noexcept
Returns the process priority.
ProcessImage & operator=(const ProcessImage &)=delete
const PCB & pcb() const noexcept
Returns a const reference to the PCB.
ProcessImage(ProcessId id, std::string name, std::vector< Block > code, Priority priority=Priority{}, Tick arrivalTime=0)
Constructs a ProcessImage with the given parameters.
The CPU's register bank — holds REGISTER_COUNT (16) registers.
ProcessState
All possible states in a process lifecycle.
std::uint64_t Tick
Simulation clock tick counter.
std::uint32_t ProcessId
Unique identifier for a process.
Process Control Block — metadata for a single process.
Process priority levels and the Priority struct.
Register enum class and RegisterFile — the CPU's register bank.
A single memory cell in the simulated architecture.
Composite priority descriptor for a process.
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...