778 views
4 votes
4 votes
A certain computer provides its users with a virtual address of $20$ bits, the physical address of $32$ bits. The system uses demand paged environment with page size is $4K$ bytes. Find the corresponding physical address of the virtual address $0x12345$. Consider first $20$ pages fit in frames starting from $10$ to $30$ frames and frame index start with $0$.

4 Answers

2 votes
2 votes

i think as the virtual address is smaller than the physical address it cannot reference all the physical locations so it can only reference only equal locations as it is having 20 bits out of which 12 are for page offset so 8 only for accessing the page table mapping's

4K IS 212  --12 bits

 0001 0010 0011 0100 0101 ---0x12345

first 20 pages fit in frames starting from 10 to 30frames and frame index start with 0

so 12 is the page frame will be at 10+12 =22 (as index is at 0)

0 votes
0 votes
page no bit are 8 and offset are 12 bit show. from given Address 0001 0010 0011 0100 0101.

page no will be 0001 0010 show it will be 18 and your in you physicam memory mapping start from 10 show add 10 +18 = 28

physical address will be 28*4KB + 0X345 == 28 * 4*1024 + 837= 115525.

Related questions

2 votes
2 votes
1 answer
3
3lurryface asked Jan 9, 2019
1,053 views
If there is 2 or more level paging for processes, is it possible to have more than 1 page fault while accessing any single addressable unit(byte or word) ?
2 votes
2 votes
2 answers
4