pthreads on dual Intel Xeon system
Hi, I have a system consisting of a dual 2.8GHz Xeon with 1Gb of RAM running RedHat 9.0 (in fact this is one node of a cluster, but I'm just trying to get things working on a single node for now). I have an application that creates and then holds in memory a large data table that takes up most of my 1Gb of RAM. I want to run this job on both of my processors, but I can't just fire off two processes because I'd run out of RAM and enter swap hell. So what I'd like to do is to create my table then fire off one thread on each processor, both of which are reading the same table (by the way, once my large data table is created it is completely read only).
Using the default version of pthreads that comes with RedHat 9 (how do I find out which version this is?) the threads fire off and start functioning correctly but both remain on the same processor. Is there a threads library that would enable me to run them on separate processors (or even make use of the hyperthreading capabilities of the Xeon)?
I guess my other option would be to use fork() and shared memory.
Thanks for reading, and thanks in advance for any help.
Tony
|