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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
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
RT-PROOFS
PROSA - Formally Proven Schedulability Analysis
Commits
6739de4f
Commit
6739de4f
authored
4 years ago
by
Marco Perronet
Committed by
Björn Brandenburg
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add function to generate uniprocessor schedules
parent
953b38b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!96
Ideal Uniprocessor Scheduler Implementation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
implementation/definitions/scheduler.v
+64
-0
64 additions, 0 deletions
implementation/definitions/scheduler.v
with
64 additions
and
0 deletions
implementation/definitions/scheduler.v
0 → 100644
+
64
−
0
View file @
6739de4f
Require
Export
prosa
.
behavior
.
all
.
Require
Export
prosa
.
model
.
priority
.
classes
.
Require
Export
prosa
.
util
.
supremum
.
Require
Export
prosa
.
model
.
preemption
.
parameter
.
Require
Export
prosa
.
model
.
schedule
.
work_conserving
.
Require
Export
prosa
.
model
.
schedule
.
priority_driven
.
Require
Export
prosa
.
model
.
processor
.
ideal
.
Section
UniprocessorSchedule
.
Context
{
Job
:
JobType
}
.
Context
`{
JobCost
Job
}
.
Context
`{
JobArrival
Job
}
.
Context
`{
JobPreemptable
Job
}
.
Context
`{
JLDP_policy
Job
}
.
Context
{
Task
:
eqType
}
.
Context
`{
JobReady
Job
(
ideal
.
processor_state
Job
)}
.
Variable
arr_seq
:
arrival_sequence
Job
.
Section
JobAllocation
.
Variable
sched_prefix
:
schedule
(
ideal
.
processor_state
Job
)
.
Definition
jobs_backlogged_at
(
t
:
instant
):
seq
Job
:=
[
seq
j
<-
arrivals_up_to
arr_seq
t
|
backlogged
sched_prefix
j
t
]
.
Definition
prev_job_nonpreemptive
(
t
:
instant
)
:
bool
:=
match
t
with
|
0
=>
false
|
S
t'
=>
if
sched_prefix
t'
is
Some
j
then
~~
job_preemptable
j
(
service
sched_prefix
j
t
)
else
false
end
.
(** Given an arrival sequence, a prefix schedule [[0, t-1]], computes
which job has to be scheduled at [t] **)
Definition
allocation_at
(
t
:
instant
):
option
Job
:=
if
prev_job_nonpreemptive
t
then
sched_prefix
t
.
-1
else
supremum
(
hep_job_at
t
)
(
jobs_backlogged_at
t
)
.
End
JobAllocation
.
Definition
empty_schedule
:
schedule
(
ideal
.
processor_state
Job
)
:=
fun
_
=>
None
.
(** Given an arrival sequence, computes a schedule up to time [h] **)
Fixpoint
schedule_up_to
(
h
:
instant
)
:
schedule
(
ideal
.
processor_state
Job
)
:=
let
prefix
:=
if
h
is
S
h'
then
schedule_up_to
h'
else
empty_schedule
in
fun
t
=>
if
t
==
h
then
allocation_at
prefix
t
else
prefix
t
.
Definition
uni_schedule
(
t
:
instant
)
:
ideal
.
processor_state
Job
:=
schedule_up_to
t
t
.
End
UniprocessorSchedule
.
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