Shared Pages in OS

The idea of sharing has grown in significance in the world of computing over time. An operating system's performance can be significantly improved by sharing resources like memory and processing power. The use of shared pages in OS is a prime illustration of this.

Shared pages can lower memory requirements, improve communication, and boost system performance by enabling multiple processes to access the same data or code. We will delve deeper into the intriguing world of shared pages in OS in this post and examine both their benefits and drawbacks.

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.

Advantages of shared pages in an operating system

Disadvantages of shared pages in an operating system

Operating System Quiz


« Previous Topic Next Topic »


Liked this post? Share it!