Computer AwarenessVery hardIBPS SO IT Officer

A direct-mapped cache has 128 lines. Main-memory block number 1000 is placed in which cache line (lines numbered from 0)?

  1. A. 7
  2. B. 104
  3. C. 8
  4. D. 40

Correct answer: B. 104

Direct mapping uses line = block mod number of lines = 1000 mod 128 = 1000 − 896 = 104. The quotient 7 becomes part of the tag, not the line number.

हिंदी में

एक डायरेक्ट-मैप्ड कैश में 128 लाइनें हैं। मुख्य-मेमोरी ब्लॉक संख्या 1000 किस कैश लाइन में रखा जाता है (लाइनें 0 से क्रमांकित)?

  1. A. 7
  2. B. 104
  3. C. 8
  4. D. 40

उत्तर: B. डायरेक्ट मैपिंग में लाइन = ब्लॉक mod लाइनों की संख्या = 1000 mod 128 = 1000 − 896 = 104। भागफल 7 टैग का भाग बनता है, लाइन संख्या का नहीं।

More Computer Awareness questions

Exams that ask this topic