Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(20 pts) A program computes the row sums ai of an array A that is 100 words by 100 words. Assume that the computer uses

image text in transcribed

(20 pts) 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 1 15 the column number a. Does the math expression cycle through the elements of a row, or of a column? w many pages are required to hold the entire 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 row i, e. f. How many total page loads are required by the algorithm? Now assume you write the algorithm in MATLAB, which will allocate memory columns, storing the elements of an array column in contiguous memory g. h. i. j. Across how many pages is a row i spread? Across how many pages is a columnj spread? Based on that, how many page loads are required for a row i, How many total page loads are required by the algorithm

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago

Question

Question May I set up a Keogh plan in addition to an IRA?

Answered: 1 week ago