The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+19 votes
4.3k views

Dirty bit for a page in a page table

  1. helps avoid unnecessary writes on a paging device
  2. helps maintain LRU information
  3. allows only read on a page
  4. None of the above
asked in Operating System by Veteran (59.5k points) | 4.3k views
0

Can I say that Option A means:

Helps Avoid Unnecessary Writes On The Disk (Secondary Memory) Where The Page Is Present. ?

2 Answers

+32 votes
Best answer

The dirty bit allows for a performance optimization. A page on disk that is paged in to physical memory, then read from, and subsequently paged out again does not need to be written back to disk, since the page hasn't changed. However, if the page was written to after it's paged in, its dirty bit will be set, indicating that the page must be written back to the backing store answer: (A)

answered by Boss (11.5k points)
edited by
–7
Since there is no such thing paging device exist. So in that case i think we should go for option D.
0
What is paging device?
+18 votes
ans is A...to perform any write operation on page firstly we check the dirty bit status...dirty bit will be set when page will be modified(suppose s=1 set condition) and it will remain s=1(set) until the page modified will write back into the memory..if page was not modified then it will not change the dirty bit value i.e.s=0...now  suppose we perform write operation on page then its dirty bit become s=1..and suppose after some time we were performing write operation on that page then firstly we check the dirty bit value here its value is 1 it means page was modified..so firstly we write that page to memory and then perform any modification by this way we were avoiding unnecessary write operation on paging device
answered by Active (4.1k points)
+5

You mentioned

dirty bit value here its value is 1 it means page was modified..so firstly we write that page to memory and then perform any modification by this way we were avoiding unnecessary write operation on paging device

If we need to perform 100 writes on a page then every time we will write it to memory is wastage. Although your answer is correct but i think we can perform write on the page as many times as we want.Its just when we are about to replace page we will check if dirty bit=1,then write to memory back else dont.If every time before write i check dirty bit=1,then i write page to memory and then do any modification then how is it avoding unnecessary write to memory?

+1
true, when we do replacement only, so that the final modifications reflected back in memory.


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,751 questions
46,766 answers
140,658 comments
58,522 users