Consider a page table in which the entries for the ith and jth pages (rows i and
ID: 3633723 • Letter: C
Question
Consider a page table in which the entries for the ith and jth pages (rows i and j of the page table) are both valid (the valid/resident bit is set in both entries) and both contain the same frame number.a) What is the effect of allowing two entries in a page table to contain the same page frame number?
b) What would the effect of updating some byte in page i be on page j?
c) How could an operating system exploit this effect to decrease the amount of time needed to copy a large
amount of memory from one place to another (e.g., to do a form of message passing)?
d) Now consider allowing entries in the page tables of two different processes to contain valid frame numbers (i.e., two processes have valid page mappings that map to the same frame number). Explain how an operating system can exploit this effect to (1) efficiently create new processes while (2) ensuring complete memory protection between the processes (i.e., ensure that any data written by one process cannot be read by the second process). Assume the hardware MMU supports a “read-only” bit in the page table that results in an exception being generated if a process writes to a read-only page
Explanation / Answer
A. This allows users to shared code or data. B.Sharing of non-reentrant code or data means that any user having access to the code can modify it and these modifications would be reflected in the other user's "copy." C. If the code is reentrant, much memory space can be saved through the shared use of large programs (e.g., text editors, compilers, database systems). "Copying" large amounts of memory could be effected by having different page tables point to the same memory location.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.