Handbook of Computer Science(cs) and IT

Memory Hierarchy

  • The memory unit is used for storing programs and data. It fulfills the need of storage of the information.
  • The additional storage with main memory capacity enhance the
    performance of the general purpose computers and make them efficient.

 

  • Only those programs and data, which is currently needed by the processor, reside in main memory. Information can be transferred from auxiliary memory to main memory when needed.

Cache Memory

  • A small, fast storage memory used to improve average access Or
  • We can say that cache is a very high-speed memory that is used to increase the speed of processing by making current programs and data available to the CPU at a rapid rate.
  • The cache is used for storing segments of programs currently being executed in the CPU and temporary data frequently needed in the preset:

 

Cache Performance

When the processor needs to read or write to a location in main menfirst checks whether a copy of that data is in the cache. If so, the proc‘- immediately reads from or writes to the cache.

Cache hit if the processor immediately reads or writes the data it cache line.

Cache miss If the processor does not found the required word in cache miss then cache miss has occured.

Hit ratio Percentage of memory accesses satisfied by the cache.

Miss ratio =1-Hit ratio

 

 

Key Point

The cache memory   for the is employed in computer systems to compensate for the

speed differential between main memory access time and processor logic.

 

Main Memory

The main memory refers to the physical memory and it is Ile central storage unit in a computer system.

  • The main memory is relatively large and fast men iory used to store programs and data during the computer operation.
  • The main memory in a general purpose computer is made up of RAM integrated circuit.

Latency

  • The latency is the time taken to transfer a block of data either from main memory or caches.
  • As the CPU executes instructions, both the instructions themselves and the data they operate on must be brought into the registers, until the instruction/data is available, the CPU cannot proceed to execute it and must wait. The latency is thus the time the CPU waits to obtain the data.
  • The latency of the main memory directly influences the efficiency of the

Auxiliary Memory

  • The common auxiliary memory devices used in computer systems are magnetic disks and tapes.

Magnetic Disks

  • A magnetic disk, is a circular plate constructed of metal or plastic coated with magnetised material.
  • Often, both sides of the disk are used and several disks may be stacked on one spindle with read/write heads available on each surface.
  • All disks rotate together at high speed. Bits are stored in the magnetised

surface in spots along concentric circles called tracks. The tracks are commonly divided into sections called sectors.

Magnetic Tapes

  • A magnetic tape is a medium of magnetic recording, made of a thin magnetised coating on a long, narrow strip of plastic film.
  • Bits are recorded as magnetic spots on the tape along several tracks. Magnetic tapes can be stopped, started to move forward or in reverse. Read/write heads are mounted one in each track, so that data can be recorded and read as a sequence of characters.

 

Mapping of Cache Memory

  • The transformation of data from main memory to cache memory is referred to as a mapping process.
  • There are three types of mapping procedures considered
  1. Associative mapping 2. Direct mapping
  2. Set associative mappin

 

Mapping of Cache Memory

  • The transformation of data from main memory to cache memory is referred to as a mapping process.
  • There are three types of mapping procedures considered
  1. Associative mapping 2. Direct mapping
  2. Set associative mapping

Associative Mapping

  • The fastest and most flexible cache organisation uses an associative
  • The associative memory stores both the address and the data of the memory word.

 

 

  • This memory permits to store any word in cache from main memory.

Direct Mapping

  • Associative memories are expensive compared to Random Access Memories (RAM), because of the added logic associated with each cell.
  • The CPU address is divided into two fields n bits

 

Set-Associative Mapping

In direct mapping, each word of cache can store two or more words of memory under the same index address. But in set-associative method, each data word is stored together with its tag .and the number of tag data items in one word of cache is said to form a set.

Key Points

  • The number of bits in the index field is equal to the number of address bits required to access the cache memory.
  • In general, if there are2k words in cache memory and 2″ words in main

memory. Then, the n-bit memory address is divided into two fields A-bits for the index field and nk bits for the lag field.

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95

Leave a Reply

Your email address will not be published. Required fields are marked *