in Operating System edited by
619 views
0 votes
0 votes
A page table contains the index (i.e the page number ) and the base address of each page in physical memory( i.e frame number at that index). So how is the mapping between page number and frame number is done? Is it done randomly by the OS based on the available memory frame locations?
in Operating System edited by
619 views

1 Answer

0 votes
0 votes
Address translation of logical memory to physical memory done by MMU. MMU is basically called relocation register add with  logical address and stored it that specific location of memory

Paging is done when memory is noncontiguous. Page number of logical address are index of page table . Now suppose page size is 4B.   And we see from page table page 0 is mapped in frame 5. then logical address 0 is mapped in physical address 5⨉4+0=20

2 Comments

I got how mapping is done between logical address and physical address using frame number and offset. But, as you said page 0 is mapped to frame 5. My Question was, is this mapping(between page number and frame no) done by OS/MMU randomly based on the available free frames in memory. Basically how did page 0 got mapped to frame 5?
0
0
yes it based on available free frames
0
0

Related questions