Quote:
Originally Posted by Shavkat
RAM's speed is 1000x more faster than PC's HDDs!
Now try to calculate how many times faster then your MicroSD
|
The fact is,Im not making this up or speculating. Your PC already does exactly that. Your PC uses virtual memory,which in essence makes your hard disk act like RAM. The reason this works is that memory references in a program tend to cluster together within a small region. The basic way this works is that you divide the memory into pages. As you run the program,the memory is accessed. If the program tries to access a page that is not in physical memory,then the page that is needed is loaded ,usually replacing a page that has not been used for awhile.
Consider it this way. Suppose your storage device can be accessed at a rate of 10MB per second(100ns per access). Now suppose your ram can be accessed at a rate of 1GB per second(1ns per access). Eveyrone here says,it wont work because your program would run 100 times slower. That is not true however. Suppose that your program makes 100,000 memory locations located near each other before it has to access a location in another page (100us). If the page is in memory,all is good. If that page is not in physical memory,then it must load the page from its storage device. Lets say a page is 1k. It takes about a 100 microseconds to load the page. Therefore there is an extra 100us added to the time for 100,000 memory accesses. Since takes about 100us to access 100,000 memory locations from physical memory,the effective time to access 100,000 memory locations is 200us. Therefore even though the storage device is 10x slower,the effective speed of the virtual memory system is only half as slow as physical memory. In effect,your 10MB/sec storage device acts like 500MB/s memory.
The real question here,is how many page misses will you get. If there are too many,things dont work well at all. This depends on the kind of programs that you are running,and also on how much real memory and virtual memory you have. (You cant push it to far,or things get really slow) It is known that in most applications this system works very well and in fact,most modern operating systems do this. (Windows,OS X, Linux,Solaris)
On an interesting side note,this is also how cache memory in your cpu works. Instead of a hard disk and a DDR-2 ram, you have very fast on die memory,and somewhat slower DDR-2 ram. Effectivly,the DDR-2 ram can run close to the 3Ghz speed of the cpu instead of the 800mhz speed of the ram. You of course take something of a performance hit,but its not that bad.