Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - QNX SCHED_IDLE ?: (6 Items)
   
QNX SCHED_IDLE ?  
Hi all,

I am trying to run some tasks on a system "in the background", that is, not stealing any cycles while the system is busy
, only running when the CPU would be IDLE otherwise.

Is there some way to get a similar behaviour in QNX like for SCHED_IDLE in Linux?

Maybe this could be recreated with some other scheduling class?

Thanks a lot for any advice,

Claudio
Re: QNX SCHED_IDLE ?  
In Qnx You have up to 256 priority levels: just assign a low priority  (Es.1..10) to
your 'background' processes. 0 is the priority of idle process.
Mario
Re: QNX SCHED_IDLE ?  
Running at priority 1 will do what you want logically, but expect the target to run "much hotter".  

The "idle thread" is not truly a thread - idle state puts the processor in a "wait for interrupt" mode which is requires
 relatively little power.  The time spent in that mode is charged to idle thread 0.
Re: QNX SCHED_IDLE ?  
You may want to look at the InterruptHookIdle function.

Regards,
Al
Re: QNX SCHED_IDLE ?  
Please don't ;-)
That function is for power management. It is called in a very
restrictive environment and needs to adhere to a strict protocol
(similar to an ISR, but with even more ways of screwing things up).
What Claudio is looking for, as far as I can tell, is a way to run some
tasks when nothing else is scheduled. A priority 1 thread in a regular
process will do just fine...

--Elad

On Tue, 2018-09-11 at 13:55 -0400, Albrecht Uhlmann wrote:
> You may want to look at the InterruptHookIdle function.
> 
> Regards,
> Al
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post119086
> To cancel your subscription to this discussion, please e-mail ostech-
> core_os-unsubscribe@community.qnx.com
Re: QNX SCHED_IDLE ?  
thanks all for your comments,

I will do some experiments based on your suggestions  :-)