SLIDE 16 CPSC 410 / 611 : Operating Systems 16
I mplement at ion of Demand Paging in UNI X SVR4
frame address age cp/wrt mod ref val prot
page table entry
swap dev block num type (swap,file, fill 0, demand fill)
disk block descriptor
page state ref count logical device
frame table entry
block number pfdata pointer
Demand Paging on Less-Sophist icat ed Har dwar e
- Demand paging most ef f icient if hardware set s t he ref erence and dirt y
bit s and causes a prot ect ion f ault when a process writ es a pages whose copy_on_writ e bit is set .
- Can duplicat e valid bit by a sof t ware-valid bit and have t he kernel t urn
- f f t he valid bit . The ot her bit s can t hen be simulat ed in sof t ware.
- Example: Ref erence Bit :
– I f process ref erences a page, it incurs a page f ault because valid bit is of f . Page f ault handler t hen checks sof t ware-valid bit . – I f set , kernel knows t hat page is really valid and can set sof t ware- ref erence bit .
Off Hardware Valid On Software Valid Off Software Reference On Hardware Valid On Software Valid On Software Reference before referencing page after referencing page