What is Main Memory




What is Main Memory

In discussion above, we saw that a computer's CPU contains necessary circuitry for data processing and controlling other components of the computer. However, one thing it does not have built into it is place to store and data needed during data processing. We was also saw that the CPU contains several registers for storing and instructions but they can store only a few bytes at a time. They are just sufficient to hold only one or two instructions with corresponding data, If instructions data of an executing program were to reside in secondary storage like a disk, and fetched and loaded one-by-one into CPU register as the program execution proceeded, this would lead to the CPU being idle most of the time.

This is because there is a large speed mismatched between the rate which CPU can process data and the rate at which the system can transfer data from disk to CPU registers. For example, a CPU can process data at a rate of about 5 nanoseconds/byte and a disk reader can read data at a speed of about 5 microseconds/byte. Hence, within the time in which a disk can supply one byte of data a CPU can process 1000 bytes. This would lead to very poor overall performance even for a computer having a very fast CPU. To overcome this problem, there is a need to have a reasonably large storage space that can hold instructions and data of the program(s) on which CPU is currently working.

The time to fetch and load data from this storage space into CPU registers must also be very small as compared to that from disk storage to reduce the speed mismatch problem with CPU speed. Every computer has such a storage space known as primary storage, main memory, or simply memory. Instructions and data of a program reside mainly in this area when CPU is motherboard or on small circuit board attached to the motherboard of a computer system. This built-in memory allows CPU to store and retrieve data very quickly. The rate of fetching data from this memory is of the order of 50 nanoseconds/byte. Hence, the rate of data fetching from main memory is about 100times faster than that from a high-secondary storage like disk.