- Operating Systems Course
- Operating System Tutorial
- History of Operating System
- Personal Computer OS
- OS Processes
- OS Process Model
- OS Process Creation
- OS Deadlocks
- OS Deadlock Recovery
- OS Two-Phase Locking
- OS Memory Management
- OS Mono programming
- OS Shared Pages
- Operating System Input/Output
- OS Input/Output Devices
- OS Input/Output Software Layers
- OS Disk Hardware
- OS Files
- OS File Naming
- OS File Types
- OS Hierarchical Directory System
- OS Directory Operations
- OS File Operations
- Multimedia Operating System
- OS Multiprocessors
- Operating System Security
- OS User Authentication
- OS Trap Doors
- OS Viruses
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.
« Previous Topic Next Topic »