Question

A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes=ca...

A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes=cache line. Determine (1) the number of comparators needed and (2) the size of the tag field, for the following mapping scheme: Direct.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Given:

Main Memory size = 64KB = 2^6 KB = 2^6*2^{10} B = 2^{16} B

Cache size = 4KB = 2^2 KB = 2^2*2^{10} B = 2^{12} B

Cache line size = Block Size = 8 B = 2^{3} B

In Direct mapping,the address is divided into 3 fields. They are Tag bits, Line number, Block off-set represented as:

TAG LINE NUMBER BLOCK-OFFSET

From the given data we get,

Total number of bits in address = 16 (since main memory size = 2^{16} B)

Number of bits in block off-set = 3 (since block size = 2^{3} B)

Number of lines = \tiny \frac{Cache Size}{Block Size} = \tiny \frac{2^{12}}{2^3} = 2^9

Therefore, number of bits in line number = 9.

Finally, number of tag bits can be calculated as:

(Number of bits in main memory) - (Number of bits in block off-set + Number of bits in line number)

Number of tag bits = 16 - (9 + 3)

Tag bits = 16 - 12 = 4

(1) The number of comparators needed in direct mapping scheme = one

(2) The size of Tag field = 2^4 B = 16 B

Note:

1 KB = 2^{10} B

Add a comment
Know the answer?
Add Answer to:
A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes=ca...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes/ca...

    A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes/cache line. Determine (1) the number of comparators needed and (2) the size of the tag field, for each of the following mapping schemes: a. Fully associative A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes/cache line. Determine (1) the number of comparators needed and (2) the size...

  • Please refer the following memory system : Main memory : 64 MB Cache memory: 64 KB...

    Please refer the following memory system : Main memory : 64 MB Cache memory: 64 KB Block size of 1 KB 1. Direct Mapping Offset bits? Number of lines in cache? Line number bits? Tag size? 2. Fully Associative Mapping Offset bits? Tag size? 3. 2-way set-associative mapping Offset bits? Number of lines in cache? Set number bits? Tag size? 4. 4-way set-associative mapping Offset bits? Number of lines in cache? Set number bits? Tag size?

  • Assume the cache can hold 64 kB. Data are transferred between main memory and the cache...

    Assume the cache can hold 64 kB. Data are transferred between main memory and the cache in blocks of 4 bytes each. This means that the cache is organized as 16K=2^14 lines of 4 bytes each. The main memory consists of 16 MB, with each byte directly addressable by a 24-bit address (2^24 =16M). Thus, for mapping purposes, we can consider main memory to consist of 4M blocks of 4 bytes each. Please show illustrations too for all work. Part...

  • 1- A 64-bit computer system employs a 16Gbyte main memory and a 32 Kilo word cache. Determine the...

    1- A 64-bit computer system employs a 16Gbyte main memory and a 32 Kilo word cache. Determine the number of bits in each field of the memory address register (MAR) as seen by cache in the following organizations (show your calculations): Fully associative mapping with line size of 2 words. A. Direct mapping with the line size of 8 words. B. C. 4-way associated mapping with the line size of 1 words. 1- A 64-bit computer system employs a 16Gbyte...

  • Problem 6. Suppose we have a computer with 32 megabytes of main memory, 256 bytes of...

    Problem 6. Suppose we have a computer with 32 megabytes of main memory, 256 bytes of cache, and a block size of 16 bytes. For each configuration below, determine the memory address format, indicating the number of bits needed for each appropriate field (i.e. tag, block, set, offset). Show any relevant calculations. Direct cache mapping and memory is byte-addressable a) Direct cache mapping and memory is word-addressable with a word size of 16 bits b) c) 2-way set associative cache...

  • For a given computer system, the main memory is 256Mbyte; word size is 4 bytes; block...

    For a given computer system, the main memory is 256Mbyte; word size is 4 bytes; block size is 64 bytes; cache size is 64 Kbytes. what is the number of cache line? Question 3 options: A 64Kbyte/4bytes B 256Mbyte/4bytes C 256Mbyte/64bytes D 64Kbyte/64bytes Question 4 (3 points) Consider a magnetic disk drive with 8 double sided platters, 2000 tracks per disk surface. Each track has a capacity 2048 KBytes. Sector size is 2KBytes. What is the capacity of acylinder? Question...

  • Suppose a computer using a fully associative cache has 232 bytes of byte-addressable main memory and...

    Suppose a computer using a fully associative cache has 232 bytes of byte-addressable main memory and a cache of 1024 blocks, were each cache block contains 32 bytes. Consider a memory address as seen by the cache. How many bits are in the tag field?

  • For a direct-mapped cache memory, the following data is given.                    Main memory              &nb

    For a direct-mapped cache memory, the following data is given.                    Main memory                                       Cache memory            Size = 64KB                                               Size = 128B           Block size = 8Bytes                                    Block size = 4Bytes Calculate the following: Number of blocks created in main memory. Number of blocks created in cache memory. The distribution of the address fields in the system. Q5. For a direct-mapped cache memory, the following data is given. Main memory Cache memory Size...

  • A 64-bit word computer employs a 128KB cache. The address bus in this system is 32-bits....

    A 64-bit word computer employs a 128KB cache. The address bus in this system is 32-bits. Determine the number of bits in each field of the memory address register (MAR) as seen by cache in the following organizations (show your calculations):  a. Fully associative mapping with line size of 1 word. b. Fully associative mapping with line size of 4 words c. Direct mapping with the line size of 1 word. d. Direct mapping with the line size of 8...

  • Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped...

    Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped cache with a block size of 16 Bytes. Sought: Calculate the cache line number when Byte address2271len from main memory is mapped to cache. Consider that numbering of main memory blocks and cache lines starts from zero. Express your answer in hexadecimal. It is required to show ALL incremental steps of the solution.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT