Need help with computer architecure problem. A. Can Blocks 0, 2 and 4 be in the
ID: 3867319 • Letter: N
Question
Need help with computer architecure problem.
A. Can Blocks 0, 2 and 4 be in the cache at the SAME time?
YES or NO
B. Can Blocks 0, 1 and 4 be in the cache at the SAME time?
YES or NO
C. Can Blocks 1, 3 and 7 be in the cache at time?
YES or NO
D. Can Blocks 2 and 6 be in the cache at the SAME time?
YES or NO
E. If cache becomes direct mapped, can Blocks 2 and 4 be in the cache at the SAME time?
YES or NO
F. If cache becomes direct mapped, can Blocks 2 and 6 be in the cache at the SAME time?
YES or NO
G. Can Page 0, 1, 2, 6 and 7 be in the Main Memory at the SAME time?
YES or NO
H. Can Page 0, 1, 3, 5 and 7 be in the Main Memory at the SAME time?
YES or NO
I. (15 Pts) Show the address format for virtual address 1816 (specify field name and size) that would be used by the system to translate to a physical address and then translate this virtual
address into the corresponding physical address. (Hint: convert 1816 to its binary equivalent
and divide it into the appropriate fields.) Explain how these fields are used to translate to
the corresponding physical address.
J. Given virtual address 4516.
What frame does the page containing virtual address 4516 maps to?
What physical address does the virtual address 4516 maps to?
Is this a TLB hit?
Is the physical address above in the Cache? If so, what is the set and tag?
K. Given virtual address 2516
What page is the address in?
What is the byte offset?
Is the page in physical memory?
I.You have a byte-addressable virtual memory system with a two-ent ry TLB, a 2-way set associative cache and a page table for a process P. Assume cache blocks of 8 bytes and page size of 16 by each block is represented by a letter. Two blocks equals one frame. tes. In the system below, main memory is divided up into blocks, where Block Page Frame TAG DATA TAG DATA A 0 Set 0 00 Set 00 C 2 D 3 E 4 Cache G 6 Frame Valid Block 4 6.M12 G 4 0 15 Virtual Memory For Process P Page Table Main MemoryExplanation / Answer
A.No they can't be as each set has 2 blocks so when 0,2,4 they give a 0 when mod2 is performed so they all go to set 0 but they are only two blocks so only two are possible one will be replaced.
B.Yes as 0 and 4 can be placed in set 0 and 1 can be placed in set 1 (1 mod 2 = 1 -- will be placed in set 1)
C.No, they cannot as 1,3,7 all three will go to set 1 so not possible
D.Yes it is possible as set 0 have two blocks (2mod2=0, 6mod2=0)
E.if it becomes direct mapped there will be no concept of sets so there will be 4 blocks in cache (0,1,2,3) so when 2 mod 4 = 2 so it will be placed in 2nd block of cache and 4mod4= 0 it should be placed in block 0.Yes it is possible.
F.if it becomes direct mapped there will be no concept of sets so there will be 4 blocks in cache (0,1,2,3) so when 2 mod 4 = 2 so it will be placed in 2nd block of cache and 6mod4= 2 it should be placed in block 0 but 2 is already present so not possible.
G.Yes as the size is limited to 8 blocks they can be placed in there respective blocks, so there is no problem at all.
H.Yes as the size is limited to 8 blocks they can be placed in there respective blocks, so there is no problem at all.
I.(18)16 = (0001 1000)2
the virtual memory has 16 blocks and each has 16 blocks so this will be 4+4 = 8 bits
last three bits will be the offset so it will be 0001--this will define frame 1--this will define block 000--this will define the offset
so it will be frame number will be 1 and block will be 1
so comparing from the page table the 1 is pointing to frame 0 from page table and block bit is 1 so it is D by pointing in main memory
J.(45)16 = (0100 0101)2
so again 0100 --this will be 4 and 0 -- will be 0 and 101---will be offset
so this will be 4 in page table for 1 and block 0 from frame table it is I, yes it is a hit the set is 0 and tag is 01 which can be inferred from cache table.
K.similarly like above (25)16 = (0010 0101)2
0010 this will be 2 and 0 will be block number 101 will be the offset ,No this is not present in the main memory