Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

simple paging system

Tags:

byte

frame

bit

I have this question and I am not sure how to solve it:

Consider a simple paging system with the following parameters:

  1. 2^32 bytes of physical memory
  2. page size of 2^10 bytes
  3. 2^16 pages of logical address space

How many bits are there in logical memory?

How many bytes in a frame?

like image 523
justin Avatar asked Nov 22 '25 16:11

justin


2 Answers

How many bits are there in logical memory (you mean address)?

  • 16 (2^16 is the number of pages) + 10 (2^10 is the size of page table) = 26 bits

How many bytes in a frame?

  • A frame is the same size as a page, so 2^10 bytes are required.
like image 149
Ayoub Avatar answered Nov 24 '25 21:11

Ayoub


1)size of 1 page is 2^10 bytes and there are 2^16 pages of logical address space so if we multiply both we calculate total bytes of pages in logical address;

2^16 * 2^10 = 2^26 bytes 1 byte = 8 bits so (2^26)*(2^3) is your answer.

2) page is 2^10 and 2^16 pages of logical space so again if we multiply both we find how many bytes in a frame 2^16 * 2^10 = 2^26 bytes

like image 35
user2470549 Avatar answered Nov 24 '25 21:11

user2470549