Nucleus OS

What does generally happen in such a scenario? FWIW I'm using Nucleus.

Suppose there are two Task in our System A & B. A has a higher priority than B and both are preemptable.

A is waiting for an Event while B is executing in function() { while (1) { /* Do Something */ } }

  1. Can A preempt B in middle of a function call? If it can ...
  2. When A gets the event, B moves to suspended state or ready queue?
  3. If it is moved to suspended state then how does it start to execute once A is has suspended
  4. If it is moved to ready queue, then it's state is READY? So it means that tasks can go from RUNNING to READY in Nucleus?

Thanks

Reply to
xrandomhacker
Loading thread data ...

I am not familiar with Nucleus but will provide a generic answer...

As you say, the tasks are preemptable, so yes.

Ready. It is still able to run. It just cannot run while a higher priority task is running.

That is what the scheduler is for. The task does not need to know about it, the scheduler will start it when it is the highest priority task that is available to execute.

Yes - as in most if not all systems.

You need to know these basics before you can use Nucleus to design a system.

--
Regards,
Richard.

+ http://www.FreeRTOS.org
A free real time kernel for 8, 16 and 32bit systems.

+ http://www.SafeRTOS.com
An IEC 61508 compliant real time kernel for safety related systems.
Reply to
FreeRTOS.org

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.