Docsity

Overview Memory Hierarchy Quiz, Lecture notes of Computer Science

Partial preview of the text

Download Overview Memory Hierarchy Quiz and more Lecture notes Computer Science in PDF only on Docsity!

Memory Organization 1 Lecture 40

Overview

 Memory Hierarchy

 Main Memory

 Auxiliary Memory

 Associative Memory

 Cache Memory

 Virtual Memory

Memory Organization 2 Lecture 40

Memory Hierarchy

Magnetic tapes Magnetic disks I/O processor CPU Main memory Cache memory Register Cache Main Memory Magnetic Disk Magnetic Tape Memory Hierarchy is to obtain the highest possible access speed while minimizing the total cost of the memory system

Quiz Time Which of the following can be used to store large size of data? A. Cache Memory B. Random Access Memory C. Magnetic Disk

Memory Organization 5 Lecture 40

Main Memory

RAM and ROM Chips Typical RAM chip Typical ROM chip Chip select 1 Chip select 2 Read Write 7 - bit address CS 1 CS 2 RD WR AD 7 128 x 8 RAM 8 - bit data bus CS 1 CS 2 RD WR 0 0 x x 0 1 x x 1 0 0 0 1 0 0 1 1 0 1 x 1 1 x x Memory function Inhibit Inhibit Inhibit Write Read Inhibit State of data bus High-impedence High-impedence High-impedence Input data to RAM Output data from RAM High-impedence Chip select 1 Chip select 2 9 - bit address CS 1 CS 2 AD 9 512 x 8 ROM 8 - bit data bus

Memory Organization 7 Lecture 40

Memory Address Map

Address space assignment to each memory chip

Example: 512 bytes RAM and 512 bytes ROM RAM 1 RAM 2 RAM 3 RAM 4 ROM 0000 - 007 F 0080 - 00 FF 0100 - 017 F 0180 - 01 FF 0200 - 03 FF Component Hexa address 0 0 0 x x x x x x x 0 0 1 x x x x x x x 0 1 0 x x x x x x x 0 1 1 x x x x x x x 1 x x x x x x x x x 10 9 8 7 6 5 4 3 2 1 Address bus Memory Connection to CPU

  • RAM and ROM chips are connected to a CPU through the data and address buses
    • The low-order lines in the address bus select the byte within the chips and other lines in the address bus select a particular chip through its chip select inputs

Memory Organization 8 Lecture 40

Connection of Memory to CPU

CS 1 CS 2 RD WR AD 7 128 x 8 RAM 1 CS 1 CS 2 RD WR AD 7 128 x 8 RAM 2 CS 1 CS 2 RD WR AD 7 128 x 8 RAM 3 CS 1 CS 2 RD WR AD 7 128 x 8 RAM 4 Decoder 3 2 1 0 16 - 11 10 9 8 7 - 1 RD WR Address bus Data bus CPU CS 1 CS 2 512 x 8 AD 9 ROM 1 - 7 9 8 Data Data Data Data Data

Quiz Time How many lines must be decoded for chip select? Specify the size of the decoders. Configuration Size of each chip is 128 X 8 (Total 16 chips = 2048 bytes) A. 4 - lines ; Size 4 x 16 Decoder B. 16 - lines ; Size 16 x 4 Decoder C. 4 - lines ; Size 16 x 4 Decoder

Memory Organization 11 Lecture 41

Auxiliary Memory

Information Organization on Magnetic Tapes EOF IRG block 1 block 2 block 3 block 1 block 2 block 3 R 1 R 2 R 3 R (^4) R 5 R 6 R 1 R 3 R 2 R 5 R 4 file i EOF Organization of Disk Hardware Track Moving Head Disk Fixed Head Disk

  • Q.
  • Solution

Memory Organization 16 Lecture 41

Associative Memory

Argument register(A) Key register (K) Associative memory array and logic m words n bits per word Match register Input Read Write M

  • Accessed by the content of the data rather than by an address
  • Also called Content Addressable Memory (CAM) Hardware Organization

Example Find The Match Word Using Associative Memory

Memory Organization 19 Lecture 41

Match Logic

F'i 1 F (^) i 1 K 1 A 1 F'i 2 F (^) i 2 K 2 A 2 F'in F^ in Kn A (^) n

.... Mi

Read Operation

If more than one word in memory matches the unmasked argument field, all the matched words will have 1 ’s in the corresponding bit position of the match register. It is then necessary to scan the bits of the match register one at a time. The matched words are read in sequence by applying a read signal to each word line whose corresponding Mi bit is a 1. If only one word may match the unmasked argument field, then connect output Mi directly to the read line in the same word position, The content of the matched word will be presented automatically at the output lines and no special read command signal is needed. If we exclude words having zero content, then all zero output will indicate that no match occurred and that the searched item is not available in memory.