Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - some scheduler infos: (10 Items)
   
some scheduler infos  
hi guys,
we are some postgraduate students of computer engineering from university of patras, Greece.
We would like to have some basic infos (till now at least) about the neutrino's scheduler.
Our main purpose is to deal with some scheduling policies and implementation with the neutrino as a referrence rtos, but
 unfortunately this is our first effort regarding real time operating systems and neutrino specifficaly.
Could you please give us a hint us where in the source the neutrino implements it's scheduling policies?
Sorry for the general queries but we need some tips for start.
At this point we are a little bit confused with the documentation.
Hope i've posted at the right section.

thank you 
OSYL team
Re: some scheduler infos  
You might find the "scheduling algorithms" section of the QNX system
architecture guide of some help:
<http://www.qnx.com/developers/docs/6.3.2/neutrino/sys_arch/kernel.html#Sche
dulingAlgorithms>

If you want to read code, most of it is in services/system/ker/nano_sched.c

-ad


chris PANAGIOTOU wrote:

> Could you please give us a hint us where in the source the neutrino 
> implements it's scheduling policies?
Re: some scheduler infos  
..we have already checked out the documentation regarding policies.the fact is that first we r trying to find out where 
the scheduler sets which policy to use and where these policies r implemented..
thanx for answering..

OSYL 
Re: some scheduler infos  
Another thing that will help you to visualize the scheduler is the System
Profiler
perspective of the Momentics IDE.

Cheers,

Colin

Attilla Danko wrote: 

You might find the "scheduling algorithms" section of the QNX system 
architecture guide of some help: 
<http://www.qnx.com/developers/docs/6.3.2/neutrino/sys_arch/kernel.html#Sche
<http://www.qnx.com/developers/docs/6.3.2/neutrino/sys_arch/kernel.html#Sche
>  
dulingAlgorithms> 

If you want to read code, most of it is in services/system/ker/nano_sched.c 

-ad 


chris PANAGIOTOU wrote: 

> Could you please give us a hint us where in the source the neutrino 
> implements it's scheduling policies? 


_______________________________________________ 
OSTech 
http://community.qnx.com/sf/go/post4485
<http://community.qnx.com/sf/go/post4485>;  


-- 

cburgess@qnx.com <mailto:cburgess@qnx.com>; 
Re: some scheduler infos  
hi guys,

we started messing around again with the scheduler and, if we understand it correctly, the scheduling policies must be 
set in the SchedSet function.
Unfortunately we cannot find where this function is placed in the source code.
Has anyone any idea? Any suggestion welcomed.....


thanks
Re: some scheduler infos  
Basically any kernel call, eg SchedSet, is implemented as ker_sched_set in the kernel.
For this particular call, look in services/system/ker/ker_sched.c

chris PANAGIOTOU wrote:
> hi guys,
> 
> we started messing around again with the scheduler and, if we understand 
> it correctly, the scheduling policies must be set in the SchedSet function.
> 
> Unfortunately we cannot find where this function is placed in the source 
> code.
> Has anyone any idea? Any suggestion welcomed.....
> 
> 
> thanks
> 
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post5478
> 

-- 
cburgess@qnx.com
Re: some scheduler infos  
thanks for, the reply.
Ok, something else now, some functions related with the scheduler receive as arguments the policies implemented as 
SCHED_FIFO, SCHED_RR etc. The only related references i've noticed are some defines . My query is, where the 
implementation of these algorithms (fifo, round robin, sporadic...) is located in the source......

thanks!!!
Re: some scheduler infos  
Primarily in:
trunk/services/system/ker/nano_sched.c
Search for SCHED_FIFO and SCHED_RR

-ad

chris PANAGIOTOU wrote:
> thanks for, the reply.
> Ok, something else now, some functions related with the scheduler 
> receive as arguments the policies implemented as SCHED_FIFO, SCHED_RR 
> etc. The only related references i've noticed are some defines . My 
> query is, where the implementation of these algorithms (fifo, round 
> robin, sporadic...) is located in the source......
> 
> thanks!!!
> 
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post5668
> 
Re: some scheduler infos  
On Mon, Mar 10, 2008 at 5:49 PM, chris PANAGIOTOU <chpanag@gmail.com> wrote:

> thanks for, the reply.
> Ok, something else now, some functions related with the scheduler receive
> as arguments the policies implemented as SCHED_FIFO, SCHED_RR etc. The only
> related references i've noticed are some defines . My query is, where the
> implementation of these algorithms (fifo, round robin, sporadic...) is
> located in the source......
>
Yes, but if you mean in a manner more centralized than nano_sched.c, then
no.  Since scheduling policies
are mixed in the priority queue (discarding AP for a moment), then the
action to take for each of the policies
on ready/running/block operations are interspersed in the code at the
appropriate points.

To be honest, the only policy that actually has an 'algorithm' is sporadic
and the algorithm for it is
documented by the POSIX spec.  If you are looking for something similar to
the Linux scheduler
algorithms, then you won't find them (unless you start looking at AP which
has a bit more complexity)
due to the pure priority driven nature of an RTOS.

Thomas
Re: some scheduler infos  
ok, we feel a little confused. Our goal is to try to disable some of the policies leaving only one active or to embed 
our policy in the scheduler. Of course this doesn't have any practical use, we just want to mess around with the 
scheduler for our own joy and academical purposes. Is that possible and which are  the guidelines we should folow?

We build the kernel and we set through the buildfile the processes to run at 10f (priority 10 and policy fifo) Is that 
enough because we noticed that a minority of threads had different policies and priorities (Probably kernel threads?). 
Nevertheless we'd prefer to set our policy directly in the kernel scheduler source. In the sched.h exist some defines 
such as SCHED_FIFO, SCHED_OTHER etc. Could we place our policy as sched_other? Generally any tips or guidelines would be
 welcomed

thanks