705 views
0 votes
0 votes
As i am watching Operating System NPTEL videos in PAGING teacher said
Physical Address in Main Memory = (f-1)*P + d
where, f - frame no. ; P- page size & d- offset address within the page.
I want to know why this formula for mapping logical address into physical address has that (f-1) instead of simply f.
According to me, the formula should be
Physical Address in Main Memory = f * P + d
Please Help this is my first question here.

1 Answer

0 votes
0 votes
Suppose Page size=5 words,

then Frame 1 contains 0 To 4 words

similary, Frame 2 contains 5 To 9

So if you want to fInd physical address of words in Frame 3=(3-1)5+offset

ex.frame 3 contains =(3-1)5+0=10,

                                =(3-1)5+1=11,

                                =(3-1)5+2=12,

                               =(3-1)5+3=13,

                               =(3-1)5+4=14,

i.e.(Frame no-1)pagesize +offset

hence (fno-1)ps+offset is correct.

Related questions

0 votes
0 votes
1 answer
3
Raj Singh 1 asked Jan 3, 2019
4,970 views
Physical address is(A) The logical address added by the value in re-locatable registers(B) Re location register – logical address(C) Re location address + relocation re...
1 votes
1 votes
1 answer
4
Richa Sharma asked Jan 22, 2016
2,609 views
Represent the sentence "We are IT students" in physical memory if page size is 5 characters and the entries in page table are-061527310Assume physical memory size to be 5...