How to calculate number of bits in logical address and physical address when logical address space of 8 pages of 1024 word each, mapped to physical memory of 32 frames?
we know that logical address spaces is = total no of bits required to represent total no of pages + bits required to map page offset . Hence total bits required = 3 (because total no of pages is 8 and to represent you need three bits) + 10 (page offset is 1024 so you need 10 bits) = 13 bits all total.
Given a logical address; split it into pieces like: offset_in_page = logical_address % page_size; page_table_index = logical_address / page_size; Then get the physical address of the page from the page table: physical_address_of_page = page_table[page_table_index].
Calculation of the number of bits required for Logical Address: # Logical Address Space (LAS) = Size of process. # Logical Address Space (LAS) is divided into an equal number of pages. # Page size is always a power of 2.
15 is the correct answer
i think this is correct way size of logical address space is No. of pages * Page size = 8 * 1024 = 2^3 * 2 ^10 = 2^13 No. of bits for logical address is 13
Size of Physical address space is 2^5 * 2^10 = 2^15 No. of bits for physical address is 15
Consider the following room/floor analogy: Each floor in a hotel contains 10 rooms. The door in each room is labeled 01, 02, 03, ..., 10. Then you get off the elevator, there is a plaque with the floor number. There are 3 floors in this hotel: floors 1, 2, and 3. Therefore, you can say that, to eliminate the ambiguity in room numbers, you concatenate the floor number to the room in the following format: floor:room. So, 1:01 is different than 2:01, or 3:01.
The floor number can be expressed with one digit. The room number can be expressed with two digits. To express the unique location of the room (floor:room concatenation), you need three digits. Replace floor with frame, and room with page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With