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)?
- A. 7
- B. 104
- C. 8
- 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 से क्रमांकित)?
- A. 7
- B. 104
- C. 8
- D. 40
उत्तर: B. डायरेक्ट मैपिंग में लाइन = ब्लॉक mod लाइनों की संख्या = 1000 mod 128 = 1000 − 896 = 104। भागफल 7 टैग का भाग बनता है, लाइन संख्या का नहीं।
More Computer Awareness questions
- A 64 KB direct-mapped cache uses 16-byte blocks, and the processor issues 32-bit byte addresses. How is each address split?
- Which cache-mapping technique lets any memory block be placed in any cache line, at the cost of comparing its tag with every line at once?
- A loop counter is read and updated on every pass of a loop, and so it stays in the cache. Which property of programs does this exploit?
- When the CPU reads a word from main memory, which two registers hold the address being accessed and the data that arrives?
- A processor has a 16-bit data bus and moves one word on each bus cycle at 8 MHz. What is the maximum data transfer rate?
- A 4K × 8 memory is to be built from 1K × 4 RAM chips. How many chips are needed, and how many address lines does the full memory require?