Preview File Edit View Go Tools Window Help caching exercise p & 14% D Mon Apr 2
ID: 3824589 • Letter: P
Question
Preview File Edit View Go Tools Window Help caching exercise p & 14% D Mon Apr 24 2:24:54 PM a E a caching exercise.pdf (page 1 of 3 Ed Search 2. Consider the following (hypothetical CPU LI cache and MMU specification. Cache specification: 8-bit CPU (physical and virtual memory addresses have 8 bits) and byte- addressable memory 8-entry total number of cache lines), 2-way set associative L1 cache. Cache line size: 8 bytes Cache architecture based on PIPT (physically indexed, physically tagged) MMU specification 8-bit virtual addresses. Single-level paging (i.e., single page table). Page size 6 bytes a. How many bits do we need for the i.) tag, ii.) cache index, and iii) cache offset? Describe why. b. How many bits do we need for i.) page offset, and ii) page number of the virtual address? c. If you look at the tag bits in the cache below, you will find the same tag bits associated with different cache lines. i. Is it possible for the same tag to be in different cache lines corresponding to different indices? Explain your answer. ii. Is it possible for the same tag to be in different cache lines corresponding to the same index (but a different way)? Explain your answer. d. Consider the page table and cache (with contents below. First, determine the physical address for each of the VIRTUAL addresses given below.Explanation / Answer
In order to determine the physical address for each of the virtual address, we have to follow the below steps-
- Firstly, each page size is 4096 bytes so, we need 12 bits of reference each memory address in the page.
- Now let's translate 0xE12C to binary 0xE12C = (1110 0001 0010 1100) in base 2.
- Last 4 bits will be our key to the PageTable to find the corresponding frame.
- Entry 14 in P.T => Page frame 3. Let's concatenate it to the 12 offset bits.
Like, (0011 0001 0010 1100) = 0x312C
- Let's do 0x3A9D
In this way, We will be able to determine the physical address corresponding to the Virtual address.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.