Search code examples
javamultithreadingschedulerparticle-swarm

Is this java project idea practical? (Thread scheduler and Particle Swarm Optimization)


On a multicore box, the java thread schedulers decisions are rather arbitrary, it assigns thread priorities based on when the thread was created, from which thread it was created etc.

The idea is to run a tuning process using pso that would randomly set thread priorities and then eventually reach optimal priorities where the fitness function is the total run time of the program?

Of course there would be more parameters, like the priorities would shift during the run to find an optimal priority function.

How practical, interesting does the idea sound? and any suggestions. Just some background, ive been programming in java/c/c++ for a few years now with various projects, another alternative would be making a thread scheduler based on this in c, where the default thread scheduler is the OS.


Solution

  • Best way to find out -- start an open source project and see people's usage/reaction.

    It sounds very interesting to me -- but I personally don't find it very much useful. Perhaps we're just not at the point where concurrent programming is as prevalent and easy as it could be.

    With the promotion of functional programming, I guess the world would move towards avoiding thread synchronization as much as possible (thus making thread scheduling less of an impact in overall performance)

    From my personal subjective experience, most performance problems in software can be solved by improving one single bottleneck area that accounts for 90% of the slowdown. This optimizer may help find that out. I am not sure how much the scheduling strategy could improve overall performance, though.

    Don't get discouraged, though! I'm just talking out of thin air. It sounds fun, so why not just play with it anyway :)