1.2k views

In a virtual memory system, size of virtual address is 32-bit, size of physical address is 30-bit, page size is 4 Kbyte and size of each page table entry is 32-bit. The main memory is byte addressable. Which one of the following is the maximum number of bits that can be used for storing protection and other information in each page table entry?

1. 2
2. 10
3. 12
4. 14
asked | 1.2k views

ans is D

page table entry must contain bits for representing frames and other bits for storing information like dirty bit,reference bit etc

no. of frames (no. of possible pages) = Physical memory size/ Page size = 230/212 = 218

18+x=32     (PT entry size=32 bit)

x =14 bits

answered by (4.4k points) 1 2 2
edited
ans is (d) make it (d) please...

I think ans should be 12(C)

no. of frames (no. of possible pages) =Virtual memory size/ Page size = 232/212= 220

Please correct me if i m wrong!!!

20+x=32     (PT entry size=32 bit)

x =12 bits

Frame Size = Page Size = 4Kbytes = 212 bytes

Physical Address Size = 230 bytes

number of frames = Physical Address/Frame Size

= 230/212=218 frames

numbers of bits required for frame = 18 bits

Page Table Entry Size =  number of bits for frame  + other information

other info = 32 - 18 = 14 bits

So Ans is (d)

One question...

Its given 4Kbytes, then why are we taking 4Kbits, because 4Kbytes is 215

Not 2^12

As 1byte = 2^3 bits

Correct me if i am wrong, this is driving me crazy.

Every solution available has taken 2^12 instead of 2^15... why ????

1Kbit = 1024 bits = $2^{10}$

4Kbits = $4\times 2^{10} = 2^2\times 2^{10} = 2^{10+2} = 2^{12}$
Yeah ... but its given 4KBytes not kbits.

In question it is given byte addressable memory -- which is anyway the default.

As it is a byte addressable, if we are given with 32 bit virtual address, then Virtual address Space will be 232  Bytes.

Please correct me if iam wrong.