This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294NCPDT: Execution Analysis Interpretation

Part Number: TM4C1294NCPDT

Hi ,

I have a execution analysis graph for multiple tasks. 

- I would like to know how the BIOS scheduler works here, due to what reasons the 

 the task scheduling changes. Can we get some more details for the BIOS scheduler.

- Also I have marked a circle in red in the attachment, I understand that the task is preempted here

  because priorities are involved. Just want to make sure my understanding is correct .

Requesting to throw some more light on above two  points mentioned.

Regards,

Sanket

  • Hi,

     Yes, you are correct that BIOS is based on priority when scheduling the next task to run. Lower priority task will be preempted by higher priority task. 

    Refer to section 3.2.5 of SYS BIOS kernel user's guide on preemption and scheduling.

    https://www.ti.com/lit/pdf/spruex3

    Please go to section 3.3 of System Analyzer user's guide for explanation on UIA execution graph. 

    https://www.ti.com/lit/pdf/spruh43

  • Hi Charles,

    Thank you for the quick response which was quite helpful.

    In the attached image, I have marked some tasks in Red , Green

    and Yellow using notations T1, T2 and T3 in a blue circle

    The priorities of the tasks are T2 > T3 > T1.

    As seen in the image, T2 is not completed and the task T3 is scheduled by BIOS scheduler. T3 is also 

    not completed and T1 is scheduled.

    What could be the possible reasons for this behavior, the reasons for such scheduling of the tasks.

    Regards,

    Sanket

  • What is the priority level you set for each task; T1, T2 and T3? Please note that the higher the priority number assigned to a task the higher priority it is. For example, a priority level 15 will be higher than priority level 7. Priority level 0 is the lowest. 

    For Swis and Tasks, higher numbers equal higher priorities. That is, zero is the lowest priority level within
    the set of Swis and within the set of Tasks.
    The background Idle Loop is the thread with the lowest priority of all. It runs in a loop when the CPU is
    not busy running another thread. When tasks are enabled, the Idle Loop is implemented as the only task
    running at priority 0. When tasks are disabled, the Idle Loop is fallen into after the application's "main()"
    function is called.

  • Hi,

    Thank you for the immediate response.

    Among the tasks T1, T2, T3, the task T2 has the highest priority level among the 3 tasks. 

    The task T3 has priority greater than T1. (T2 > T3 > T1 priorities)

    I would like to know the reason for why Task T3 is scheduled before Task 2 has 

    completed its work. 

    Similarly why Task T1 is scheduled before Task T3 has completed its work. 

    Attaching the image for reference.

    Regards,

    Sanket

  • Hi,

      I cannot answer all of your questions as I'm not the developer and expert in how RTOS kernel schedules the tasks and handle context switching. Below are described in user's guide for circumstances under which higher priority tasked may be switched out. See if they apply to you. Especially bullet 4 and 3.