How to share CPU or RAM?

Solution 1:

To do this the program(s) accessing the CPU/RAM resources must be specifically designed to access said resources. A system set up in this manner is called a cluster, and the typical way resources are shared is with a protocol called MPI (message passing interface). It is a free download and using it with Linux can yield a powerful cluster (possibly even a super computer) for minimal cost, but again it is useless unless you have programs that were specifically designed to take advantage of MPI. There are some good cluster tutorials out there, if you are still interested you should check one out.

Edit:

I would recommend the tutorial here if you want to set up a cluster. I made a cluster by following this tutorial about a year ago and it worked pretty well. The tutorial is a bit old, so some files may not be exactly where the tutorial says they are (sometimes files get moved around in different/newer Linux distros) but if you are the least bit familiar with Linux it should not be an issue. The tutorial uses an older version of MPI, but I used the newest version and had no issues that were not easily resolved. Depending on what you are doing there may actually be a program out there that can take advantage of MPI. I know there are some video encoding and number crunching programs that take advantage of MPI that can be downloaded from universal sources.

Solution 2:

You can share RAM using RAM disks, but that looks just like sharing normal disks, except that these are in another computer's RAM. There is no direct way for one computer to use another computer's RAM as if it was its own RAM, but there are some ways to use other computer's RAM. More on that in next paragraph.

As for CPU sharing, it's possible but there is no single standard for it. You can't just share it and let another computer take needed resources. Instead you need to have specifically designed applications which can work on several computers at one. This is often called distributed computing and is used by some research projects such as SETI@Home, Einstein@Home, Climateprediction.net and many others.

Basically programs work in such way that there is one central server which distributes the work which needs to be done. Computers on network download work units from central computer and process them. After that central computer receives results from clients and merges them into one cohesive result. This way computers "share" CPU and RAM resources over network. The downside of this is that programs need to be made in such way as to work over network and right now distributed computing isn't popular enough among common uses for a computer so only a small number of specialized programs support it. On the other hand, it is commonly used for scientific purposes as it is cheaper to obtain large number of personal computers or playstations 3 than it is to obtain access to a mainframe computer.

Solution 3:

is there software for share my application in my network?without need to foreign network!(for ex. i want rendering a file,that my PC render this in 7days,but i share this to my network and rendering reduction to 1 day? – MJH Mar 12 '11 at 1:19

You have fallen in to a XY Problem, you should not of asked "how can I share cpu and ram accros computers" but "how can I use multiple computers to make my renders in using ZZZZZ faster?"

It is highly dependant on what software you are using, and what you are rendering (are you transcoding video, or are you rendering a 3D model/video?).

To pick a few examples the free 3D software Blender supports distributed rendering where you can have many computers all working together to generate one output. If you are doing video rendering some quick googling found the open source project MediaEncodingCluster that allows you to render video and audio files using multiple computers.

Solution 4:

The only operating system I know which allows to share CPU/RAM is plan9. There you can export/mount almost anything. This doesn't means performances are good, of course.