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
Which statement regarding hard drives is incorrect?
Veseljchak [2.6K]

Answer: I think the answer is

c. solid state drives are less expensive than magnetic hard drives

Explanation:

4 0
3 years ago
Read 2 more answers
Which function can you perform on a word processor but not on a typewriter?
AnnZ [28]
Deleting a character when you make a mistake and the print it without errors
4 0
3 years ago
Which of the following strategies will help you to stay focused and on topic while writing your essay?
AveGali [126]

Answer:

the answer is D,both A and B

8 0
3 years ago
Read 2 more answers
Read the code below.
Rasek [7]

Answer:

theres an error on line one used python idle

Explanation:

8 0
3 years ago
Terminal emulation, especially the unprotected ____________________ protocol, should be blocked from any access to all internal
storchak [24]

Answer:

telnet

Explanation:

<h2><u>Fill in the blanks </u></h2>

Terminal emulation, especially the unprotected <u>telnet </u>protocol, should be blocked from any access to all internal servers from the public network.

3 0
3 years ago
Other questions:
  • This question refers to a standard deck of playing cards. If you are unfamiliar with playing cards, there is an explanation in P
    10·2 answers
  • What is the difference between a syntax error and a logical error?
    15·1 answer
  • If someone receives a shock, or a piece of equipment is throwing sparks or arcing you should try to pull them away from the sour
    7·1 answer
  • “Green Technology” is also known as what?
    11·1 answer
  • 1. In the.js file, write the JavaScript code for this application. Within the click event handlers for the elements in the sideb
    14·1 answer
  • _______________ is the term for the convergence of real-time and non-real-time communications services such as telephony, instan
    11·1 answer
  • Seth would like to make sure as many interested customers as possible are seeing his business’s website displayed in their searc
    9·1 answer
  • Last week, a disk containing CSM Tech Publishing’s current project manuscripts crashed. Fortunately, there was a backup, but all
    15·1 answer
  • Describe how you would create a Java program that prompted the user to correctly enter a username and password. The username is
    7·1 answer
  • Heyyyyyy who likes anime​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!