> > I sure hope someone can help me out on this. I am currently working
on a user level thread scheduler on the Linux Operating system. I am
currently using Kernel 2.2.12. Well my plan is to be able to port this
scheduler on to an SMP machine which will probably be a quad Pentium
processor. My plans are to obtain a kernel thread from each processor and
then bind user level threads to the kernel threads at leisure. My aim is to
achieve a low latency allocation and scheduling without having to go through
a kernel call every time scheduling occurs since it is amazingly expensive
in computational resources. I have heard rumors that Linux SMP is not able
to bind processes to specific processors. Can anyone enlighten me on this
subject since it would greatly be of much help.
>
> first, why do you think scheduling is expensive? without measurements,
> the statement is silly. second, Linux's scheduler is generally superior
> to any dumb, fixed policy, since the fixed approach is usually suboptimal.
> finally, there is a pset patch.
>
Well I surely have made my measurements and it takes quite a lot of
instructions (actually hundreds) for an Unix system to deschedule a thread
amd move on to the next thread. One of the reasons is saving the context of
the thread and secondly it would need to go into the kernel which is a quite
obvious expensive operation. What I am working on in a scheduler which would
save as little as possible of the context and would simply run as a single
process. Reading any textbook or paper on Parallel Processing would convince
you that it takes a lot to create a new thread ro destroy one in the kernel
and thus is not really worth it when the main aim is to create a fine
grained parallel processing scheduler. A call to the kernel takes about 1 us
to access the protected kernel space whilst I am talking in the order of ns.
Do not take me wrong. I am a great admirer of the Linux kernel and
scheduler. It is just an inherent bottleneck of Unix operating systems in
that it needs to take time to access kernel functions and to create new
processes and threads due to the complexity of the operating system and
other subtle synchronization features.
Well thank you anyway
Joseph Cordina
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/dmentre/smp-howto/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]