Consider a nontrivial cache memory organization with m > 1 lines in which the…

2017

Consider a nontrivial cache memory organization with m > 1 lines in which the cache is divided into v sets, each of which consists of k lines. The set-associative mapping reduces to direct mapping when:

Answer: C. v = m and k = 1CONCEPT — A v-set, k-way set-associative cache contains m = v × k cache lines. Direct mapping is the one-way special case: every set contains exactly one…

  1. A.

    v = m and k = m

  2. B.

    v = 1 and k = m

  3. C.

    v = m and k = 1

  4. D.

    v = 1 and k = 1

Attempted by 215 students.

Show answer & explanation

Correct answer: C

CONCEPT — A v-set, k-way set-associative cache contains m = v × k cache lines. Direct mapping is the one-way special case: every set contains exactly one candidate cache line, so k = 1.

APPLICATION — For the stated nontrivial cache, substituting k = 1 into m = v × k gives m = v × 1 = v. Therefore the matching pair is v = m and k = 1.

CONTRAST — The remaining pairs describe different organizations or capacities:

  • v = m and k = m gives v × k = m² lines, not the stated m lines when m > 1.

  • v = 1 and k = m gives one set holding all m lines, the fully associative case.

  • v = 1 and k = 1 gives a one-line cache, which conflicts with the stated m > 1 capacity.

CROSS-CHECK — With v = m and k = 1, each block index selects exactly one of m sets, and that set contains exactly one line. This reproduces the defining placement rule of a direct-mapped cache.

Explore the full course: Niacl Ao It Specialist

Loading lesson…