SM_SOF
SM_SOF

Reputation: 1

How can I share RAM module via network in C++?

Just I need to know is there any way to share multiple RAM modules for hosting a client system?

I used to write an infinitive calculation app that's used 1 mb from another pc in network by making a simple server client connection and spreading parallel tasks and then gather up the results to the target system; but now I need something to manipulate the ram storage directly. Is there anything available for that like toolkit or sdk or something? it can be in all c family languages.

Upvotes: 0

Views: 152

Answers (1)

You are confused.

First, RAM is not used (directly) by processes. It is the operating system kernel which manages RAM and provide virtual address spaces to processes thru virtual memory (so your program, running in a process, has its virtual address space). Read a good textbook like Operating Systems: Three Easy Pieces to understand these concepts.

There is no way to share RAM across network, and that would make no sense (because the bandwidth and latency of RAM is a lot better than that of network). Relative to the speed of RAM, the network is many thousands times slower (so is always a bottleneck) !

You might design your software as some distributed computing using message passing between processes running on several hosts.

You have a lot to learn; look into MapReduce, MPI, sockets, 0mq etc etc....

You probably want to use Linux or POSIX (because it is dominant in distributed or cloud computing). Read some Linux programming book like ALP or something newer, then see syscalls(2) and the many man pages they refer to. Notice that socket(2), poll(2), socket(7), tcp(7) (and other system calls) are highly relevant to your needs.

You might want to use some database. Perhaps RDBMS, PostGreSQL, MongoDB, REDIS or even memcached might be useful.

You need to learn and read a lot of things before coding.

Upvotes: 2

Related Questions