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

Please include explanations with answers as I need to be able to understand whic

ID: 3855621 • Letter: P

Question

Please include explanations with answers as I need to be able to understand which number is associated with which term (page offset vs page number, etc. etc.). Thank you.

1. [20 points] Memory Management/Design A. [10 points] Assume a machine has a 16-bit virtual address space and is byte-addressable. The physical memory is 8K bytes (2A13) and the page/frame size is 256 bytes (248). Give the best answer to each of the following with a short justification. If you need to make additional assumptions to give an answer, state the assumptions that you are making [Note: if the answer is a power of 2, leave it in exponential form [0.5pt] How many bits are used for the page offset? [0.5pt] How many bits of virtual address are used for page number? [0.5pt] How many pages are in a process' virtual address space? [0.5pt] How many bits of physical address are used for frame offset? 12pt] How many bits of physical address are used for frame number? 12pt] How many frames are in the physical memory? 12pt] How many bytes would be needed for a page table entry?- 12pt] How many bytes would be needed for a page table of a process? a. b. c. d. e. f. g. h.

Explanation / Answer

Solution :

a)8 bits
here size of page is 256B = 2^8 B
hence 8 bits are used for page offset.

b) 8 bits
Number of pages in virtual memory = 2^16 / 2^8 = 2^8
hence 8 bits are used for page number in virtual address.

c) 2^8 pages
Number of pages in virtual memory = 2^16 / 2^8 = 2^8
each process can have 2^8 pages.

d) 8 bits
frame size = 2^8 B
hence 8 bits are used for frame offset.

e) 5 bits
Number of frames in physical address = 2^13 / 2^8 = 2^5
hence 5 bits are used for frame number out of 13 bits.

f) 2^5 frames
Number of frames in physical address = 2^13 / 2^8 = 2^5

g) 5 bits = 1 byte
each page table entry stores frame number for a page number.
hence there are 2^8 pages.
so there are 2^8 entries.
each entry store corresponding frame number of 5 bits.
hence 5 bits are needed per page table entry.


h) 2^8 bytes
number of bytes for page table for process = bytes per page table entry * number of entries
= 1 * 2^8
= 2^8

if you have any doubts then you can ask in comment section.