Skip to content
Snippets Groups Projects
Commit 96f52df2 authored by Björn Brandenburg's avatar Björn Brandenburg
Browse files

introduce 'work' as unit of service received or needed

parent 74db501b
No related branches found
No related tags found
No related merge requests found
...@@ -4,8 +4,12 @@ From mathcomp Require Export eqtype ssrnat. ...@@ -4,8 +4,12 @@ From mathcomp Require Export eqtype ssrnat.
(* Throughout the library we assume that jobs have decidable equality. *) (* Throughout the library we assume that jobs have decidable equality. *)
Definition JobType := eqType. Definition JobType := eqType.
(* We define 'work' to denote the unit of service received or needed. In a
real system, this corresponds to the number of processor cycles. *)
Definition work := nat.
(* Definition of a generic type of parameter relating jobs to a discrete cost. *) (* Definition of a generic type of parameter relating jobs to a discrete cost. *)
Class JobCost (Job : JobType) := job_cost : Job -> duration. Class JobCost (Job : JobType) := job_cost : Job -> work.
(* Definition of a generic type of parameter for job_arrival. *) (* Definition of a generic type of parameter for job_arrival. *)
Class JobArrival (Job : JobType) := job_arrival : Job -> instant. Class JobArrival (Job : JobType) := job_arrival : Job -> instant.
......
...@@ -12,7 +12,7 @@ Class ProcessorState (Job : JobType) (State : Type) := ...@@ -12,7 +12,7 @@ Class ProcessorState (Job : JobType) (State : Type) :=
scheduled_in: Job -> State -> bool; scheduled_in: Job -> State -> bool;
(* For a given processor state, the [service_in] function determines how much (* For a given processor state, the [service_in] function determines how much
service a given job receives in that state. *) service a given job receives in that state. *)
service_in: Job -> State -> nat; service_in: Job -> State -> work;
(* For a given processor state, a job does not receive service if it is not scheduled (* For a given processor state, a job does not receive service if it is not scheduled
in that state *) in that state *)
service_implies_scheduled : service_implies_scheduled :
......
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