LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::ldes::engine::Job Struct Reference

A job held by a station. More...

#include <line/solvers/ldes/ldes_station.h>

Public Attributes

std::size_t cls = 0
int priority = 0
double t_arr = 0.0
 arrival instant at this station
double region_wait = 0.0
 Time spent parked outside a WAITQ region before entering this station.
double t_sys = 0.0
 instant the current passage started
int sys_cls = -1
 The class the current passage STARTED in (the class the Source emitted), -1 when unset.
double service = 0.0
 the sampled requirement, drawn at arrival
double remaining = 0.0
 residual work; equals service before any preemption
double elapsed = 0.0
 attained service across all its service intervals
double rank = 0.0
 SIRO's random key, drawn at arrival.
double deadline = std::numeric_limits<double>::infinity()
 EDD/EDF key.
double vft = 0.0
 FSP's virtual finish time, recomputed on demand.
std::uint64_t id = 0
 Identity of this job while it waits, so a reneging timer can find it.
std::uint64_t parent = 0
 The fork synchronization this job is a sibling of, 0 when it is not one.
int attempts = 0
 How many times this job has already retried from an orbit.
std::uint64_t call = 0
 The SYNCHRONOUS CALL this job belongs to, 0 when it belongs to none.
std::uint64_t tag = 0
 The generation its currently scheduled completion was pushed under.
std::int64_t ext = -1
 options.init_jobs: the caller's tag for this job, -1 when untagged.
bool preset = false
 An init_jobs residual: service is the work still owed, not a fresh draw.
double due = 0.0
 A Delay job's completion instant, read by the track_jobs export.
double order_time = -1.0
 Round robin: the instant a job whose quantum expired rejoined the waiting room, which is its buffer order key from then on (the TAIL of the queue); negative until then, when the key is t_arr.

Detailed Description

A job held by a station.

service, remaining and elapsed are the three quantities the size-based orders need and are NOT redundant. service is the ORIGINAL requirement PSJF orders by; remaining is the residual SRPT and LRPT order by, equal to service until the job is first preempted; elapsed is the attained service FB and SETF order by. The reference keeps them in a side table (preemptedJobHistory, keyed by the arrival instants) because its wait queue holds a plain Customer; carrying them on the job is the same information without the lookup, and without the key collision two jobs arriving at the same instant would produce.

Definition at line 66 of file ldes_station.h.

Member Data Documentation

◆ attempts

int line::ldes::engine::Job::attempts = 0

How many times this job has already retried from an orbit.

It rides on the job because maxAttempts bounds the retries of ONE job, not of the station: a per-station counter would cap the orbit's total traffic instead and would let a job retry forever as long as others gave up.

Definition at line 116 of file ldes_station.h.

◆ call

std::uint64_t line::ldes::engine::Job::call = 0

The SYNCHRONOUS CALL this job belongs to, 0 when it belongs to none.

It rides on the job because the call is answered by a REPLY that comes back from somewhere else entirely: this identity is the only link between that reply and the server still held for it, and id cannot serve as one, being reassigned at every admission.

Definition at line 125 of file ldes_station.h.

◆ cls

std::size_t line::ldes::engine::Job::cls = 0

Definition at line 67 of file ldes_station.h.

Referenced by line::ldes::engine::ps_shares().

◆ deadline

double line::ldes::engine::Job::deadline = std::numeric_limits<double>::infinity()

EDD/EDF key.

Definition at line 89 of file ldes_station.h.

Referenced by line::ldes::engine::WaitCmp::operator()(), and line::ldes::engine::preemption_victim().

◆ due

double line::ldes::engine::Job::due = 0.0

A Delay job's completion instant, read by the track_jobs export.

Definition at line 144 of file ldes_station.h.

◆ elapsed

double line::ldes::engine::Job::elapsed = 0.0

attained service across all its service intervals

Definition at line 87 of file ldes_station.h.

Referenced by line::ldes::engine::WaitCmp::operator()(), and line::ldes::engine::preemption_victim().

◆ ext

std::int64_t line::ldes::engine::Job::ext = -1

options.init_jobs: the caller's tag for this job, -1 when untagged.

It does not survive a hop, because the next station receives a new Job, so jobDepartures records the departure from the station it was placed at.

Definition at line 140 of file ldes_station.h.

◆ id

std::uint64_t line::ldes::engine::Job::id = 0

Identity of this job while it waits, so a reneging timer can find it.

A timer names the job it was armed for, and the job may by then have entered service, been preempted back into the queue, or already left. An identity is the only thing that survives all three; the arrival instant cannot serve as one, because two jobs admitted at the same instant – routine on a closed model placed at t=0 – would share it.

Definition at line 100 of file ldes_station.h.

◆ order_time

double line::ldes::engine::Job::order_time = -1.0

Round robin: the instant a job whose quantum expired rejoined the waiting room, which is its buffer order key from then on (the TAIL of the queue); negative until then, when the key is t_arr.

It is NOT t_arr itself, which the response time is measured from, as Solver_ssj keeps the arrival instant and moves only orderTime.

Definition at line 152 of file ldes_station.h.

Referenced by line::ldes::engine::WaitCmp::operator()().

◆ parent

std::uint64_t line::ldes::engine::Job::parent = 0

The fork synchronization this job is a sibling of, 0 when it is not one.

It rides on the JOB and not on the station because siblings of different parents interleave freely at every station between the Fork and the Join.

Definition at line 107 of file ldes_station.h.

◆ preset

bool line::ldes::engine::Job::preset = false

An init_jobs residual: service is the work still owed, not a fresh draw.

Definition at line 142 of file ldes_station.h.

◆ priority

int line::ldes::engine::Job::priority = 0

◆ rank

double line::ldes::engine::Job::rank = 0.0

SIRO's random key, drawn at arrival.

Definition at line 88 of file ldes_station.h.

Referenced by line::ldes::engine::WaitCmp::operator()().

◆ region_wait

double line::ldes::engine::Job::region_wait = 0.0

Time spent parked outside a WAITQ region before entering this station.

It is part of the visit's response time (JMT and Solver_ssj keep the original arrival instant) but not of t_arr, which orders the buffer by the RELEASE instant, as the Java engine's orderTime does.

Definition at line 75 of file ldes_station.h.

◆ remaining

double line::ldes::engine::Job::remaining = 0.0

residual work; equals service before any preemption

Definition at line 86 of file ldes_station.h.

Referenced by line::ldes::engine::WaitCmp::operator()(), and line::ldes::engine::preemption_victim().

◆ service

double line::ldes::engine::Job::service = 0.0

the sampled requirement, drawn at arrival

Definition at line 85 of file ldes_station.h.

Referenced by line::ldes::engine::WaitCmp::operator()(), and line::ldes::engine::preemption_victim().

◆ sys_cls

int line::ldes::engine::Job::sys_cls = -1

The class the current passage STARTED in (the class the Source emitted), -1 when unset.

A system completion is credited to it, not to the class the job leaves in: MATLAB defines a class's XN as its rate through its reference station, which for an open class is the Source, so a chain that switches A -> B credits A. It is copied wherever t_sys is.

Definition at line 84 of file ldes_station.h.

◆ t_arr

double line::ldes::engine::Job::t_arr = 0.0

arrival instant at this station

Definition at line 69 of file ldes_station.h.

Referenced by line::ldes::engine::WaitCmp::operator()().

◆ t_sys

double line::ldes::engine::Job::t_sys = 0.0

instant the current passage started

Definition at line 76 of file ldes_station.h.

◆ tag

std::uint64_t line::ldes::engine::Job::tag = 0

The generation its currently scheduled completion was pushed under.

Only an INFINITE SERVER needs it: a buffered station keeps the generation on the slot (server_tag) and a sharing one on its PsJob, but a Delay holds neither, so a think time re-timed by a global dependence has no other way to invalidate the departure already in the event list.

Definition at line 134 of file ldes_station.h.

◆ vft

double line::ldes::engine::Job::vft = 0.0

FSP's virtual finish time, recomputed on demand.

Definition at line 90 of file ldes_station.h.

Referenced by line::ldes::engine::WaitCmp::operator()().


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