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

On a system, a process has 1KB (1024 bytes) of address space, where each byte is

ID: 3709022 • Letter: O

Question

On a system, a process has 1KB (1024 bytes) of address space, where each byte is a separate address. In a pure paging scheme, the process has been allocated 64 pages to hold its address space. The system has 32KB of physical memory, where each byte is a separate address as before, and a frame size is equal to the page size of processes. Coincidentally, the current process’s page table maps every page number i to frame number 3i.

During execution of the process, CPU generates the following logical address: 1 1 0 1 0 1 1 0 0 1

What is the corresponding physical address? (Show how get the answer)

Explanation / Answer

Given address space of the process is = 1 KB (1024 bytes).

Hence total number of bits for the address = log2 1024 = log2 210 = 10 bits.

Number of pages for the process is = 64.

Hence number of bits for the page number is = log2 64 = log2 26 = 6 bits.

Number of bits for offset is = 10 - 6 = 4 bits.

Here in the given logical address 1st 6 bits 1 1 0 1 0 1 is the page number,

which is 53 in decimal.

Next 4 bits 1 0 0 1 is the offset.

Given every page number i maps to frame number 3i.

Hence frame number is = 3 * 53 = 159,

which is 1 0 0 1 1 1 1 1 in binary and offset is = 1 0 0 1.

Here physical memory is = 32 KB = 25 * 210 B = 215 B and

Hence physical memory address size is = 15 bits.

Hence corresponding physical address is = 0 0 1 0 0 1 1 1 1 1 1 0 0 1.