cstr/tp4-obj2-meens/scheduler_data.ept
2025-04-29 18:38:04 +02:00

29 lines
567 B
Plaintext

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