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
In Google search results, how are organic links different from sponsored links?
xxMikexx [17]
Sponsored links are links that have been paid for in order to bring them to the first positions when the engine returns the results of the search.  Organic links are links that have not been paid for.  Your answer is D.
4 0
3 years ago
Read 2 more answers
Which of the following terms means the computer operating system automatically detects and installs the proper driver for a new
lukranit [14]
Plug and play installation
4 0
2 years ago
HELP! Identify the parts of the table. <br>A) Primary Key<br>B) Field<br>C) Record<br>D) Table<br>​
joja [24]

The primary key is the block under the Movie ID column.

The Field is the Movie Name.

The Record is the block that goes with the first row of data.

The Table is the bottom block in the center.

4 0
3 years ago
Read 2 more answers
If you're driving a car and know there's a motorcyclist around you, you should______. A. Not change your driving B. Check your b
Sedaia [141]

b check your blind spots frequently i guess not sure

5 0
3 years ago
When you're working with a word processing document and you press the del key, what happens?
Svetach [21]

The <DEL> or <Delete> key makes the first character AFTER the cursor
disappear, and everything after it then moves back one space to close up
the hole.

Example: 

If I have this in my document ...                          Most trees are green.

And my cursor is after the 'a', like this:                Most trees a|re green.

Now, if I hit the <delete> key, it deletes the
'r' after the cursor, and the hole closes up,
and the cursor stays where it is:                          Most trees a|e green.


5 0
3 years ago
Read 2 more answers
Other questions:
  • Which f the following is not a characteristic of igneous rock
    8·1 answer
  • Write a C program to implement a command called ​displaycontent ​that takes a (text) file name as argument and display its conte
    9·1 answer
  • You can change the transparency of a picture used as a slide’s background with the ____.
    10·1 answer
  • Alison is having a hard time at work because her Inbox is flooded with emails every day. Some of these emails are unsolicited. S
    15·2 answers
  • If I wanted to include a picture of a dog in my document, I could use _____. SmartArt WordArt clip art AutoCorrect
    13·1 answer
  • What is the biggest challenge for most business when going online?
    12·1 answer
  • How to beat level 50 in give up robot 2
    5·1 answer
  • What is essential for a good study routine? Select four options.
    7·1 answer
  • WILL GIVE BRAINLIEST!!! PLEASE HELP!!!
    5·1 answer
  • In Python write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!