1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Bogdan [553]
3 years ago
11

2. Consider the two-dimensional array A: int A[][] = new int[100][100]; where A[0][0] is at location 200 in a paged memory syste

m with pages of size 200. Asmall process that manipulates the matrix resides in page 0 (locations 0 to 199). Thus, every instruction fetch will be from page 0. For three page frames, how many page faults are generated by the following array-initialization loops? Use LRU replacement, and assume that page frame 1 contains the process and the other two are initially empty. a. for (int j = 0; j < 100; j++) for (int i = 0; i < 100; i++) A[i][j] = 0; b. for (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) A[i][j] = 0;
Computers and Technology
1 answer:
bogdanovich [222]3 years ago
6 0

Answer:

Check the explanation

Explanation:

An integer (int) is of two different bytes and each page has 200 bytes in length. What this means is that each row of array A (100 int) will fits perfectly in a page.

(a) For the initial or first array-initialization loop, one column is processed at a time, so a page fault will be generated at every inner loop iteration, with a total of 100*100=10,000 page faults.

(b)  And when it comes to the second array-initialization loop, one row is processed at a time, and a page fault is generated at every outer loop iteration, with a total of 100 page faults.

Hence second array-initialization loop, has better spatial locality.

You might be interested in
Jim wants to buy a car, he’ll probably only need it for a couple of years he has a short commute to work so he won’t put many mi
Papessa [141]
Is there more information? or options?
4 0
3 years ago
Which was the first console with a programmable microprocessor and a ROM chip?
Mazyrski [523]
I believe it was Nintendo hope this helps 
5 0
3 years ago
Read 2 more answers
Help me help you...........
lyudmila [28]

Answer:

the 4th answer

Explanation:

w stage for width, h for height.

6 0
2 years ago
A system might help managers to
Minchanka [31]

Answer:Decisions are only as valid as the information on which they are based. Management information systems improve your decision-making, because they provide information that is accurate, timely, relevant and complete.

Explanation:

Decisions are only as valid as the information on which they are based. Management information systems improve your decision-making, because they provide information that is accurate, timely, relevant and complete.

5 0
3 years ago
Which of the following is a type of logical function?
Sonbull [250]

Answer:

Hope I can help:

D.) IF

Explanation:

8 0
3 years ago
Other questions:
  • A type TW cable containing two No. 12 copper conductors has a maximum overcurrent protection of
    7·2 answers
  • I have an LG phone. Since I just bought my phone, my bill to text message isn't paid yet. I texted a couple of things playfully
    5·2 answers
  • What data unit is encapsulated inside a packet?
    5·2 answers
  • In the history of Social Media what are two points that stood out?
    12·1 answer
  • Name the functional arms of MSDE.
    13·1 answer
  • What is stored in alpha after the following code executes?
    8·1 answer
  • Whats the best way to get into a computers programming to get past firewalls
    15·2 answers
  • Gimme Shelter Roofers maintains a file of past customers, including a customer number, name, address, date of job, and price of
    8·1 answer
  • How to do GCD on small basic?​
    7·1 answer
  • Explain the unique reason why assember language is perfered to high level language
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!