but many of the application are not making proper usage of this resources i.e., some of the applications will make use of only one core instead of both.
so can we design a thread schedular framework at the os level such that it should be application independent i.e., any user application can make best usage of resources (dual core, quad core... etc ..)
i am a student, this is idea just came in my mind.
i want to do this as my project for my academic year.
can anyone suggest me , am i on the right path of implementation or not?
You already have thread scheduling framework supplied by the O/S. What's missing on the O/S side is implemented on the application side within the application itself by way of an application threading and/or tasking programming paradigm. OpenMP, Cilk, Threading Building Blocks (TBB), pthreads, QuickThread and many others. Each paradigm has its strengths and weaknesses. These paradigms are layered onto the language.
As to what is best for your project, you will have to do some basic research and analysisby contacting the various vendors, get information about the paradigm, get information about licensing or lack thereof, and choose the route that fits your needs. OpenMP is generally included in most of the programming languages, the other choices may require you to obtain a license (student or other). And some choices are restricted to language (usualy C++) and/or platform (e.g. Windows). Picking the Language and extension will be iportant to your project. Do you have any preliminary idea of what platform you will use and/or language choice? From there you can then narrow down the parallel programming choices.
However if this is your topic and you are stuck with it then I have one idea for a starting point. In the OS within the built in scheduler, there is an api to set processor affinity. This controls which thread runs on which processor. You could investigate to see ifsetting ithelps improve the behavior, especially the cache behavior of the program. If you have a good division of labor and the affinity helps, its a sign that the OS scheduler is somehow deficient.
I don't think that you can do this research in a problem neutral way but that you would need to pick a problem to be solved in parallel and focus the scheduling analysis on it. Each problem is very different. If you do show that the scheduling is poor for a given problem and that the processor affinity control is not enough to improve it, then you could look at writing you own scheduler in the Linux kernel. You would need to install the kernel development environment. I recommend http://www.amazon.com/Linux-Kernel-Nutshell-OReilly/dp/0596100795 as a good starting point in going up the learning curve. If you grep the code for affinity you should find the appropriate parts which relate to scheduling. The learning curve will be fairly steep for this.
As far as I know, OS schedulers don't have a means for optimizing location of threads/processes which are children of a single job. Thus, affinity schemes such as those which come with OpenMP should remain useful. Even within OpenMP, effectiveness of OS schedulers and OpenMP affinity depends strongly on OpenMP schedule and consistent re-use of the thread pool.
My target platform is ibm 3550 (2 processors - 8 cores, 8 GB ram, unix). I am going to develop server application for a multiplayer online game. Mainly the application will distribute and exchange client side and server side generated events to all participants/players.
Now I am gathering information about the programming language (C, C++, GNUStep or Java) to be used. The language is not everything, I know, but having it once selected I will be able to think about the frameworks and libraries I could use in order to facilitate the development process. Very important is to get as much as possible from the hardware of the target platform. That's why I am writing here.
Could you suggest a good set of programming language and a framework (or library) for multicore programming?
This would safe much time to me.
Thank you very much in advance.
I would recommend using pthreads which will give you maximum control. It looks to me like your research isn't really about the OS scheduling of threads but about how to divide the work and manage the work queues in the most efficient way for your problem. Also boost has some good cotainers and other code that may help, for example, http://www.boost.org/doc/libs/1_40_0/doc/html/thread.html. For the other containers be sure to read http://www.boost.org/doc/libs/1_35_0/doc/html/intrusive/thread_safety.html before using them.
Sorry, I forgot to mention that I would use C/C++ which I guess is obvious since pthreads is C.
If you code is simple for loops you can also try openMP for prototyping with C/C++ as well but you don't get full control with it.
I would agree that if you are concerned with maximizing performance on available hardware, going with a compiled language such as C/C++ over an interpreted/dynamic language (C#, Ruby, Python, ...) will generally be a win, though a friend of mine says anyone serious about performance will use Fortran :-). There are a number of C/C++ libraries that support event management, which will probablybe value for handling transactions.pthreads certainly offers all the flexibility that you might need, but if you have any computational loads to handle, you might consider Intel's Threading Building Blocksas an efficient compromize between convenience (self-contained thread pools, computation-oriented task scheduler, thread-safe containers) and performance.