The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
University
| Teaching Since: | Apr 2017 |
| Last Sign in: | 438 Weeks Ago, 2 Days Ago |
| Questions Answered: | 9562 |
| Tutorials Posted: | 9559 |
bachelor in business administration
Polytechnic State University Sanluis
Jan-2006 - Nov-2010
CPA
Polytechnic State University
Jan-2012 - Nov-2016
Professor
Harvard Square Academy (HS2)
Mar-2012 - Present
37.    Suppose that two processes A and B share a page that is not in memory. If process A faults on the shared page, the page table entry for process A must be updated once the page is read into memory.
(a)    Under what conditions should the page table update for process B be delayed even though the handling of process A’s page fault will bring the shared page into mem- ory? Explain.
(b)Â Â Â What is the potential cost of delaying the page table update?
Â
38.    Consider the following two-dimensional array: int X[64][64];
Suppose that a system has four page frames and each frame is 128 words (an integer occupies one word). Programs that manipulate the X array fit into exactly one page and always occupy page 0. The data are swapped in and out of the other three frames. The X array is stored in row-major order (i.e., X [0][1] follows X [0][0] in memory). Which of the two code fragments shown below will generate the lowest number of page faults? Explain and compute the total number of page faults.
Fragment A
for (int j = 0; j <> j++)
for (int i = 0; i < 64;="" i++)="" x[i][j]=""> 0;
Fragment B
for (int i = 0; i <> i++)
for (int j = 0; j < 64;="" j++)="" x[i][j]=""> 0;
Â
Â
-----------