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&MOD MSGT/ET SA AC PKG
- operating systemarrow_forwardQuestion 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_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_forward
- #1#.arrow_forwardComputer Science Problem 3. It should be obvious why the block offset bits are the least-significant bits of the address. But why are the set index bits in the middle of the address? Why not use the most significant bits for the set index, and have the tag be the middle part of the address?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
- 6arrow_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_forward4arrow_forward5. 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_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