7) In a system with main memory size is 256 bytes (byte addressable) Page/Frame
ID: 3685134 • Letter: 7
Question
7) In a system with main memory size is 256 bytes (byte addressable) Page/Frame size is 16 bytes, process size is 64 bytes.
a). How many bits are there in the logical address?
b). How many bits are there for the offset?
c). How many bits are there for page number?
d). How many frames are there?
e). How many pages are there?
8) In the system described in question 7, given the following page table, translate the logical addresses to the physical addresses
8 a) 00001010
4 a)00010101
2 c)00101011
1 d)00111111
Explanation / Answer
7)
Main memory size = 256 bytes
Page/Frame size = 16 bytes
Process size = 64 bytes
a)
Total number of pages = main memory size/page size
= 256/16
= 16
Size of logical address space = number of pages * page size
= 16*16
= 2^8
Therefore, the number of bits for the logical address is 8.
b)
The page size is 16 bytes which is equal to 2^4.
Therefore, 4 bits are there for the offset.
c)
Page number = process size/page size
= 64/16
= 4
= 2^2
Therefore, the number of bits required for page number is 2.
d)
Total number of frames = main memory size/frame size
= 256/16
= 16
Therefore, the total number of frames is 16.
e)
Total number of pages = main memory size/page size
= 256/16
= 16
Therefore, the total number of pages is 16.
8)
The page table is
8 a) 00001010
4 b) 00010101
2 c) 00101011
1 d) 00111111
For the first entry, logical address is 00001010. First 4 bits represents the logical page number, last 4 bits represents the offset within page. Replace the logical page number with the frame number in the page table to the corresponding logical address.
Now, the physical address is 10001010 which is equal to 138.
For the second entry, logical address is 00010101. First 4 bits represents the logical page number, last 4 bits represents the offset within page. Replace the logical page number with the frame number in the page table to the corresponding logical address.
Now, the physical address is 01000101 which is equal to 69.
For the third entry, logical address is 00101011. First 4 bits represents the logical page number, last 4 bits represents the offset within page. Replace the logical page number with the frame number in the page table to the corresponding logical address.
Now, the physical address is 00101011 which is equal to 43.
For the fourth entry, logical address is 00111111. First 4 bits represents the logical page number, last 4 bits represents the offset within page. Replace the logical page number with the frame number in the page table to the corresponding logical address.
Now, the physical address is 00011111 which is equal to 31.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.