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

Problem 2: Assume that the OS is using a memory paging method, memory pages are

ID: 3569439 • Letter: P

Question


Problem 2: Assume that the OS is using a memory paging method, memory pages are 512 words long, instructions are 4-word long, and each address in memory accesses only one word. A page table for a particular process is given below: Calculate a stalling physical memory address for each of the following instructions. If the address cannot be calculated using the page table and the given info, say why not. 1 page = 512 words | 512 words /4 word-long instructions = 128 instructions per page instruction #52 | 152 * 4 = 2081 page 1 instruction #369|| instruction #512 instruction #612 instruction #640

Explanation / Answer

Each address in memory accesses only one word. We need to find the word to which the instruction belongs

1 page --------> 512 words -----------> 512/4 = 128 instructions

Hence,

          Memory = 52*4

                          =208

Instruction #52 is page 1.

Memory = 113*4

               = 452

               = 452+512*1

              = 964

              Instruction #369 is page 2

Memory =128*4 = 512

                             =512+ 512*3

                             =2048

Instruction #512 is page 4.

Memory =100*4 =400

                            =400+512*4

                            =2448

     Memory =128*4=512`

                    = 512 + 512*5=3072

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote