There are few results that had been obtained to testing the performance of the RTOS.

Compare the relationship between instruction cycle used for initialization with different optimization level in different type of RTOS

GRAPH 1

For initialization OS, FreeRTOS is much more higher than Contiki. The is due to there are a lot of instruction cycle spend to create the task in TCB.There are three task need to be created in the FreeRTOS multiple task program. FreeRTOS needs 1000 plus instruction cycle spend to create each task. For Contiki OS, it do not have this problem because Contiki OS is using protothread to do its task. In addition, the optimizatioin level 3 is the best option for compiling. The GCC manual had stated that -O3 is turn on optimization specify by -O2 and addition few more options.

 

Compare the relationship between instruction cycle used for context switching with different optimization level in different type of RTOS

GRAPH 2

The instruction cycle used for context switching in FreeRTOS is slightly higher than Contiki OS. FreeRTOS require to do the save and restore context function during context switching. There are 31 general register used in RISC-V. So it had spend about 60 cycles to save and restore data in register. For Contiki OS, it is using protothread process to execute its task. The protothread is using only one stack to do the task switching.

 

Compare the relationship between instruction cycle used for initialization with different optimization level in different type Contiki OS scenario

GRAPH 3

Contiki OS spend almost the same instruction cycle to initialize the OS in single task and multiple task program. But for the Process Wait Event, it need more instruction cycle do initialization. This is because Process Wait Event need to go through the process thread first before, task process thread can be post and execute in the OS.

 

Compare the relationship between instruction cycle used for context switching with different optimization level in different type Contiki OS scenario

GRAPH 4

The graph shows that the multiple task needed more cycle to do the context switching by comparing to use Process Wait Event in the program. This is because Process Wait Event scenario using the process post method to post the event and call the process.

 

 


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.