A.
Virtual address:
Virtual page number (VPN) and virtual page offset (VPO) are the two components of virtual address. Virtual address is “14 bits” format.
B.
The page size (P) is 64bytes; using the page size find the number of bits in VPN.
The formula for page size as follows:
Substitute “P = 64” in the above formula
Therefore, the “p” value represents virtual page offset (VPO) and physical page offset (PPO).
Number of bits in VPN is calculated as follows:
n = 14
p = 6
The VPN has additional two more components. They are TLB tag (TLBT) and TLB index (TLBI). The TLB is “4 ways” associative with “16” entries totally. Using the TLB find the value of TLBI and TLBT.
The formula for TLB as follows:
Substitute “T = 4” in the above formula
Therefore, the “t” value represents TLBI.
TLBI and TLBT are calculated as follows:
The “t” value represents TLBI. Therefore, the value of TLBI is “2”.
TLBI = 2
VPN = 8
Therefore, the value of TLBT is “6”.
C.
Physical address:
Physical page number (PPN) and physical page offset (PPO) are the two components of physical address. Physical address is “12 bits” format. The physical page offset (PPO) is identical to the virtual page offset (VPO).
D.
The physical address has additional three more components. They are Byte offset within cache block (CO), Cache index (CI) and Cache tag (CT).
Want to see the full answer?
Check out a sample textbook solutionChapter 9 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
- Please help with a, b, and c: Consider a virtual memory system that uses paging and a translation lookaside buffer (TLB) to cache the most recent virtual page-to-physical page translations. The following assumptions are made: The memory is byte addressable. Memory accesses are to 4-byte words. Virtual addresses are 20 bits wide. Physical addresses are 16 bits wide. The page size is 4096 bytes. The TLB is 4-way set associative with 16 total entries. The contents of the TLB and the page table for the first 32 pages are shown in the figure below: TLB Page Table Index Tag PPN Valid VPN PPN Valid VPN PPN Valid 0 03 B 1 00 7 1 10 6 0 07 6 0 01 8 0 11 7 0 28 3 1 02 9 1 12 8 0 01 F 0 03 A 1 13 3 0 1 31 0 1 04 6 0 14 D 0 12 3 0 05 3 0 15 B 0 07 E 1 06 1 0 16 9 0…arrow_forward5. Suppose a byte-addressable computer using set-associate cache has 2^21 bytes of main memory and a cache of 64 blocks, where each cache block contains 16 bytes. a) If this cache is 2-way set associative, what is the format of a memory address as seen by the cache; that is, what are the sizes of the tag, set, and offset fields? b) If this cache is 4-way set associative, what is the format of a memory address as seen by the cache; that is, what are the sizes of the tag, set, and offset fields?arrow_forward1)Encode the binary data 1010101010 into an even parity Hamming code. 2)A direct mapped cache consists of 256 slots. Main memory contains 64K blocks of 16 words each. Access time of the cache is 15 ns, and that for the main memory is 120 ns. Assume that main memory is accessed in parallel with cache look up. Initially, the cache is empty. (a) Give the format of the memory address. (b) Compute the effective access time, if suppose the hit ratio for read is 90%.arrow_forward
- Question 1 Consider the size of main memory as 32 Bytes and the size of cache memory as 8 Bytes. Implement the Set-Associative mapping technique. Do the following: a) Find the number of bits to address 32 bytes in main memory b) Write the formula to map block of main memory to set of cache memory c) Find the block size, line size, set size, tag size d) Draw the figure to show the distribution of main memory in desired blocks containing bytes e) Draw the figure to show the distribution of cache memory in desired lines containing tag numbers, respective blocks, and byte numbers f) Show the tag allocation for each set (and line) of cache memoryarrow_forwardinstruction is in the first picture cacheSim.h #include<stdlib.h>#include<stdio.h>#define DRAM_SIZE 1048576typedef struct cb_struct {unsigned char data[16]; // One cache block is 16 bytes.u_int32_t tag;u_int32_t timeStamp; /// This is used to determine what to evict. You can update the timestamp using cycles.}cacheBlock;typedef struct access {int readWrite; // 0 for read, 1 for writeu_int32_t address;u_int32_t data; // If this is a read access, value here is 0}cacheAccess;// This is our dummy DRAM. You can initialize this in anyway you want to test.unsigned char * DRAM;cacheBlock L1_cache[2][2]; // Our 2-way, 64 byte cachecacheBlock L2_cache[4][4]; // Our 4-way, 256 byte cache// Trace points to a series of cache accesses.FILE *trace;long cycles;void init_DRAM();// This function print the content of the cache in the following format for an N-way cache with M Sets// Set 0 : CB1 | CB2 | CB 3 | ... | CB N// Set 1 : CB1 | CB2 | CB 3 | ... | CB N// ...// Set M-1 : CB1 | CB2 | CB…arrow_forwardProblem 4. There are two levels L1 and L2 of caches. L1 has hit rate 95%, and L2 has hit rate 80%. L1 has I cycle to access. L2 has 20 cycles to access. Memory has 400 cycles to access. Ignoring memory access clocks per instruction (CPI) has 1 cycle. Assume that 40% instruction has data access. Compute the CPI that includes memory access. You need to consider that there is a memory access to fetch each instruction.arrow_forward
- 17. a) Consider an application running on a multiprocessor system that takes 600 cycles,(during which processors are stalled), to handle a local cache miss leading to referencing a remote memory. The CPI for all references that hit in cache is 1 cycle. If 0.2% of cache access result in a local miss, how much faster will the system run if it has a perfect cache that never miss.arrow_forwardQ.A direct-mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required to fill a cache slot from main memory is 300ns. (This time allows us to determine that the block is missing and bring it into cache.) Assume that a request is always started in parallel to both cache and to main memory (so if it is not found in cache, we do not have to add this cache search time to the memory access). If a block is missing from cache, the entire block is brought into the cache and the access is restarted. Initially, the cache is empty.Q.) Compute the hit ratio for a program that loops four times from addresses 0x0 to 0x43 in memory.arrow_forwardQ.A direct-mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required to fill a cache slot from main memory is 300ns. (This time allows us to determine that the block is missing and bring it into cache.) Assume that a request is always started in parallel to both cache and to main memory (so if it is not found in cache, we do not have to add this cache search time to the memory access). If a block is missing from cache, the entire block is brought into the cache and the access is restarted. Initially, the cache is empty.Q.) Show the main memory address format, which allows us to map addresses from main memory to cache. Be sure to include the fields as well as their sizes.arrow_forward
- 5. A computer of 32 bits has a cache memory of 64 KB with a cache line size of 64 bytes. The cache access time is 20 ns, and the miss penalty is 120 ns. The cache is 2-way associative. a) What is the number of cache lines? b) What is the number of cache sets? c) What is the number of lines per set? d) Draw a scheme of this cache. e) Calculate the time to read a word in case of miss.arrow_forwardPlease help with detailed explanation for problem C, don't copy solutions from other sources. Consider a byte addressing architecture with 64-bit memory addresses. a)Which bits of the address would be used in the tag, index and offset in a direct-mapped cache with 512 1-word blocks. b)Which bits of the address would be used in the tag, index and offset in a direct-mapped cache with 64 8-word blocks. c)What is the ratio of bits used for storing data to total bits stored in the cache in each of the above cases a and b?arrow_forwardB.12) For each of the following cases, first say if the sequence of events is possible or not. Then, in those cases where it is not possible, explain why it is not possible. a) TLB hit, Cache hit b) TLB miss, Page table entry valid, Cache hit c) TLB miss, Page table entry valid, Cache miss d) TLB miss, Page table entry invalid (Page Fault), Cache hit (after the page fault is handled, the TLB is updated, and the access is restarted and the TLB now hits).arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education