- Dirty bit
-
The computer hardware concept of a Dirty Bit (Modify Bit) can be used when discussing the Cache or Page replacement algorithms of an operating system.
Page Replacement
When speaking about page replacement, each page (frame) may have a modify bit associated with it in the hardware. The dirty bit for a page is set by the hardware whenever any word or byte in the page is written into, indicating that the page has been modified. When we select a page for replacement, we examine its modify bit. If the bit is set, we know that the page has been modified since it was read in from the disk. In this case, we must write that page to the disk. If the dirty bit is not set, however, the page has not been modified since it was read into memory. Therefore, if the copy of the page on the disk has not been overwitten (by some other page, for example), then we can avoid writing the memory page to the disk: it is already there.[1]
Operating Systems
Similarly, a bit is set when a Windows PC is powered on. When powered off as normal, the bit is switched off. However, in case of power outage or improper (forced) shutdown, the bit will still be on the next time the PC is started. This bit is why Windows sometimes suggests a disk check, etc...
References
- ^ Abraham Silberschatz, Peter Baer Galvin, Greg Gagne. Operating System Concepts: Sixth Edition. 2002, ISBN 0-471-41743-2, p. 333.
Categories:
Wikimedia Foundation. 2010.