Assume a program has 510 bytes and will be loaded into frame
Assume a program has 510 bytes and will be loaded into frames of 256 bytes each, and the instruction to be used is at byte 495, answer the following questions: How many pages are needed to store the entire job? What is the page number and the displacement for the instruction in question?
Solution
1 Frame = 256 bytes
So 510 bytes of program needs = 2 Frames
a.
Size of page is equal to size of frame . So pages needed to store the entire job = 2 Pages
b.
For instruction at byte 495,
Page number = 2
displacement = 495 - 256 = 239
| page 1(256 bytes) | page 2(256 bytes) |
