0
votes

Question is here: Consider a logical-address space of 32 pages with page size 512 words, mapped onto a physical memory of 128 frames.

I want to know if my attempting calculation below is correct: so far I have come the: **

32 pages = 2^5 bits
512 words = 2^9 bits
128 frames = 2^7 bits

**

How to calculate the logical address and physical address if i do not know the word size?

1

1 Answers

0
votes

Word size depends on the computer architecture. Generally for a 32 bit CPU the word size is 32 bits(4 bytes) and for 64 bit CPU, it is 64 bits(8 bytes). * Logical address will be generated by the CPU for a particular proceess, you don't need to calculate anything. As the CPU generates the logical address it will be mapped to physical address by Page Map Table or a fast Cache in Memory management unit(MMU). * With respect to the details given above, your CPU generates the logical address of 14 bits, so it can address (2^14 words in memory). Assuming your processor is 32 bit, then it can access 2^16 bytes. * Given the logical address of 14 bits, it looks in the page map table by using the first 9 bits for page. Then it finds the address where the page is actually located in the physical memory and it adds the offset to the physical address to find memory location in the Main memory.