Memory Hierarchy in Computer Organization Tutorial Notes with Examples

Memory Hierarchy in Computer Organization Tutorial Notes with Examples

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.
Memory Hierarchy in Computer Organization Tutorial Notes with Examples
Memory Hierarchy in Computer Organization Tutorial Notes with Examples

Cache Memory

  • A small, fast storage memory used to improve average access time.

                                                      OR

  • We can say that cache is a very high-speed memory that is used to increase the speed of processing by making 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 present calculations.
Memory Hierarchy in Computer Organization Tutorial Notes with Examples
Memory Hierarchy in Computer Organization Tutorial Notes with Examples

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 occurred.

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 the central storage unit in a computer system.
  • The main memory is relatively large and fast memory 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 CPU.

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 magnetized 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 magnetized. 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 magnetized 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
  3. 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.

Handbook of cs and it

  • 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
HANDBOOK SERIES
HANDBOOK SERIES

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 are 2k  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.

Sorting in Design and Analysis of Algorithm Study Notes with Example

Follow Us On Cyber Point Solution Youtube Channel : Click Here

Follow Us on Social Platforms to get Updated : twiter,  facebookGoogle Plus

Learn More Ethical Hacking and Cyber Security click on this link. cyber security

 

Leave a Reply

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