Consider a machine with a byte addressable main memory of 216 bytes and block size of 8bytes.Assume that a direct mapped cache consisting of 32 lines is used with this machine.• How is a 16-bit memory address divided into tag, line number, and byte number?• Into what line would bytes with each of the following addresses be stored?000100010001101111000011001101001101000000011101• Suppose the byte with address 0001101000011010 is stored in the cache. Whatare the addresses of the other bytes stored along with it?• How many total bytes of memory can be stored in the cache?
Question
Consider a machine with a byte addressable main memory of 216 bytes and block size of 8bytes.Assume that a direct mapped cache consisting of 32 lines is used with this machine.• How is a 16-bit memory address divided into tag, line number, and byte number?• Into what line would bytes with each of the following addresses be stored?000100010001101111000011001101001101000000011101• Suppose the byte with address 0001101000011010 is stored in the cache. Whatare the addresses of the other bytes stored along with it?• How many total bytes of memory can be stored in the cache?
Solution
-
Division of 16-bit memory address into tag, line number, and byte number:
The cache has 32 lines, which is 2^5, so we need 5 bits for the line number. The block size is 8 bytes, which is 2^3, so we need 3 bits for the byte number. The remaining bits are used for the tag. So, a 16-bit address is divided as follows: 8 bits for the tag, 5 bits for the line number, and 3 bits for the byte number.
-
Line numbers for the given addresses:
- 0001000100011011: The line number is the 5 bits after the first 8 bits, which is 10001, or 17 in decimal.
- 1100001100110100: The line number is 00110, or 6 in decimal.
- 1101000000011101: The line number is 00000, or 0 in decimal.
-
Addresses of other bytes stored with 0001101000011010:
The address 0001101000011010 corresponds to line number 00001 and byte number 010. So, the other bytes stored along with it would have the same tag and line number, but different byte numbers. They would range from 0001101000011000 to 0001101000011011.
-
Total bytes of memory that can be stored in the cache:
The cache has 32 lines and each line can store a block of 8 bytes. So, the total memory that can be stored in the cache is 32 * 8 = 256 bytes.
Similar Questions
Consider a direct mapped cache of size 16 KB with block size128 bytes. The size of main memory is 256 KB. Find thenumber of bits in the tag, line and word/line offset in mainmemory address
The main memory size is 1GBThe Block size in main memory is 4 BytesThe Cache memory size is 64KBytesThe Line size is 4 BytesOrganization used is One Way Set Associative.The block number 81923 will be mapped to the following line number........
Consider a 32-bit processor that uses a direct-mapped cache with a total capacity of 2KB with 64B cache blocks. Reminder: K = 210The table below provides a list of memory address that a program accesses, where the top address is accessed first. Assume the cache is initially empty, so that the first access is a miss. Which of these accesses result in a cache hit?
A digital computer space has a memory unit of 64k x 16 and a cache memory of 1k words. How manybits are there in the tag of the address format?*810166
The main memory size is 2GBThe Block size in main memory is 4 BytesThe Cache memory size is 64KBytesThe Line size is 4 BytesOrganization used is One Way Set Associative.The size of the Tag field in a Line Entry is
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.