Skip to content
Snippets Groups Projects
Commit df7fe9d2 authored by Sergey Bozhko's avatar Sergey Bozhko :eyes:
Browse files

Add notion of non-preemptive schedule

parent 61ccb74b
No related branches found
No related tags found
No related merge requests found
...@@ -17,8 +17,8 @@ Section ExecutionOrder. ...@@ -17,8 +17,8 @@ Section ExecutionOrder.
(** Assume a schedule ... *) (** Assume a schedule ... *)
Variable sched: schedule PState. Variable sched: schedule PState.
(** in which the sequential jobs hypothesis holds. *) (** in which the sequential tasks hypothesis holds. *)
Hypothesis H_sequential_jobs: sequential_jobs sched. Hypothesis H_sequential_tasks: sequential_tasks sched.
(** A simple corollary of this hypothesis is that the scheduler (** A simple corollary of this hypothesis is that the scheduler
...@@ -32,7 +32,7 @@ Section ExecutionOrder. ...@@ -32,7 +32,7 @@ Section ExecutionOrder.
Proof. Proof.
intros ? ? t TSK NCOMPL SCHED. intros ? ? t TSK NCOMPL SCHED.
rewrite /same_task eq_sym in TSK. rewrite /same_task eq_sym in TSK.
have SEQ := H_sequential_jobs j2 j1 t TSK. have SEQ := H_sequential_tasks j2 j1 t TSK.
rewrite leqNgt; apply/negP; intros ARR. rewrite leqNgt; apply/negP; intros ARR.
move: NCOMPL => /negP NCOMPL; apply: NCOMPL. move: NCOMPL => /negP NCOMPL; apply: NCOMPL.
by apply SEQ. by apply SEQ.
......
From rt.restructuring.behavior Require Import all.
From rt.restructuring.model Require Import job.
From mathcomp Require Import ssreflect ssrbool eqtype ssrnat seq fintype bigop.
(** In this section we introduce the notion of a non-preemptive schedule. *)
Section NonpreemptiveSchedule.
(** Consider any type of jobs ... *)
Context {Job : JobType}.
Context `{JobArrival Job}.
Context `{JobCost Job}.
(** ... and any kind of processor state model. *)
Context {PState : Type}.
Context `{ProcessorState Job PState}.
(** Consider any uniprocessor schedule. *)
Variable sched : schedule PState.
(** We define a schedule to be nonpreemptive iff every job remains scheduled until completion. *)
Definition is_nonpreemptive_schedule :=
forall (j : Job) (t t' : instant),
t <= t' ->
scheduled_at sched j t ->
~~ completed_by sched j t' ->
scheduled_at sched j t'.
End NonpreemptiveSchedule.
\ No newline at end of file
...@@ -19,9 +19,9 @@ Section PropertyOfSequentiality. ...@@ -19,9 +19,9 @@ Section PropertyOfSequentiality.
(** Given a schedule ... *) (** Given a schedule ... *)
Variable sched: schedule PState. Variable sched: schedule PState.
(** ...we say that jobs (or, rather, tasks) are sequential if each task's jobs (** ...we say that tasks are sequential if each task's jobs
are executed in the order they arrived. *) are executed in the order they arrived. *)
Definition sequential_jobs := Definition sequential_tasks :=
forall (j1 j2: Job) (t: instant), forall (j1 j2: Job) (t: instant),
same_task j1 j2 -> same_task j1 j2 ->
job_arrival j1 < job_arrival j2 -> job_arrival j1 < job_arrival j2 ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment