Re: Comments on the KSE option



I think the real issue here is that it is fairly difficult... probably
close to impossible in fact, to write a general purpose scheduler in
the kernel that can handle the types of extreme cases that can occur
when the kernel is made responsible for managing a user program's threads.

A better approach would be to make the kernel responsible for scheduling
cpu slots for programs, a far more manageable number, and if a program
wants to have thousands of threads on a 4-cpu system it (i.e. libthr)
should then have the responsibility of telling the kernel which
threads to pop into those slots at any given moment.

So, for example, if a machine has 4 cpus the kernel has 4 scheduling
slots it can fill. The kernel can apportion those slots with its current
scheduler technology. But if there is a program running on the system
that has thousands of threads, then why in the world would you want to
try to make the kernel scheduler deal with all those threads at once
when it only has 4 cpus to assign them to anyhow? So what you would
have instead would be the kernel saying to the program 'ok, I have 3
slots available for you at the moment' and make the program responsible
for telling the kernel which threads to run in those 3 slots. And
then a little while later the kernel might say 'I have 4 slots now',
or 'now I only have 2 slots available', etc etc.

This would then be a far more solvable problem for the kernel scheduler.

If you as the user then want the kernel to give the program with
thousands of threads more of the available cpu, it simply becomes a
matter of running the program at a lower NICE value.

-Matt

_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Stolen and degraded time and schedulers
    ... work_time is probably most naturally measured in cpu clock cycles rather ... In the case of cpufreq you are talking about the cpu not doing as much work due to a choice the kernel made. ... I understand they are somewhat similar from the perspective of the scheduler, ... I think this is might be design; i.e. the scheduler was intended to work in terms of real time units rather than work units. ...
    (Linux-Kernel)
  • Re: [PATCH][RSDL-mm 0/7] RSDL cpu scheduler for 2.6.21-rc3-mm2
    ... on scheduler foo, under this workload, the CPU hogs steal 70% CPU ... I only find a slowdown, no choppiness, no audio stutter (it would be extremely ... with either kernel. ...
    (Linux-Kernel)
  • Re: 2.6.0-test1-mm2 music skips
    ... > It's probably Con's new scheduler that is causing these problems. ... I've been using the 2.5 kernel for a long time now and the 2.4 kernel ... Players have to balance how much cpu they want ...
    (Linux-Kernel)
  • Re: few questions about how linux work
    ... > to get CPU) ... > and the scheduler switch to next process. ... which one of them is having priority 1 (consider it to be kernel ... But when process 1 (kernel process)comes into picture then it'll ...
    (comp.os.linux.development.system)
  • Re: call for more SD versus CFS comparisons (was: Re: [ck] Mainline plans)
    ... problems on my Amarok machine. ... usually test Amarok playback while kernel package make, ... Putting load onto the VM layer / block layer. ... also the behavior on a server for example - how does the scheduler behave ...
    (Linux-Kernel)