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
57d356ee
Commit
57d356ee
authored
5 years ago
by
Sergey Bozhko
Browse files
Options
Downloads
Patches
Plain Diff
Add preemption model
parent
e554548b
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_model.v
+76
-0
76 additions, 0 deletions
restructuring/model/preemption/preemption_model.v
with
76 additions
and
0 deletions
restructuring/model/preemption/preemption_model.v
0 → 100644
+
76
−
0
View file @
57d356ee
From
rt
.
restructuring
.
behavior
Require
Import
job
schedule
.
From
rt
.
restructuring
.
model
Require
Import
job
task
.
From
mathcomp
Require
Import
ssreflect
ssrbool
ssrfun
eqtype
ssrnat
seq
fintype
bigop
.
(** * Platform with limited preemptions *)
(** Since the notion of preemption points is based on an user-provided
predicate (variable job_can_be_preempted), it does not guarantee that
the scheduler will enforce correct behavior. For that, we must
define additional predicates. *)
Section
ValidPreemptionModel
.
(* Consider any type of tasks ... *)
Context
{
Task
:
TaskType
}
.
Context
`{
TaskCost
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
maping jobs to theirs preemption points ... *)
Context
`{
JobPreemptable
Job
}
.
(* Consider any kind of processor state model, ... *)
Context
{
PState
:
Type
}
.
Context
`{
ProcessorState
Job
PState
}
.
(* ... any job arrival sequence, ... *)
Variable
arr_seq
:
arrival_sequence
Job
.
(* ... and any given schedule. *)
Variable
sched
:
schedule
PState
.
(* For simplicity, let's define some local names. *)
Let
job_pending
:=
pending
sched
.
Let
job_completed_by
:=
completed_by
sched
.
Let
job_scheduled_at
:=
scheduled_at
sched
.
(* We require that a job has to be executed at least one time instant
in order to reach a nonpreemptive segment. In other words, a job
must start execution to become non-preemptive. *)
Definition
job_cannot_become_nonpreemptive_before_execution
(
j
:
Job
)
:=
job_preemptable
j
0
.
(* And vice versa, a job cannot remain non-preemptive after its completion. *)
Definition
job_cannot_be_nonpreemptive_after_completion
(
j
:
Job
)
:=
job_preemptable
j
(
job_cost
j
)
.
(* Next, if a job j is not preemptive at some time instant t,
then j must be scheduled at time t. *)
Definition
not_preemptive_implies_scheduled
(
j
:
Job
)
:=
forall
t
,
~~
job_preemptable
j
(
service
sched
j
t
)
->
job_scheduled_at
j
t
.
(* A job can start its execution only from a preemption point. *)
Definition
execution_starts_with_preemption_point
(
j
:
Job
)
:=
forall
prt
,
~~
job_scheduled_at
j
prt
->
job_scheduled_at
j
prt
.
+
1
->
job_preemptable
j
(
service
sched
j
prt
.
+
1
)
.
(* We say that a preemption model is a valid preemption model if
all the assumptions given above are satisfied for any job. *)
Definition
valid_preemption_model
:=
forall
j
,
arrives_in
arr_seq
j
->
job_cannot_become_nonpreemptive_before_execution
j
/\
job_cannot_be_nonpreemptive_after_completion
j
/\
not_preemptive_implies_scheduled
j
/\
execution_starts_with_preemption_point
j
.
End
ValidPreemptionModel
.
\ No newline at end of file
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