World's most popular travel blog for travel bloggers.

Size of address spaces (logical and physical)

, , No Comments
Problem Detail: 

Suppose a system in which addresses (physical and logical) occupy 32 bits, page size is 1024 bytes (210), and physical memory is of size 32MB. How many frames are in physical memory? Is the logical address space larger than physical memory? Explain.

The solution given is:

232 byte logical address space (assuming byte-addressable machine)

225 byte physical memory

210 byte pages

At one page per frame, there are 225/210 = 215 pages in physical memory. The logical memory address space is larger than physical memory.

Can someone explain how to arrive at this solution?

Asked By : Greg Miller

Answered By : Giorgio Bar

The size of a frame is the same as that of a page, so the size of a frame is 1024 bytes (210 bytes).

If the physical memory is 32MB (225 bytes), the number of frames is 225 / 210 = 215 and this is also the maximum number of pages that can be present in memory at the same time.

The logical address space is larger than the physical address space, a process can address 232 memory locations that is 232 / 210 = 222 pages.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/41931

0 comments:

Post a Comment

Let us know your responses and feedback