Computer Science, asked by sidd272002, 7 months ago


A physical l memory has a word-width of 64 bits, this mandates the logical memory map to adopt a data-bus of width 64 bits.

Answers

Answered by prajeethramanna1
0

Answer:

Problem 1

In a 32-bit machine we subdivide the virtual address into 4 segments as follows:

10-bit

8-bit

6-bit

8 bit

We use a 3-level page table, such that the first 10-bit are for the first level and so on.

What is the page size in such a system?

What is the size of a page table for a process that has 256K of memory starting at address 0?

What is the size of a page table for a process that has a code segment of 48K starting at address 0x1000000, a data segment of 600K starting at address 0x80000000 and a stack segment of 64K starting at address 0xf0000000 and growing upward (like in the PA-RISC of HP)?

Solution:

The page field is 8-bit wide, then the page size is 256 bytes.

Using the subdivision above, the first level page table points to 1024 2nd level page tables, each pointing to 256 3rd page tables, each containing 64 pages. The program's address space consists of 1024 pages, thus we need we need 16 third-level page tables. Therefore we need 16 entries in a 2nd level page table, and one entry in the first level page table. Therefore the size is: 1024 entries for the first table, 256 entries for the 2nd level page table, and 16 3rd level page table containing 64 entries each. Assuming 2 bytes per entry, the space required is 1024 * 2 + 256 * 2 (one second-level paget table) + 16 * 64 * 2 (16 third-level page tables) = 4608 bytes.

First, the stack, data and code segments are at addresses that require having 3 page tables entries active in the first level page table. For 64K, you need 256 pages, or 4 third-level page tables. For 600K, you need 2400 pages, or 38 third-level page tables and for 48K you need 192 pages or 3 third-level page tables. Assuming 2 bytes per entry, the space required is 1024 * 2 + 256 * 3 * 2 (3 second-level page tables) + 64 * (38+4+3)* 2 (38 third-level page tables for data segment, 4 for stack and 3 for code segment) = 9344 bytes.

Similar questions