Shared Pages in OS

The paging system also has a problem with sharing as one of its design issues.

On a large computer system that is capable of running multiple programs at once, it is not uncommon for multiple users to be occupied with the same program at the same time.

Now, simply share the pages in order to prevent having two distinct copies of the same page stored in your memory at the same time. The fact that not all of the pages can be shared presents a challenge, however.

Pages that can only be read are generally shareable, such as the text of a program; however, data pages are not.

When two or more than two processes (referred to collectively as multiple processes) share some code, it can result in a problem with shared pages.

Let's say that process X and process Y are both running the editor and sharing its pages. What would happen?

If the scheduler makes the decision to remove process X from memory, evicting all of its pages and filling the empty page frames with the other program will cause process Y to generate a large number of page faults in order to restore them. If the scheduler makes the decision to remove process Y from memory, evicting all of its pages and filling the empty page frames with the other program.

In a similar fashion, whenever the process X comes to an end, it is essential to be able to discover that the pages are still in use. This ensures that the disc space associated with those pages is not accidentally freed.

Operating System Quiz


« Previous Topic Next Topic »

Follow/Like Us on Facebook




Subscribe Us on YouTube