A Look into
Table of Contents
A Look into Computer Memory 4
Memory Hierarchy 4
Allocation Policies 5
Relocation Policies 6
Hit and Hit Ratio 6
Modern Computer Applications 7
The memory of a computer is a key component of the overall architecture of a computer. Several types of memory exist with the architecture of the computer which collectively is known as the memory hierarchy. The use of the memory hierarchy, placing and moving information, is effected by the allocation and relocation policies. How well these policies allow the processor to find the information it is looking for, known as a hit, is ...view middle of the document...
The memory hierarchy is made up of these various levels of memory. A typical hierarchy, including size and cost, can be seen in Figure 1 with the smallest, fastest, and most expensive at the top of the pyramid. The register memory is available directly to the processor and is labeled Level 0. This memory is used explicitly for load/store instructions. In Figure 1, Level 1 memory is called the Cache 1 memory with Level 2 memory called the Cache 2 and so forth. Level 1 and Level 2 memories are typically part of the processor chip in order to allow direct access to the memory locations by the processor. Level 3 memory is the RAM installed on the motherboard of the computer and has an access time of hundreds of nanoseconds. The next level of memory, Level 4, which is considered the directly connected disks of the system, which have a significant amount of access time which is in the tens of milliseconds. Level 5 memory can be network storage or tape drives which may take minutes to access the appropriate data. It is worth noting the right hand column in Figure 1 showing the reduction in cost per GB as the size increases and the access speed decreases. To obtain high speed at an affordable cost, large amounts of information (programs and large data sets) is stored in the slower memory locations and moved into the faster memory locations, preferably before it is needed by the processor (Parhami, 2005, pp. 329-331).
Allocation policies determine where data will be placed within the memory hierarchy. The allocation policy is executed by the memory manager. The memory manager play an intricate part in maintaining the performance of the processor by keeping the immediately needed data in the optimal location for processor access to prevent delay in retrieving the information from slower access locations. There are three primary strategies that can be used for memory placement. They are Best Fit, First Fit and Worst Fir. When using the Best Fit policy, the memory manager looks for the closest fitting empty location where the data will fit without as little wasted space as possible. It is worth noting that the best fit location may not be the first available location where the data would fit. For placing the data in the first location where it will fit, the First Fit policy is used. This policy puts the data into the first location it fits with no regard for the amount of remain space after the data. Finally in Worst Fit, the memory manager looks for the largest location available to place the data with the end goal of having the maximum amount of space left available to place additional data into the remaining location (Virginia Polytechnic Institute and State University, 2013).
Relocation occurs when the OS loads a solid block of memory for a process. The first physical location of the process is known as the relocation address or base address. There are two types of relocation, static and dynamic. Static...