Computer Systems Memory Characteristics

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the relationship between access time and cost per bit in a memory hierarchy?

Faster access time typically means a greater cost per bit.

External memory capacity is generally expressed in terms of what unit?

Bytes.

If a computer program tends to access the same set of memory locations for a particular time period, what principle is being demonstrated?

Locality of reference.

What type of memory is specifically designed to provide a memory speed approaching that of the processor, while also having a large memory size?

<p>Cache memory.</p> Signup and view all the answers

What is the 'miss penalty' in the context of multiple level cache?

<p>The extra time taken to load the data to the cache from the main memory when there is a cache miss.</p> Signup and view all the answers

When a cache hit occurs, does data need to pass through the system bus?

<p>No.</p> Signup and view all the answers

What hardware component translates a virtual address into a physical address in main memory?

<p>Memory Management Unit (MMU).</p> Signup and view all the answers

What is a main disadvantage of direct mapping in cache design?

<p>A fixed cache location exists for any given block.</p> Signup and view all the answers

What information is obtained by taking the least $k$ bits of a binary value, relevant to direct mapping, assuming that the value mod $2^k$ is computed?

<p>The relevant line number.</p> Signup and view all the answers

In a direct mapping scheme, what is the purpose of the 'tag' of $(s - r)$ bits?

<p>To distinguish which particular block is currently being stored.</p> Signup and view all the answers

How is memory access handled in sequential access memory?

<p>Access must be done in a specific linear sequence.</p> Signup and view all the answers

What is 'Access time' also known as?

<p>Latency.</p> Signup and view all the answers

What characteristic defines volatile memory?

<p>It requires power to maintain the stored information.</p> Signup and view all the answers

How are individual blocks addressed in direct access memory?

<p>Individual blocks have a unique address.</p> Signup and view all the answers

How is a word retrieved in associative access memory?

<p>Based on a portion of its contents rather than its address.</p> Signup and view all the answers

What consists of the Access Time plus any additional time required before a second access can commence?

<p>Memory cycle time.</p> Signup and view all the answers

Why are external, nonvolatile memory referred to as secondary or auxiliary memory?

<p>These are used to store program and data files.</p> Signup and view all the answers

How do multiple level caches improve memory performance?

<p>By reducing the &quot;Miss Penalty&quot;.</p> Signup and view all the answers

In cache memory, what does a 'cache hit' indicate?

<p>The CPU finds the required data or instruction in the cache.</p> Signup and view all the answers

What is the function of the electrical lines in the "Unit of Transfer"?

<p>To transfer data into and out of the memory module (Internal Memory).</p> Signup and view all the answers

Which addressing mode is described as 'physically wired addressing mechanism'?

<p>Random access.</p> Signup and view all the answers

What type of device is cache in relation to transferring data between main memory and processor registers, and what does it do?

<p>Cache is a device for staging the movement of data between main memory and processor registers to improve performance.</p> Signup and view all the answers

In the context of cache memory, what does the phenomenon of 'locality of reference' refer to?

<p>When a block of data is fetched into the cache, there will be future references to that same memory location or in other words in the block.</p> Signup and view all the answers

Why must the tag of a memory location have the ability to identify the specific block that is being stored in the tag?

<p>To verify the block that is read is the one requested.</p> Signup and view all the answers

If a system employed virtual memory, what are the two possible ways to place the cache in the computer?

<p>Physical and Logical</p> Signup and view all the answers

In the context of direct mapping in cache memory, what is the significance of the index?

<p>The index determines which line in cache memory a block will be mapped to.</p> Signup and view all the answers

In mapping that is not direct mapping, the number of lines in cache is not directly influenced by which specific parameter?

<p>The address format.</p> Signup and view all the answers

How is calculating a value mod $2^k$ helpful in the context of binary?

<p>It is the same as taking the least k bits of the given binary value.</p> Signup and view all the answers

What are the different memory accessing methods?

<p>Sequential Access, Direct Access, Random Access and Associative Access.</p> Signup and view all the answers

What is 'Transfer Time'?

<p>The rate at which data can be transferred into or out of a memory unit.</p> Signup and view all the answers

What kind of data is stored in Nonvolatile memory?

<p>Nonvolatile memory stores data permanently even without power.</p> Signup and view all the answers

What is the transfer of data in Direct Access like?

<p>Combination of both random and sequential access methods.</p> Signup and view all the answers

In context to performance parameters, how long does it take to position the read-write mechanism in non-random-access memory?

<p>Equal to the Access Time (Latency).</p> Signup and view all the answers

What does L1 Cache represent?

<p>Level 1 (L1) cache</p> Signup and view all the answers

What needs to be considered in associative mapping?

<p>Cache control logic must simultaneously examine every line's tag for a match.</p> Signup and view all the answers

Why would a system need a Memory Management Unit (MMU)?

<p>A hardware that translates each virtual address into a physical address in the main memory.</p> Signup and view all the answers

Which is faster - physical or logical Cache?

<p>Logical cache</p> Signup and view all the answers

Why is set associative mapping beneficial?

<p>Combination of both the direct and associative approaches while reducing their disadvantages.</p> Signup and view all the answers

How many words are in a block if Block size = Line size = $ 2^W $

<p>$ 2^W $ words</p> Signup and view all the answers

What indicates the need for a secondary memory?

<p>External, nonvolatile memory</p> Signup and view all the answers

Flashcards

Registers

Internal memory located directly in the CPU, used for quick access to data and instructions.

Main Memory

Memory that the CPU can access directly and quickly.

Electrical Lines

Electrical pathways that facilitate data transfer into/out of memory modules.

Sequential Access

Accessing data in a specific linear order, starting from the beginning.

Signup and view all the flashcards

Random Access

Accessing data randomly, with consistent access time regardless of location.

Signup and view all the flashcards

Direct Access

Combination of both sequential and random access methods.

Signup and view all the flashcards

Associative Access

Memory accessed by content (tags or metadata) rather than address.

Signup and view all the flashcards

Access Time (Latency)

Time it takes to perform a read or write operation in random-access memory.

Signup and view all the flashcards

Transfer Rate

Rate at which data can be transferred into/out of memory.

Signup and view all the flashcards

Volatile Memory

Memory that requires power to maintain stored information.

Signup and view all the flashcards

Nonvolatile Memory

Memory that retains stored information even without power.

Signup and view all the flashcards

Memory Organization

Physical layout of bits that forms words in memory.

Signup and view all the flashcards

Cache

Device for staging data movement between main memory and processor registers.

Signup and view all the flashcards

Locality of Reference

Tendency of a computer program to access the same set of memory locations.

Signup and view all the flashcards

Cache Memory

A small, fast memory that stores frequently accessed data.

Signup and view all the flashcards

Cache Hit

When the CPU finds required data in the cache.

Signup and view all the flashcards

Cache Miss

When the CPU does not find required data in the cache.

Signup and view all the flashcards

Miss Penalty

Extra time taken to load data to the cache from main memory when there is a cache miss

Signup and view all the flashcards

Multiple Level Cache

Use of multiple levels of cache to improve performance.

Signup and view all the flashcards

Virtual Memory

Facility that programs leverage to address memory from a logical point of view, regardless of available physical memory.

Signup and view all the flashcards

MMU

Hardware that translates each virtual address into a physical address

Signup and view all the flashcards

Physical Cache

Cache that uses physical memory addresses.

Signup and view all the flashcards

Logical Cache

Cache that uses virtual addresses.

Signup and view all the flashcards

Mapping Function

Algorithm for mapping main memory blocks into cache lines.

Signup and view all the flashcards

Direct Mapping

Maps each block of main memory into only one unique line of the cache

Signup and view all the flashcards

Address Fields

Memory address split into tag (s - r bits), and line field (r bits).

Signup and view all the flashcards

Least significant Bits

Cache design where the lowest bits of a memory address uniquely identify word.

Signup and view all the flashcards

Associative Mapping

Allows each main memory block to be loaded into any line of the cache.

Signup and view all the flashcards

Memory Address Fields

Memory address as tag and word field for main memory.

Signup and view all the flashcards

Set Associative Mapping

Cache lines are grouped into sets; a block maps to one set, then freely within.

Signup and view all the flashcards

Number of sets (v)

Number of sets in Set Associative Mapping

Signup and view all the flashcards

Lines in a set (k)

Number of lines in each set in Set Associative Mapping

Signup and view all the flashcards

Study Notes

  • Computer systems memory characteristics include location, capacity, unit of transfer, method of accessing, performance, physical type, physical characteristics, and organization

Memory Location

  • Internal memory examples: Main memory, registers, control unit, cache
  • External memory includes peripheral storage devices

Capacity

  • Internal memory capacity is measured in bytes or words (1 byte=8 bits)
  • External memory capacity is measured in bytes

Unit of Transfer

  • The number of electrical lines into and out of the memory module (internal memory)

Method of Accessing

  • Sequential access requires accessing data in a specific linear sequence, starting at the beginning until the required memory is accessed. Addressing information separates records, and access time depends on memory location.
    • Example: Magnetic tapes, magnetic disks, and optical memory
  • Random access allows data access at random with consistent access time across all locations, independent of previous access, and is physically wired in addressing mechanism
    • Example: RAM
  • Direct access is a combination of random and sequential access methods
    • Individual blocks have unique addresses and access time depends on memory organization and storage technology
    • Example: Magnetic hard disk
  • Associative access is a random access type of memory using tags or metadata to describe content
    • Desired bit locations are compared within a word for a specified match, and the word retrieved is based on its contents rather than address
    • Each location has its own addressing mechanism with constant access time
    • Example: Cache memory

Performance Parameters

  • Access Time (Latency)
    • For random-access memory: time to perform read or write operation
    • For non-random-access memory: time to position the read-write mechanism at desired location
  • Memory Cycle Time
    • Applies to the system bus, not the processor
    • Access time plus additional time before a second access can commence
  • Transfer Time
    • Data rate transferred into or out of a memory unit

Physical Type

  • Semiconductor memory
  • Magnetic surface memory

Physical Characteristics

  • Volatile Memory (System RAM (DRAM)) requires power to maintain stored information
  • Nonvolatile Memory (Magnetic-surface memories)
  • Non-erasable Memory (Read-Only Memory (ROM))

Organization

  • Physical arrangement of bits forming words

Memory Hierarchy

  • Key characteristics of memory: capacity, access time, cost
  • Key Characteristics Relationship
    • Faster access time = greater cost per bit
    • Greater capacity = smaller cost per bit
    • Greater capacity = slower access time
  • Smaller, more expensive, faster memories are supplemented by larger, cheaper, slower memories
  • Decreasing cost per bit, increasing capacity, increasing access time, decreasing frequency of access of the memory by the processor

Memory Types

  • Registers internal to the processor: fastest, smallest, most expensive memory
  • Cache memory stages data movement between main memory and processor registers to improve performance
  • External mass storage devices: permanent data storage
    • Hard disk and removable media like magnetic disk, tape, and optical storage
  • External, nonvolatile, secondary, or auxiliary memory stores program and data files
  • Disk provides main memory extension known as virtual memory

Cache Memory

  • Cache memory satisfies a single memory reference because of the Locality of Reference
    • Computer programs/processors tend to access the same set of memory locations for a particular time period

Cache Memory Principles

  • Cache contains a copy of portions of the main memory
  • CPU checks if the accessed word of memory is in the cache
  • If not, a block of main memory with a fixed number of words, is read into the cache and then the word is delivered to the processor
  • Cache is intended to give memory speed approaching and large memory size at a less expensive cost

Cache Read Operation

  • RA = read address
    • If the CPU finds the required data or instruction in the cache, it will directly fetch the data from the cache and it is known as a cache hit (no system bus traffic)
    • If the required data or instructions are not found in the cache, it is known as a cache miss (desired address is loaded and data is returned)

Multi Level Cache

  • Improves performance by reducing the "Miss Penalty" which is the extra time taken to load data into the cache from main memory during a cache miss
  • Increase the size and decrease the speed

Cache Organization

  • Includes Address buffer, processor, cache, system bus and data buffer

Cache Memory vs Main Memory

  • Cache consists of m blocks (lines), while main memory consists of M blocks
  • Each line in the cache contains K words and a tag
  • Line size is the length of a line without the tag and control bits
  • Main memory consists of 2^n addressable words, there are K of words in one block

Cache Memory Details

  • Each word in the line is a single byte.
  • A subset of the blocks of memory exists in lines in the cache
  • If a word in a block of memory is read, that block transfers to one of the lines of the cache
  • Each unique line includes a tag to identifies the block being stored
  • Tag = Portion of the main memory address

Elements of Cache Design

  • Cache Addresses
    • Virtual Memory allows programs to address memory from a logical point of view, without regard to the amount of main memory available
      • Address fields of the machine instruction contain virtual addresses
    • Memory Management Unit (MMU) translates virtual address into a physical address in the main memory
      • Two possible ways to place the cache in the computer when virtual addresses are used; Physical cache or Logical cache

Physical vs Virtual Cache

  • Physical Cache stores data using main memory physical addresses
  • Logical Cache (Virtual Cache) stores data using virtual addresses
    • Processor accesses the cache directly, without going through the MMU
    • Access speed is faster than physical cache
    • Virtual memory systems supply each application with the same virtual memory address space

Cache Size

  • Small enough so that the overall average cost per bit is close to that of the main memory
  • Large enough so that the overall average access time is close to that of the cache
  • Limited by available chip and board area

Mapping Function

  • Algorithm is needed for mapping main memory blocks into cache lines.
  • A means is needed for determining which main memory block currently occupies a cache line.
  • Techniques:
    • Direct mapping
    • Associative Mapping
    • Set Associative Mapping

Direct Mapping

  • Maps each block of main memory into only one unique line of the cache
  • Expressed as i = j modulo m
    • i = Cache line
    • j = Main memory block number
    • m = No: of cache lines
  • Taking the least k bits of a binary value is the same as computing that value mod 2k
  • Least significant bits provide the relevant line number

Direct Mapping cont.

  • The least significant w bits identify a unique word
  • the remaining s bits specify one of the 2s blocks of main memory
  • Tag of (s - r) bits (most significant portion) and a line field of r bits
  • latter field identifies one of the lines of the cache
    • Address length = (s + w) bits
    • Number of addressable units = 2(s+w) words or bytes
    • Block size = Line size = 2^w words or bytes
    • Number of blocks in main memory = words or bytes
    • Number of lines in cache =2 =m

Direct Mapping Advantages/Disadvantages

  • A portion of the address is used as a line number providing a unique mapping of each block of main memory into the cache
  • When a block is read into its assigned line, it is necessary to tag the data to distinguish it from other blocks that can fit into that line.
  • The most significant (s - r) bits serve this purpose
  • Simple and inexpensive to implement
  • Main disadvantage = a fixed cache location exists for any given block

Associative Mapping

  • Overcomes the disadvantage of direct mapping by permitting each main memory block to be loaded into any line of the cache
  • Cache control logic interprets a memory address simply as a Tag and a Word field
  • The Tag field uniquely identifies a block of main memory
  • Determines whether a block is in the cache, the cache control logic must simultaneously examines every line's tag for a match
  • Lacks any field in the address corresponding to the line number (therefore, the number of lines in the cache is not determined by the address format)

Associative Mapping cont.

  • Complex circuitry is required to examine the tags of all cache lines in parallel
    • Address length = (s + w)
    • Number of addressable units = 2s+w words or bytes
    • Block size = line size = 2^w words or bytes
    • Number of blocks in main memory = 2s
    • Number of lines in cache undetermined
    • Size of tag = s bits

Set Associative Mapping

  • Combination of both the direct and associative approaches while reducing their disadvantages
  • Cache consists of a number sets, each of which consists of a number of lines.
  • i = Cache set number
  • j = Main memory block number
  • m = Number of lines in the cache
  • v = Number of sets
  • k = Number of lines in each set
  • m = v · k
  • i = j modulo v

Set Associative Mapping cont.

  • Cache lines are grouped into sets, and each set contains a certain number of lines, say k
  • A particular block of main memory can map to only one particular set of the cache
  • Within that set, the memory block can map to any freely available cache line

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser