Buffers
Buffers are used extensivily in computers, and appear anywhere where data has to be transfered between two different speed data buses. Buffers allow information to accumulate until there is enough to completely fill the bandwidth available. There is a buffer between the PCI bus, and the memory bus. Because the PCI bus is only 32-bits, there is not enough information per clock to fill the memory bus' 64-bits. And because the PCI bus operates at less than half of the memory bus, it is impossible for data to be effectly transfered without a buffer. Buffers allow data to accumulate at the end of the PCI bus, until there is enough data to make efficient use of the memory bus' increased speed and bit width. The same is true for the opposite direction. A buffer collects information from the memory bus, so that the memory bus can be used for other tasks while the PCI bus is still reading the data out of the buffer.
Cache
Caches are slightly different then buffers. They are more like RAM, only smaller, and quicker. Infact, the cache on most hard drives is made out of standard PC100 SDRAM. The cache act as both a buffer and memory, in that information accumulates there until it is efficient to be send. But unlike a buffer, caches keep the frequently used data, and do not discard it after transfer. Caches are used where certain types of data are repetativily needed. Processors use their L1 and L2 caches for storing data for short periods of time. A loop structure in programming will make repetative calls, and caches save the data from having to be reloaded from memory.
RAM
Main Memory
Main memory is the high speed storage. Unlike caches and buffers, main memory is made to hold a lot of data. Main memory is actually the slowest form of
electrical storage in a computer. If data is unable to be stored in RAM, it is stored in a physical medium like a hard drive, where accessing it will mean a large performance penalty.
Virtual Memory
Virtual memory is the a technique to implement a secondary storage system to augment main system
RAM. When more RAM is needed than there physically is, hard disk space is used to store the
currently unused information. Because not all of the information in RAM is being accessed on a
frequent basis, it is possible to store the infrequently used data on the hard drive. With programs
requiring more than 200MB each, and the average computer only equipped with less than 64MB, this
is an invaluable tool.
Virtual memory is often called a swap file, or swap disk. This is because it is both a
file stored on the hard drive, and data is swapped in and out of it often.
The virtual memory in a Windows environment is stored by default in the C:\
directory on the hard drive in a file named WIN386.SWP. In a Unix, or *nix
enviroment, virtual memory is stored in a separate partition.
|