Question: A program computes the row sums ai of an array A that is 100 words by 100 words. Assume that the computer uses demand paging

 A program computes the row sums ai of an array A

A program computes the row sums ai of an array A that is 100 words by 100 words. Assume that the computer uses demand paging with a page size of 1000 words, and that the amount of main memory allotted for data is five page frames. Is there any difference in the page fault rate if A were stored in virtual memory by rows or columns? Let's explore Whether you store by rows or columns, it's the same total amount of memory (in this case). The software environment you use can actually change things, meaning locality is affected by both the reference order and data layout. The same computation can be written in MATLAB or C, for example. MATLAB will store the same column contiguously in memory, but C will store the same row. So for this problem, j is the row number and j is the column number a. Does the math expression cycle through the elements of a row, or of a column? b. How many pages are required to hold the entire array: Assume you are writing in C, which will store the elements of an array row in contiguous memory c. Across how many pages is a single row ? spread? d. Across how many pages is a columnj spread? Based on that, how many page loads are required for a rowi- How many total page loads are required by the algorithm? e. f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!