Contur 2
Educational OS kernel simulator
Loading...
Searching...
No Matches
contur::KernelSnapshot Struct Reference

Lightweight kernel state snapshot for UI and diagnostics. More...

#include <i_kernel.h>

Public Attributes

Tick currentTick = 0
 Current simulation tick.
std::size_t processCount = 0
 Total number of managed processes.
std::size_t readyCount = 0
 Number of processes in the ready queue.
std::size_t blockedCount = 0
 Number of processes in blocked state.
std::vector< ProcessIdrunningPids
 Process IDs currently running across dispatcher/scheduler lanes.
std::vector< ProcessIdreadyQueue
 Ready queue PID snapshot.
std::vector< ProcessIdblockedQueue
 Blocked queue PID snapshot.
std::vector< std::vector< ProcessId > > perLaneReadyQueues
 Per-lane ready queue snapshots.
std::string policyName
 Active scheduling policy name.
std::vector< KernelProcessSnapshotprocesses
 Process rows for UI tables.
std::size_t totalVirtualSlots = 0
 Total number of virtual memory slots.
std::size_t freeVirtualSlots = 0
 Number of free virtual memory slots.
std::optional< std::size_t > totalFrames
 Optional total number of physical frames.
std::optional< std::size_t > freeFrames
 Optional free physical frame count.
std::vector< std::optional< ProcessId > > frameOwners
 Optional frame ownership map (one entry per frame).

Detailed Description

Lightweight kernel state snapshot for UI and diagnostics.

This snapshot is intentionally runtime-agnostic: it exposes kernel-facing process/memory/scheduler state.

Definition at line 91 of file i_kernel.h.

Member Data Documentation

◆ blockedCount

std::size_t contur::KernelSnapshot::blockedCount = 0

Number of processes in blocked state.

Definition at line 103 of file i_kernel.h.

◆ blockedQueue

std::vector<ProcessId> contur::KernelSnapshot::blockedQueue

Blocked queue PID snapshot.

Definition at line 112 of file i_kernel.h.

◆ currentTick

Tick contur::KernelSnapshot::currentTick = 0

Current simulation tick.

Definition at line 94 of file i_kernel.h.

◆ frameOwners

std::vector<std::optional<ProcessId> > contur::KernelSnapshot::frameOwners

Optional frame ownership map (one entry per frame).

Definition at line 136 of file i_kernel.h.

◆ freeFrames

std::optional<std::size_t> contur::KernelSnapshot::freeFrames

Optional free physical frame count.

Definition at line 133 of file i_kernel.h.

◆ freeVirtualSlots

std::size_t contur::KernelSnapshot::freeVirtualSlots = 0

Number of free virtual memory slots.

Definition at line 127 of file i_kernel.h.

◆ perLaneReadyQueues

std::vector<std::vector<ProcessId> > contur::KernelSnapshot::perLaneReadyQueues

Per-lane ready queue snapshots.

Definition at line 115 of file i_kernel.h.

◆ policyName

std::string contur::KernelSnapshot::policyName

Active scheduling policy name.

Definition at line 118 of file i_kernel.h.

◆ processCount

std::size_t contur::KernelSnapshot::processCount = 0

Total number of managed processes.

Definition at line 97 of file i_kernel.h.

◆ processes

std::vector<KernelProcessSnapshot> contur::KernelSnapshot::processes

Process rows for UI tables.

Definition at line 121 of file i_kernel.h.

◆ readyCount

std::size_t contur::KernelSnapshot::readyCount = 0

Number of processes in the ready queue.

Definition at line 100 of file i_kernel.h.

◆ readyQueue

std::vector<ProcessId> contur::KernelSnapshot::readyQueue

Ready queue PID snapshot.

Definition at line 109 of file i_kernel.h.

◆ runningPids

std::vector<ProcessId> contur::KernelSnapshot::runningPids

Process IDs currently running across dispatcher/scheduler lanes.

Definition at line 106 of file i_kernel.h.

◆ totalFrames

std::optional<std::size_t> contur::KernelSnapshot::totalFrames

Optional total number of physical frames.

Definition at line 130 of file i_kernel.h.

◆ totalVirtualSlots

std::size_t contur::KernelSnapshot::totalVirtualSlots = 0

Total number of virtual memory slots.

Definition at line 124 of file i_kernel.h.


The documentation for this struct was generated from the following file: