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?