John Zolnowsky x69422/408-404-5064 wrote:
>> Date: Thu, 27 Sep 2007 07:13:42 -0700 (PDT)
>> From: micke <[EMAIL PROTECTED]>
>>
>> "There are no separate dispatch queues for the different classes."
>>
>> well according to Solaris Internals, page 229, I quote: "Kernel preempt
>> dispatch queue. Real-time threads are managed on a separate dispatch
>> queue from other classes"
>>
>> I've checked the rtshed.c and sched.c etc. But I have a hard time
>> getting a "grip" about the SCHED_FIFO and SCHED_RR. If someone could
>> help me sort out this I would really appreciate it.
>>     
>
> The POSIX scheduling interfaces are wrapped around priocntl(2) in libc,
> so there is no kernel knowledge of SCHED_FIFO or SCHED_RR:
> http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/rt/sched.c
>
> The RT scheduling class inserts entries into the dispatch queues in:
> http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/disp/rt.c
>
> The actual dispatch activity (thread selection) occurs in:
> http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/disp/disp.c
>   
Each CPU has a disp_t which contains a pointer to the first and last 
dispq_t for that cpu.  There
is one dispq_t allocated for each possible priority (see disp_cpu_init() 
in common/disp/disp.c)
 Real time threads will use priorities between 100 and 159.  Currently, 
no other threads on the system
use the same priorities (at the same time), so, in that sense,
these are "real time" dispq's.  Aside from allowing real time threads to 
pre-empt the kernel when/if they
become runnable,  they are scheduled like everything else.

>                                               -JZ
>
>   
>> Why I'm asking is be course I'd like to add the SCHED_SPORADIC policy.
>> But I need to find where the FIFO and RR are implemented so to say ...
>> hmm hope you understand what I mean.
>>
>> Any help is appreciated.
>>
>>     
My understanding of the SCHED_SPRADIC policy is very scant, but, from 
what little I have read about it,
this is something that is used with real time systems for doing some 
periodic soft time tasks.  You might start with
the time shared class code (or, much simpler, the fixed class code 
(common/disp/ts.c and common/disp/fx.c respectively)
as far as the kernel is concerned.  Then, you have user level posix 
routines, priocntl, and administrative interfaces
(dispadmin(1) for instance) to deal with.  Have fun.
max

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to