Discussion
When a page must be replaced and the victim page is clean, the operating system can
Answer: A
Correct answer: discard it without writing it to disk
A clean page is one that has not been modified since it was loaded, so an identical copy already exists on the backing store. It can simply be discarded, and the frame reused at once. A dirty page must first be written out, which costs a disk write of several milliseconds - and that write sits in the critical path of the page fault, delaying the process that is waiting. The distinction is recorded by the dirty bit, set by hardware on any write to the page. Because the difference in cost is so large, some replacement algorithms weigh the dirty bit alongside recency, preferring a clean victim where the choice is close. The enhanced second-chance algorithm does exactly this, ranking pages by the pair of reference and dirty bits. Code pages are typically read-only and therefore always clean, which makes them cheap to evict - one reason a program under memory pressure loses its instructions before its data. Some systems also write dirty pages out in the background to keep clean pages available.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development