Process to copy on write bit of a page

Whenever bit is set then illustrates the process to copy on ‘write’ bit of a page is handled by the kernel?

E

Expert

Verified

In circumstances such as, where the copy on write bit of a page is set and that page is shared through more than the one process, the Kernel assigns copies and new page the content to the new page and the other processes keep their references to the old page. Subsequent to copying the Kernel updates the page table entry with the new page number. After that, Kernel decrements the reference count of the previous pfdata table entry.

In cases such as, where the copy on write bit is set and no processes are sharing the page, the Kernel permits the physical page to be use again by the processes. By doing so, it clears the copy on write bit and disassociates the page from its disk copy (or if one exists), since other process might share the disk copy. Then it removes or deletes the pfdata table entry from the page-queue as the latest copy of the virtual page is not on the swap device. It decrements the swap-use count for the page as well as if count drops to zero or nil, frees the swap space.

   Related Questions in Basic Computer Science

©TutorsGlobe All rights reserved 2022-2023.