cstr/tp4-obj3-meens/scheduler_data.ept
2025-05-01 01:27:37 +02:00

30 lines
615 B
Plaintext

const ntasks : int = 2
const int_max : int = 10000000
type task_attributes = {
period : int ;
capacity : int ;
deadline : int ;
first_start : int
}
type task_state = Running | Ready | Waiting
type task_status = {
was_running : int;
status : task_state ;
current_deadline : int ;
left : int
}
type scheduler_state = {
current_date : int ;
tasks : task_status^ntasks
}
type select_acc = { tid : int; swas_running: int; sdeadline : int }
const tasks : task_attributes^ntasks = [
{ period=5; capacity=2; deadline=5; first_start=0 },
{ period=7; capacity=4; deadline=7; first_start=3 }
]