Library rt.restructuring.model.processor.ideal
First let us define the notion of an ideal schedule state, as done in Prosa
so far: either a job is scheduled or the system is idle.
Section State.
Variable Job: JobType.
Definition processor_state := option Job.
Global Program Instance pstate_instance : ProcessorState Job (option Job) :=
{
As this is a uniprocessor model, cores are implicitly defined
as the unit type containing a single element as a placeholder.
scheduled_on j s (_ : unit) := s == Some j;
service_in j s := s == Some j;
}.
Next Obligation.
rewrite /nat_of_bool.
case: ifP H=>//=_/existsP[].
by ∃ tt.
Defined.
End State.
service_in j s := s == Some j;
}.
Next Obligation.
rewrite /nat_of_bool.
case: ifP H=>//=_/existsP[].
by ∃ tt.
Defined.
End State.
In this section we define the notion of idleness for ideal uni-processor.
Consider any type of job.
Consider any arrival sequence...
... and any ideal uniprocessor schedule of this arrival sequence.
We say that the processor is idle at time t iff there is no job being scheduled.