Measuring Erika OS Api runtime
Posted: Mon Mar 14, 2016 11:51 am
Hi,
I am Erjola Lalo and I work at Timing Architects. My colleague Felix Martin recommended me that I write here for any question I might have regarding Erika OS.
I currently am doing some research on the field of scheduling. At this phase I am focused on cooperative scheduling, where I intent to provide methodologies/heuristics/algorithms how to configure/design in a "near-optimal" way the parameters as task groups and schedule points for cooperative scheduling in order to reduce preemption overheads and maintain the schedulability.
I'm using in my case studies the ERIKA OS and I intend to measure the run-time it takes for OS API such as: Activate Task, Terminate, Schedule API, context switching, etc. I need this information for creating an OS model with overheads which I can use during system simulation (in a model based approach) in order to see how the influence of overheads is in the system. The measuring step of overhead and target verification of the scheduling design is a step i will continuously do as well in the future phases of my research regarding multi-core scheduling.
For the measurements I am using Lauterbach Trace, where am using the approach of setting markers for the OS APIs and trace them as well. In this way I can get the information when the API is started and terminated, and get this way the run-time. For certain API: Activate, Terminate, Set/wait/Clear Event I have already successfully retrieved some run-times, but for some others I haven't found yet the API name. I have observed the source code of Erika OS, but at some parts is confusing for me :).
My questions are as following:
1- How is the cooperative scheduling correctly configured in oil.config file? I have for instance 2 cooperative tasks (i.e. belonging in the same cooperative group). The lower priority task in the group is "preempted" only when the Schedule() Api is called. Should i create one Internal resource (representing this task group) and assign to these 2 tasks in their configuration e.g. RESOURCE = RES_1; and set their schedule to SCHEDULE = NON;? As I have seen during my measurements, the results were not correctly. Therefore, most probably I am doing something wrong.
2- What is the Api for the Request/Release of the semaphore or splinlock?
3- Is there any OS System Call in the context of which the OS API are executed? This is very beneficial to have an correct/importable trace in TA Inspector of TA Tool Suite.
4- The measurements for the context switching is so far the most complicated to trace for me. I have seen many different Api activated in different conditions e.g. EE_rq2stk_exchange, EE_oo_run_next_task, EE_std_change_context, EE_tc_task_save, EE_tc_stack_restore, etc. For my application case would have been the best if I could trace and measure separately in a triple the context save, rescheduling and context load during a preemption due to higher priority task/ISR or due to context switching when the schedule() is called. What are the exact context switching APIs I should measure and what are the specific scenario calls of them?
Thank you in advance! Apologizes for so many questions and long post:).
Looking forward to your reply.
Kind Regards,
Erjola Lalo
I am Erjola Lalo and I work at Timing Architects. My colleague Felix Martin recommended me that I write here for any question I might have regarding Erika OS.
I currently am doing some research on the field of scheduling. At this phase I am focused on cooperative scheduling, where I intent to provide methodologies/heuristics/algorithms how to configure/design in a "near-optimal" way the parameters as task groups and schedule points for cooperative scheduling in order to reduce preemption overheads and maintain the schedulability.
I'm using in my case studies the ERIKA OS and I intend to measure the run-time it takes for OS API such as: Activate Task, Terminate, Schedule API, context switching, etc. I need this information for creating an OS model with overheads which I can use during system simulation (in a model based approach) in order to see how the influence of overheads is in the system. The measuring step of overhead and target verification of the scheduling design is a step i will continuously do as well in the future phases of my research regarding multi-core scheduling.
For the measurements I am using Lauterbach Trace, where am using the approach of setting markers for the OS APIs and trace them as well. In this way I can get the information when the API is started and terminated, and get this way the run-time. For certain API: Activate, Terminate, Set/wait/Clear Event I have already successfully retrieved some run-times, but for some others I haven't found yet the API name. I have observed the source code of Erika OS, but at some parts is confusing for me :).
My questions are as following:
1- How is the cooperative scheduling correctly configured in oil.config file? I have for instance 2 cooperative tasks (i.e. belonging in the same cooperative group). The lower priority task in the group is "preempted" only when the Schedule() Api is called. Should i create one Internal resource (representing this task group) and assign to these 2 tasks in their configuration e.g. RESOURCE = RES_1; and set their schedule to SCHEDULE = NON;? As I have seen during my measurements, the results were not correctly. Therefore, most probably I am doing something wrong.
2- What is the Api for the Request/Release of the semaphore or splinlock?
3- Is there any OS System Call in the context of which the OS API are executed? This is very beneficial to have an correct/importable trace in TA Inspector of TA Tool Suite.
4- The measurements for the context switching is so far the most complicated to trace for me. I have seen many different Api activated in different conditions e.g. EE_rq2stk_exchange, EE_oo_run_next_task, EE_std_change_context, EE_tc_task_save, EE_tc_stack_restore, etc. For my application case would have been the best if I could trace and measure separately in a triple the context save, rescheduling and context load during a preemption due to higher priority task/ISR or due to context switching when the schedule() is called. What are the exact context switching APIs I should measure and what are the specific scenario calls of them?
Thank you in advance! Apologizes for so many questions and long post:).
Looking forward to your reply.
Kind Regards,
Erjola Lalo