FOR FREE YEAR SOLVED

Question: GATE 97

 

Dirty bit for a Page in PT

(a) Helps avoid unnecessary writes on paging device.

(b) Helps maintain LRU information.

(c) Allows only read on a page.

(d) None.

 

You should know:

Before seeing the solution please follow the  Number of information at Page Entry 

 

Solution:

 

Option (a) is correct

 

Explanation:

Dirty bit and modified bit represent a page is modified or not.

The concept is when a page resides in the main memory and modified at the time of execution. Now in the case of page replacement procedure if this modified page is required to replace by another page, then the modified page must be written back to secondary memory before replacing this page with the new page.

 

Question: GATE 2008

 

Match the following flag bits used in the context of virtual memory management on the left side with the different purposes on the right side of the table below.

 

Name of bits purpose

I.          Dirty                            a.         Page initialization

II.         R/W                            b.         Write back policy

III.        Reference                   c.         Page Protection

IV.        Valid                           d.         Page replacement policy

 

 

(A) I-d, II-a, III-b, IV-c

 

(B) I-b, II-c, III-a, IV-d

 

(C) I-c, II-d, III-a, IV-b

 

(D) I-b, II-c, III-d, IV-a

 

You should know:

Before seeing the solution please follow the Number of information at Page Entry 

 

Solution:

 

Option (D) is correct.

 

Explanation:

 

I-b: Dirty bit means a page is modified or not and if the page is modified then write back it before replacing the page with another page.

 

II-c: Permission bit is required for protection and security of pages by access authorization like read, write, or execution permission.

 

III-d: Reference bit is important at the time of page replacement algorithm. It is used to identify how many times this page is referred at the time of execution that helps to know when the last time this page is referred.

 

IV-a: This bit identified a certain page is currently present in the main memory or not. If one certain page is not present in the main memory then initialize this page into memory. 

 

Question: GATE 2004(IT) – Qno.66

 

In a virtual memory system, the size of the virtual address is 32-bit, the size of the physical address is 30-bit, the page size is 4 Kbyte, and the 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?

(A) 2 

(B) 10 

(C) 12 

(D) 14   

 

You should know:

Before seeing the solution please follow Calculation of offset for logical and physical address, Calculation of logical address bit and number of pages, Calculation of physical address bit and number of frames, Calculation of page table size, Number of information at Page Entry 

 

Solution:

 

Option (D) is correct.

 

Explanation:

 

Given data:

Virtual Address = Logical Address = 32 bit, Physical Address = 30 bit, page size = 4KB = 212

And page table entry = 32 bit.

 

They asking the number of bits require for other information of page entry except for frame number.

 

So, first, we calculate the number of bits required for the frame number.

 

Page size = 4KB = 212 is given and we know page offset and frame offset is the same.

 

So, page offset = frame offset = 12 bits 

 

Now, we elaborate the address fields of Physical Address (PA):

 

 

 

 

So, number of bits in frame number = Physical Address – Offset

                                     = 30 – 12 = 18            

 

Now the number of bits required for other information of page entry except frame number:

 

Total number of bits in page entry-number of bits in frame number = 32 bit (given) – 18 bit = 14 bit

 

So, option (D) is correct.