GTX 590 has 2 processors inside of it. I would like to us CUDA 4.0 to program the GPU and would like to know whether the 2 processors share same global memory? Any special I need to handle as I write program for 2 GTX 590 and GTX 580? Whether I can use the same CUDA program to run on both cards either of GTX 580 and GTX 590 and fully utilize 2 processors at GTX 590?
No, the GTX 590 appears as two distinct CUDA devices, each with their own separate device memory. Because the devices are completely independent, full utilization of both of them requires the creation of multiple CUDA contexts. Then you will have to start kernels in both contexts and manage any data exchange required.