Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROSA - Formally Proven Schedulability Analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lasse Blaauwbroek
PROSA - Formally Proven Schedulability Analysis
Commits
55cdcae7
Commit
55cdcae7
authored
5 years ago
by
Sergey Bozhko
Browse files
Options
Downloads
Patches
Plain Diff
Add notion of preemption time
parent
c3ff699d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
restructuring/model/preemption/preemption_time.v
+87
-0
87 additions, 0 deletions
restructuring/model/preemption/preemption_time.v
with
87 additions
and
0 deletions
restructuring/model/preemption/preemption_time.v
0 → 100644
+
87
−
0
View file @
55cdcae7
From
rt
.
util
Require
Import
all
.
From
rt
.
restructuring
.
behavior
Require
Import
all
.
From
rt
.
restructuring
.
analysis
.
basic_facts
Require
Import
ideal_schedule
.
From
rt
.
restructuring
.
model
Require
Import
job
task
.
From
rt
.
restructuring
.
model
Require
Import
processor
.
ideal
.
From
rt
.
restructuring
.
model
.
preemption
Require
Import
job
.
parameters
task
.
parameters
valid_model
.
From
mathcomp
Require
Import
ssreflect
ssrbool
ssrfun
eqtype
ssrnat
seq
fintype
bigop
.
(** * Preemption Time in Ideal Uni-Processor Model *)
(** In this section we define the notion of preemption _time_ for
ideal uni-processor model. *)
Section
PreemptionTime
.
(** Consider any type of tasks ... *)
Context
{
Task
:
TaskType
}
.
Context
`{
TaskCost
Task
}
.
Context
`{
TaskMaxNonpreemptiveSegment
Task
}
.
(** ... and any type of jobs associated with these tasks. *)
Context
{
Job
:
JobType
}
.
Context
`{
JobTask
Job
Task
}
.
Context
`{
JobArrival
Job
}
.
Context
`{
JobCost
Job
}
.
(** In addition, we assume the existence of a function mapping a
task to its maximal non-preemptive segment ... *)
Context
`{
TaskMaxNonpreemptiveSegment
Task
}
.
(** ... and the existence of a function mapping a job and
its progress to a boolean value saying whether this job is
preemptable at its current point of execution. *)
Context
`{
JobPreemptable
Job
}
.
(** Consider any arrival sequence with consistent arrivals. *)
Variable
arr_seq
:
arrival_sequence
Job
.
Hypothesis
H_arrival_times_are_consistent
:
consistent_arrival_times
arr_seq
.
(** Next, consider any ideal uniprocessor schedule of this arrival sequence ... *)
Variable
sched
:
schedule
(
ideal
.
processor_state
Job
)
.
Hypothesis
H_jobs_come_from_arrival_sequence
:
jobs_come_from_arrival_sequence
sched
arr_seq
.
(** We say that a time instant t is a preemption time iff the job
that is currently scheduled at t can be preempted (according to
the predicate). *)
Definition
preemption_time
(
t
:
instant
)
:=
if
sched
t
is
Some
j
then
job_preemptable
j
(
service
sched
j
t
)
else
true
.
(** In this section we prove a few basic properties of the preemption_time predicate. *)
Section
Lemmas
.
(** Consider a valid model with bounded nonpreemptive segments. *)
Hypothesis
H_model_with_bounded_nonpreemptive_segments
:
valid_model_with_bounded_nonpreemptive_segments
arr_seq
sched
.
(** Then, we show that time 0 is a preemption time. *)
Lemma
zero_is_pt
:
preemption_time
0
.
Proof
.
unfold
preemption_time
.
case
SCHED
:
(
sched
0
)
=>
[
j
|
];
last
by
done
.
move
:
(
SCHED
)
=>
/
eqP
;
rewrite
-
scheduled_at_def
;
move
=>
ARR
.
apply
H_jobs_come_from_arrival_sequence
in
ARR
.
rewrite
/
service
/
service_during
big_geq
;
last
by
done
.
destruct
H_model_with_bounded_nonpreemptive_segments
as
[
T1
T2
]
.
by
move
:
(
T1
j
ARR
)
=>
[
PP
_]
.
Qed
.
(** Also, we show that the first instant of execution is a preemption time. *)
Lemma
first_moment_is_pt
:
forall
j
prt
,
arrives_in
arr_seq
j
->
~~
scheduled_at
sched
j
prt
->
scheduled_at
sched
j
prt
.
+
1
->
preemption_time
prt
.
+
1
.
Proof
.
intros
s
pt
ARR
NSCHED
SCHED
.
unfold
preemption_time
.
move
:
(
SCHED
);
rewrite
scheduled_at_def
;
move
=>
/
eqP
SCHED2
;
rewrite
SCHED2
;
clear
SCHED2
.
destruct
H_model_with_bounded_nonpreemptive_segments
as
[
T1
T2
]
.
by
move
:
(
T1
s
ARR
)
=>
[_
[_
[_
P
]]];
apply
P
.
Qed
.
End
Lemmas
.
End
PreemptionTime
.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment