memory hierarchies and caching with the increased use of computing in societysoftware applications must manage extremely large data sets such applications include the processing of online financial transactionsthe organization and maintenance of databasesand analyses of customerspurchasing histories and preferences the amount of data can be so large that the overall performance of algorithms and data structures sometimes depends more on the time to access the data than on the speed of the cpu memory systems in order to accommodate large data setscomputers have hierarchy of different kinds of memorieswhich vary in terms of their size and distance from the cpu closest to the cpu are the internal registers that the cpu itself uses access to such locations is very fastbut there are relatively few such locations at the second level in the hierarchy are one or more memory caches this memory is considerably larger than the register set of cpubut accessing it takes longer at the third level in the hierarchy is the internal memorywhich is also known as main memory or core memory the internal memory is considerably larger than the cache memorybut also requires more time to access another level in the hierarchy is the external memorywhich usually consists of diskscd drivesdvd drivesand/or tapes this memory is very largebut it is also very slow data stored through an external network can be viewed as yet another level in this hierarchywith even greater storage capacitybut even slower access thusthe memory hierarchy for computers can be viewed as consisting of five or more levelseach of which is larger and slower than the previous level (see figure during the execution of programdata is routinely copied from one level of the hierarchy to neighboring leveland these transfers can become computational bottleneck network storage external memory internal memory caches bigger registers cpu figure the memory hierarchy faster