Page 1 of 1

Is Non-preemptive kernel fit for me?

PostPosted: Thu Nov 11, 2010 2:28 am
by yanamjoshi
Hi there

In my application I've an algorithm that runs for slightly less than a second. All other logic is built in interrupts and in timer based switching.

If I want to convert my application to Salvo, will the non-preemption work in my case? Since the task with one second will never relinquish before deadlines of serial communication, I2C, SPI etc.

Thanks
~Y

Re: Is Non-preemptive kernel fit for me?

PostPosted: Thu Nov 11, 2010 12:33 pm
by aek
You say that you already have an application running ... therefore, the results will be the same with Salvo ... your "one-second" algorithm will run as a task, and all your pre-existing stuff will run at the interrupt level.

Since ISRs in a Salvo application do not require any hooks (unlike those in preemptive RTOS applications), your ISR performance will be the same.

If at some point you choose to communicate between the ISRs and the task(s), then Salvo's interrupt hook will have to disable those interrupts with ISRs that call Salvo services. But that's no different from what you have right now, if you are doing ISR-to-algorithm information passing, as that will require interrupt control over critical sections (to protect shared resources, etc.).

You can try it with Salvo Lite, especially since you have only one task and Salvo 4 Lite supports four tasks.