Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q2.03 points) Assume that the following section of main memory is used to store

ID: 3597583 • Letter: Q

Question

Q2.03 points) Assume that the following section of main memory is used to store the pa table for 3 different processes. The page-table base register values for process P1 is 108 for P2 is 1085, and for P3 is 1090. Assume that the contests of memory below correspo to frame numbers. Also assume that frame size is 4096 contents 3 5 8 4 7 2 01511 186 20 24 9 10 13 30 38 40 addresses 0 0 000 00 0 00 0 00 0 0 00 0 0 77778 888 888888 9999 9 67 890 1 23 4 5 678 9 0 1 23 4 To which physical memory address would the logical address (1, 1200) correspond to it generated by P1? Answer To which physical memory address would the logical address (3, 800) correspond to if generated by P2? Answer Assume that each process has 5 pages. To which process does the following physical address belong and which logical address corresponds to each physical address: Physical address 57344 Process Logical address Physical address 57343 Process Logical address

Explanation / Answer

Logical address (1,1200) generated by P1 means, adding 1 to base register of P1 and adding 1200 offset for the byte in page. Since 1080 is base base register value of P1, adding 1 will make 1081 and contents at 1081 is 2, which is the frame number. Since frame size is 4096 byte. Therefore starting address of frame 2 = 2*4096 = 8192. Adding 1200 offset, physical address will be = 8192+1200 = 9392

Similarly logical address (3,800) generated by P2, adding 3 to base register of P2, the value become 1085+3=1088. The content at 1088 is 24. Thus 24 is the frame number. Starting address of 24th frame = 24*4096 = 98304

Adding offset 800, the physical address = 99104

To identify frame number corresponding to physical address, we will divide it by 4096.

So for physical address 57344, frame number = 57344/4096 = 14. Thus 14th frame number will have physical  address 57344 in it. Since none of the contents having frame number 14, so this frame is not in logical address for the given situation.

For physical address 57343, frame number = integer(57343/4096) = 13. Thus 13th frame is holding 57343 and the offset = 57343-13*4096 = 4095. Thus 4095 is the offset value. Since memory address 1091 have content value 13, and process P3 have base address 1090, since 1091 = 1090+1 . So 1 is the index added to base register of P3. So logical address(1,4095) generated by P3 will corresponds to physical address 57343