78 [[nodiscard]] std::string_view
name() const noexcept;
const ProcessTiming & timing() const noexcept
Returns a const reference to the process timing data.
void setEffectivePriority(PriorityLevel level)
Sets only the effective priority level (for dynamic scheduling).
PCB & operator=(const PCB &)=delete
void setPriority(const Priority &priority)
Sets the full priority descriptor.
std::unique_ptr< Impl > impl_
std::string_view name() const noexcept
Returns the human-readable process name.
void addCpuTime(Tick ticks)
Adds the given number of ticks to the total CPU time.
const ProcessAddressInfo & addressInfo() const noexcept
Returns a const reference to the address mapping info.
void setNice(std::int32_t nice)
Sets the nice value (clamped to valid range).
const Priority & priority() const noexcept
Returns a const reference to the process priority.
bool setState(ProcessState newState, Tick currentTick=0)
Transitions the process to a new state.
ProcessState state() const noexcept
Returns the current process state.
PCB(ProcessId id, std::string name, Priority priority=Priority{}, Tick arrivalTime=0)
Constructs a PCB with the given ID, name, and optional priority.
void addBlockedTime(Tick ticks)
Adds the given number of ticks to the total blocked time.
void addWaitTime(Tick ticks)
Adds the given number of ticks to the total wait time.
ProcessState
All possible states in a process lifecycle.
PriorityLevel
Discrete priority levels, from highest (Realtime) to lowest (Idle).
constexpr MemoryAddress NULL_ADDRESS
Sentinel value indicating an invalid/null memory address.
std::uint64_t Tick
Simulation clock tick counter.
std::uint32_t ProcessId
Unique identifier for a process.
std::uint32_t MemoryAddress
Represents a memory address (physical or virtual).
Process priority levels and the Priority struct.
ProcessState enum class and validated state transitions.
Composite priority descriptor for a process.
Aggregate holding virtual memory address mapping for a process.
std::uint32_t codeSize
Size of code segment (in blocks).
constexpr ProcessAddressInfo() noexcept=default
Default constructor.
std::uint32_t slot
Virtual memory slot index.
MemoryAddress codeStart
Start of code segment.
MemoryAddress virtualBase
Base address in virtual memory.
Aggregate holding process timing statistics.
Tick estimatedBurst
Predicted next CPU burst (for SPN/SRT).
Tick finishTime
Tick when the process entered Terminated.
constexpr ProcessTiming() noexcept=default
Default constructor.
Tick arrivalTime
Tick when the process was created.
Tick totalBlockedTime
Cumulative ticks spent in Blocked state.
Tick remainingBurst
Remaining ticks in current burst (for SRT).
Tick startTime
Tick when the process first entered Running.
Tick totalCpuTime
Cumulative ticks spent in Running state.
Tick totalWaitTime
Cumulative ticks spent in Ready state.
Tick lastStateChange
Tick of the most recent state transition.
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...