cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tiago0297
Adventurer
Adventurer
821 Views
Registered: ‎03-22-2018

Will FreeRTOS gives me better processing time?

Jump to solution

Hi

I'm having a conceptual question concerning ZedBoard baremetal vs. ZedBoard with FreeRTOS implementations. I know that FreeRTOS provides me a set of functionalities that might be very useful for some applications, but lets say I didn't need those functionalities as my application, though very computationally demanding, uses the simple C/C++ operations.

So, there is any advantage chosing FreeRTOS over baremetal concerning processing time? The same application, that doesn't make use of any FreeRTOS functionality, will run faster in FreeRTOS?

0 Kudos
1 Solution

Accepted Solutions
richardbarry
Observer
Observer
784 Views
Registered: ‎04-26-2008

Like most 'will it' questions the answer is very dependent on the application.

First the cost:  An RTOS (such as FreeRTOS) is code that must be executed, so there is some overhead.  There is also a regular regular tick interrupt, but most applications have that anyway.

Then the benefit:  DEPENDING ON YOUR APPLICATION if you are able to convert a design that would otherwise use a state machine and super loop  and pollilng inputs, so a design that uses a lot of processing CPU cycles when there is nothing to do but check if there is something to do, into a completely event dirven design using the RTOS services, so a design that only uses CPU cycles when there is something to do, then you can free up a LOT of processing time, save a LOT of power (as you also can sleep when there is nothing to do), and squeeze a LOT more functionality onto the same processor. 

Of course, this is a massive oversimplification as most applications do not fit into one camp or the other but somewhere in between.

The book might help, althoug at the time of writing it is out of date...

Regards,
Richard.

+ http://www.FreeRTOS.org
The de facto standard, downloaded every 4.2 minutes during 2015.

+ http://www.FreeRTOS.org/plus
IoT, Trace, Certification, TCP/IP, FAT FS, Training, and more...

View solution in original post

3 Replies
drjohnsmith
Teacher
Teacher
797 Views
Registered: ‎07-09-2009
Is this a home work question ?
Any RTOS will add an overhead compared to bare metal,
so RTOS will always be worse than Bare Metal, if bare metal is done well.

But bare metal can be done real bad , real soon , whilst a RTOS keeps things moving, even with bad code.

(An RTOS is what saved the Apollo moon machine more than once)
<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
richardbarry
Observer
Observer
785 Views
Registered: ‎04-26-2008

Like most 'will it' questions the answer is very dependent on the application.

First the cost:  An RTOS (such as FreeRTOS) is code that must be executed, so there is some overhead.  There is also a regular regular tick interrupt, but most applications have that anyway.

Then the benefit:  DEPENDING ON YOUR APPLICATION if you are able to convert a design that would otherwise use a state machine and super loop  and pollilng inputs, so a design that uses a lot of processing CPU cycles when there is nothing to do but check if there is something to do, into a completely event dirven design using the RTOS services, so a design that only uses CPU cycles when there is something to do, then you can free up a LOT of processing time, save a LOT of power (as you also can sleep when there is nothing to do), and squeeze a LOT more functionality onto the same processor. 

Of course, this is a massive oversimplification as most applications do not fit into one camp or the other but somewhere in between.

The book might help, althoug at the time of writing it is out of date...

Regards,
Richard.

+ http://www.FreeRTOS.org
The de facto standard, downloaded every 4.2 minutes during 2015.

+ http://www.FreeRTOS.org/plus
IoT, Trace, Certification, TCP/IP, FAT FS, Training, and more...

View solution in original post

tiago0297
Adventurer
Adventurer
755 Views
Registered: ‎03-22-2018

Hi,

Thanks for the answers. I'm doing a personal project and wanted some insights abou the advantages between baremetal and freeRTOS, that's why I asked.

0 Kudos