0% found this document useful (0 votes)
46 views2 pages

Memory Management Paging Questions Explained

The document contains a series of questions related to memory management and paging, focusing on logical and physical address formats, page table sizes, and calculations for various systems. Each question presents a different scenario involving logical address spaces, page sizes, and memory configurations, requiring calculations for page numbers, offsets, and address formats. The questions aim to assess understanding of paging concepts and memory management in computer systems.

Uploaded by

Harris Tabassum
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views2 pages

Memory Management Paging Questions Explained

The document contains a series of questions related to memory management and paging, focusing on logical and physical address formats, page table sizes, and calculations for various systems. Each question presents a different scenario involving logical address spaces, page sizes, and memory configurations, requiring calculations for page numbers, offsets, and address formats. The questions aim to assess understanding of paging concepts and memory management in computer systems.

Uploaded by

Harris Tabassum
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Memory Management: Paging Questions

Q1. Consider a logical address space of 16 pages each of 1024 words (each word
of 2 Bytes) mapped into a physical memory of 32 frames. Give the Logical and
Physical address format. Also give the total Logical and Physical address space
Compute the required page table size for this situation

Q2. A system has 48 bit L.A & a main memory of 64 GBs. Page size is 4096
bytes. Compute the number of pages and frames that exist in the system. Also
give L.A & P.A format.

Q3. Consider a system with


L.A = 32 bits ; Page Size = 4 K ; Main memory = 512 MB.
Compute the total process address space and maximum number of pages in a
process address space. Also give the logical and physical address format. Also
give the page table size for this situation.

Q4. Consider a LA space of 8 pages of 1024 words mapped into memory of 32


frames. How many bits are there in the LA? How many bits are there in PA?

Q5. In a system with a logical address space of 64 pages, each of 512 bytes
mapped into physical memory of 1024 frames. Compute lengths (in bits) of p, d,
f, logical and physical address format.

Q6. A system has 48 bit logical address, physical address space is 32 bits and
page size is 4 KB. Determine the lengths of p, d, f, logical and physical address
formats, maximum number of pages per process and maximum number of
frames in the system, page table entry size (PTES) and the size of the page table.

Q7. Consider a system that allows maximum 2 Mega pages per process with 2
KB page size. Determine the length of the logical address only.

Q8. Consider a system with 24 bits physical address space that supports a frame
size of 512 Bytes. Calculate the page table entry size (PTES) and the length of
physical address.

Q9. For each of the following logical addresses (given in decimal), compute the
page number and offset within the page; if the page size is 4 KB
– 20000
– 32768
– 60000
Repeat for an 8 KB page.

Q10. A machine has a 48 bit virtual addresses and 32 bit physical addresses.
Pages are 8 KB of size. How many entries are needed for the page table?

Q11. Let 14000 is a logical address, in which page does it exist if the page size is
1 KB?

Q12. In a system with 34 bits logical address and 32 bits physical address and a
16 KB page size. How many entries will be there in the page table?

Q13. Consider a virtual address 40808. Compute the virtual page number and
offset for a 4 KB page

Common questions

Powered by AI

For a system with a 48-bit logical address and 4 KB pages, we calculate page offset as log2(4096) = 12 bits. The page number is then 48 - 12 = 36 bits. For the physical address space of 32 bits with the same page size, you have a 12-bit offset, requiring the frame number to be 32 - 12 = 20 bits. These calculations give a thorough understanding of how logical and physical address formats depend on page size and memory configurations, influencing the paging mechanism .

A 48-bit logical address means there are 2^48 possible addresses in the logical space. With a page size of 4096 bytes (2^12), each page can hold 4096 addresses. Therefore, the number of pages is 2^(48-12) = 2^36. For a physical memory of 64 GB, which is 2^36 bytes, and a page size of 4096 bytes, the physical memory is divided into 2^(36-12) = 2^24 frames .

A 32-bit logical address allows for 2^32 addresses in the logical space. With a page size of 4 KB (4096 bytes), each page holds 2^12 addresses. The maximum number of pages in this address space is 2^(32-12) = 2^20. Thus, the maximum addressable process space is 4 GB (since each page is 4 KB and there are 2^20 pages). For the physical address format, if we consider main memory to be less than or equal to 4 GB as constrained typically by physical memory limits needing to be a multiple of frame size, then the physical address format can also be 32 bits aligned with the logical maximum .

For a logical address of 14000 within a system with a 1 KB (1024 bytes) page size, we divide the logical address by the page size. The integer result indicates the page number, while the remainder provides the offset within the page. Thus, 14000 / 1024 = page 13, with an offset of 608 bytes. This process forms the basis for page table indexing, crucial for managing address spaces in computing systems with high granularity and ensuring precise data access .

With a limit of 2 Mega pages per process and a 2 KB page size, each page is 2048 bytes long (2 KB). A logical address requires log2 of total pages multiplied by the page size to cover the entire address space. Hence, if pages are capped at 2 million (approximately 2^21), the logical address length encompasses this multiplicity and the byte offset within each page (log2(2048)), providing an effective solution for memory allocation around predefined process constraints .

Given logical addresses 20000, 32768, and 60000 in a system with a 4 KB page size, we divide each address by 4096 to find the page number and use the modulo operation for the offset. For 20000, it's on page 4 with offset 3536. For 32768, the result is page 8, offset 0. Address 60000 is on page 14, offset 2912. Increasing the page size to 8 KB alters these calculations due to larger divisors, changing page numbers and offsets accordingly, which exemplifies how address translation adapts to page size variations impacting memory access patterns .

With 48-bit virtual addresses, we compute the number of pages by dividing the total address space by the page size. Given 8 KB pages, the offset requires 13 bits (log2(8192)=13). Hence, the remaining 35 bits are for the page number, resulting in 2^35 pages. Each requires a mapping entry in the page table. This necessitates 2^35 entries, showcasing how address bit width impacts page table depth, essential for efficient memory access in high-capacity systems .

In systems with large address spaces, the page table entry size directly impacts memory usage and system performance. Large address spaces with small page sizes generate vast page tables, depleting memory resources. The entry size, often consisting of frame identifiers and status bits, determines both storage efficiency and retrieval time during address translation. Increased entry sizes expand page table memory footprints, potentially slowing retrieval efficiency due to larger tables needing alignment in memory structures, thus affecting cache performance and TLB miss rates, which are crucial for system throughput .

For a logical address space with 16 pages, each having 1024 words (2048 bytes since each word is 2 bytes), the logical address is calculated as follows. The address space is 16 pages × 1024 words = 16384 addresses. Hence, the logical address format requires 14 bits (log2(16384) = 14) to address each byte. For the physical address, with 32 frames, you need log2(32) = 5 bits for the frame number, and since each frame holds a full page (1024 words, 2048 bytes), you need 11 bits for the offset (log2(2048) = 11). Thus, the physical address format is 16 bits (5 bits for the frame and 11 bits for the offset). The page table must map 16 pages, requiring one entry per page, and if each entry hypothetically uses 4 bytes (typical for page table entries), the page table size would be 16 entries × 4 bytes = 64 bytes .

In a system with a large virtual address space, such as a 48-bit logical address space, and a smaller physical address space, such as a 32-bit space with 4 KB page size, the system will have 2^(48-12) pages. Each page table entry must map a virtual page to a physical frame. The size of each page table entry is influenced by the frame number size, which is 20 bits (5 bytes for simplicity), considering a 32-bit physical address space. Thus, the page table size would be 2^(48-12) entries × a fixed PTES (such as 8 bytes), signifying significant memory overhead due to a comprehensive addressable space, despite physical limits .

You might also like