Pumpkin, Inc.

Pumpkin User Forums

Is Non-preemptive kernel fit for me?

If you have a general question or comment regarding Salvo, post it here.

Is Non-preemptive kernel fit for me?

Postby yanamjoshi » Thu Nov 11, 2010 2:28 am

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.

Posts: 1
Joined: Tue Nov 09, 2010 2:07 am

Re: Is Non-preemptive kernel fit for me?

Postby aek » Thu Nov 11, 2010 12:33 pm

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.
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest