Code covered by the BSD License  

Highlights from
Task Scheduler beta

image thumbnail

Task Scheduler beta

by

 

This GUI application makes possible to schedule a set of tasks using classical scheduling protocol.

CalculateGUI( handles )
function [ handles ] = CalculateGUI( handles )


handles.Options.Factor          = Calculation.Calcul_Factor(handles.Tasks_Param,handles.Options);
handles.Options.Step_Adviced    = Calculation.Calcul_Step_Adviced(handles.Tasks_Param,handles.Options);
handles.Options.Hyperperiod     = Calculation.Calcul_Hyperperiod(handles.Tasks_Param,handles.Options);
handles.Options.Utilization     = Calculation.Calcul_Utilization(handles.Tasks_Param,handles.Options);
handles.Options.Utilization_Max = Calculation.Calcul_Utilization_Max(handles.Tasks_Param,handles.Options);
handles.Options.Density         = Calculation.Calcul_Density(handles.Tasks_Param,handles.Options);
if(handles.Options.MaxTime == 0)
    handles.Options.MaxTime = handles.Options.Hyperperiod;
end
handles.Time=0:handles.Options.Step:handles.Options.MaxTime;
if handles.Sporadic_Param.Server==true
    handles.Sporadic_Param.Sporadic_Jobs=sortrows(handles.Sporadic_Param.Sporadic_Jobs,3);
end
switch handles.Options.schedule
    case{'RMS','DMS','EDF','LST'} % RMS = Rate Monotonic Schedule (lower period higher priority)      (Static scheduling-priority driven scheduling)
                                  % DMS = Deadline Monotonic Schedule (lower deadline higher priority)(Static scheduling-priority driven scheduling)
                                  % EDF = Earliest Deadline First Scheduling                          (Dynamic scheduling-priority driven scheduling)
                                  % LST = Least Slack handles.Time First Scheduling                           (Dynamic scheduling-priority driven scheduling)              
                                  
                                  
        handles.Tasks_Param.Tasks(:,3)=handles.Tasks_Param.Tasks(:,3)+2*handles.Options.CST;
        handles.Options.TDA=0;%Parameter in the function Display_Schedule. 
                              %If TDA=1 then we do not consider the phase
                              %of the tasks. 
                              %TDA=1 is used only with the handles.
                              %Time demand analysis                                                                                                                                                                                                   
        [handles.Trace handles.Budget_Tasks handles.Slack handles.Aperiodic_Param handles.Sporadic_Param]=...
                Calculation.Calcul_Schedule(handles.Time,handles.Tasks_Param,handles.Aperiodic_Param,handles.Sporadic_Param,handles.Options);
               
    case{'RRS','WRRS'} % RRS = Round-Robin Scheduling          (Static scheduling-handles.Time driven scheduling)
                       %WRRS = Weighted Round-Robin Scheduling (Static scheduling-handles.Time driven scheduling)

        handles.Aperiodic_Param.Server='None';
        handles.Aperiodic_Param.Aperiodic_Jobs=[0,0];
        handles.Aperiodic_Param.Server_Status=zeros(handles.Tasks_Param.Nb_Tasks,1);
        handles.Sporadic_Param.Server = false;
        handles.Sporadic_Param.Sporadic_Jobs = [0,0,0];
        handles.Sporadic_Param.Server_Status=zeros(handles.Tasks_Param.Nb_Tasks,1);
        [handles.Trace]= Calculation.Calcul_Schedule_WRRS(handles.Time,handles.Tasks_Param,handles.Weight_Tasks,handles.Options);

        handles.Trace.Trace_CST_Tasks = zeros(handles.Tasks_Param.Nb_Tasks,length(handles.Time)+handles.Options.CST/handles.Options.Step+1);
        handles.Aperiodic_Param.WhoIsAperiodic_Used   = zeros(1,length(handles.Time)+1); 
        handles.Sporadic_Param.WhoIsSporadic_Used     = zeros(1,length(handles.Time)+1);                                    
    
    otherwise
    disp('No schedule selected');
end



end

Contact us