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

6. Assume a computer is word addressable with 1G of addresses and is running a p

ID: 3827428 • Letter: 6

Question

6. Assume a computer is word addressable with 1G of addresses and is running a process whose page table is given below. Answer the following questions.

a. How big is a page/frame in words?

b. What is the physical address for the logical address 1010000000000000?

c. What is the physical address for the logical address 0011001100110011?

d. What is the physical address for the logical address 0110111100001111?

e. How large is this program (approximately) in words?

f. How much of the program is in memory?

Frame Number Page Number 91 158 13 6 0 4008 418 10 662 Valid Bit

Explanation / Answer

Taking the given example into consideration the following conclusions can be made.

Since, the process has 12 pages numbered from 0 to 11, we need minimum of 4 bits to represent page number in the logical address. The logical addresses given in the questions contains 16 bits in total. If 4 bits are required to represent page number, the remaining 12 bits can be used for representing offset within a page. 12 bits offset is used to get a word within a page of size 212 words.

So, according to given example, answers are as follows.

a) A page or frame is of 212 words in size. i.e., a page or a frame can contain 212 words.

b) The physical address for the logical address 1010000000000000 is 000000001010010110000000000000.

Explanation: The most significant 4 bits of the logical address is 1010 which is equal to 10 in decimal. This gives us the page number. Using this as index to the page table we get 662 which is the frame number in which page 10 is loaded. The remaining 12 bits of logical address is used as it is as offset within the page.

c) The physical address for the logical address 0011001100110011 does not exist as the page 3 is not yet loaded into physical memory. Its a page fault.

d) The physical address for the logical address 0110111100001111 is 000000000000000000111100001111.

Explanation: The most significant 4 bits of the logical address is 0110 which is equal to 6 in decimal. This gives us the page number. Using this as index to the page table we get 0 which is the frame number in which page 6 is loaded. The remaining 12 bits of logical address is used as it is as offset within the page.

e) this program (approximately) is of size 12X212 words. This is because the page size is212 words and the process is conatining 12 pages from 0 to 11.

f) Only 7 pages among the 12 pages are loaded into memory. They are

Page 0 is loaded into frame 91 of physical memory

Page 2 is loaded into frame 158 of physical memory

Page 5 is loaded into frame 13 of physical memory

Page 6 is loaded into frame 0 of physical memory

Page 7 is loaded into frame 408 of physical memory

Page 9 is loaded into frame 418 of physical memory

Page 10 is loaded into frame 662 of physical memory

Each page is of size 212 words. and since 7 such pages are loaded into physical memory totally 7X212 words of the program are in physical memory.

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