2 votes 2 votes 16 bit virtual address space 20 bit physical address space Page Table 0x1F 0x3F 0x23 0x17 What are the physical address for virtual address 0xF0F0 and 0x001F? srestha asked Dec 22, 2017 • edited Dec 22, 2017 by srestha srestha 948 views answer comment Share Follow See all 10 Comments See all 10 10 Comments reply Show 7 previous comments srestha commented Dec 23, 2017 reply Follow Share But in ans they broke VA in 2 and 14 bits, plz chk it 0 votes 0 votes Anu007 commented Dec 23, 2017 reply Follow Share looks like i was correct 0 votes 0 votes krish__ commented Dec 26, 2017 reply Follow Share @Anu Sir, the page table is supposed contain all entries for each page present in the process and trap is generated when the valid bit is zero. You were right in choosing 2 bits for the Pg.no since there are only 4 entries in the page table. And moreover simply hex with 2 digits doesn't mean that the frame number is supposed to contain 8 bits. If you observe the frame numbers given, i.e: 0x1F 0001 1111 0x3F 0011 1111 0x23 0010 0011 0x17 0001 0111 The 2 MSB bits are always 0 here. So, saying that 2-hex digits denote 8 bits isn't right. So please make it an answer. 0 votes 0 votes Please log in or register to add a comment.
Best answer 6 votes 6 votes Here Page table entry is described by 8 bits. Hence block offset = 20-8 = 12 bits. Now in virtual address => total bits - block offset = bits for pages = > 16-12 = 4 bits (Hence pages must be 16) but given only 4 in PT. Still for virtual address 0xF0F0 = 1111 0000 1111 0000 => last 12 bits = block offset AND first 4 bits = page Number. Page is not present Hence Physical address =NA for virtual address 0x001F = 0000 0000 0001 1111 => last 12 bits = block offset AND first 4 bits = page Number. I have taken it as first page(since page number =0000). Hence Physical address = Frame No + offset = 0x1F01F Ashwin Kulkarni answered Dec 22, 2017 • selected Dec 26, 2017 by joshi_nitish Ashwin Kulkarni comment Share Follow See all 2 Comments See all 2 2 Comments reply Sona Barman commented Dec 25, 2017 reply Follow Share Page table entry is described by 8 bits.how? Clarification is needed.Becsuse we can't solve question like this.There is a chance of committing mistake.Logic and calculation both should be clear. 0 votes 0 votes Ashwin Kulkarni commented Dec 26, 2017 reply Follow Share 0x1F this hex code can be written as 0001 1111 hence this each entry has 8 bits 0 votes 0 votes Please log in or register to add a comment.