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
What are the two basic categories of film
kati45 [8]
Video and Sound are the 2 most basic categories of film
3 0
3 years ago
In the context of IT jobs in the information systems field. A ____ is responsible for database design and implementation
Yuri [45]

Answer: Database Administrator.

A Database Administrator is responsible for any design and implementation of a database in a system. They are also the people who make sure that they can secure and manage all the data in their system to avoid any problems that may occur during its usage.

They also are responsible for keeping track of changes and the accessibility of the users that will be inputting data into the database. This most especially applies to databases that are meant to keep client information and transactions for most companies.

8 0
2 years ago
Read 2 more answers
Which type of portfolio might a young investor who is not afraid of risk choose?
Keith_Richards [23]
i think it would be the investment with high risk and high return such as Stocks.When investing in stock, investor analyze whether a specific company will be doing well in the time of investment (which will increase the market price of the stock) and take a profit from it.
7 0
3 years ago
Find the maximum value and minimum value in below mention code. Assign the maximum value to maxMiles, and the minimum value to m
Kobotan [32]

Answer:

Code works perfectly

Explanation:

There is nothing wrong with your program as it runs perfectly and displays the expected results.

You may need to compile with another compiler if you're not getting the required results.

I've added the source code as an attachment (unedited)

Download java
3 0
2 years ago
How do you use VMware Fusion to make a Tip Calculator?
lana66690 [7]
You have to subtract the tax amount by the final amount then multiply the result by the percentage of tip that is based on the service that you received.
4 0
3 years ago
Other questions:
  • What type of lights are necessary for silhouettes?
    12·2 answers
  • In _____ conversion of the implementation phase of the systems development life cycle (SDLC), the old and new systems run simult
    9·1 answer
  • 5.
    6·1 answer
  • HELP! ASAP I KNOW IT'S QUITE A HANDFUL BUT I NEED THIS ANSWER!!
    10·1 answer
  • Angela recently purchased a new Android smartphone. While purchasing the phone, Angela was told that she would need to set up a
    11·1 answer
  • A new employee has reported that print jobs are printing as garbled text. Which of the following is MOST likely the reason for t
    8·1 answer
  • You have been using the same computer for several years. To extend its service life, you decide to upgrade the processor. You ch
    13·1 answer
  • Adam's interview with the hiring manager is going well. However, he wants to ensure that his skills and work history are memorab
    6·1 answer
  • I need more friends plz talk with me
    6·2 answers
  • SO I LIKE BOILED EGGS AND MY MUM WAS MAKING SALAD FOR DINNER SO I SAID DID YOU MAKE AND EGG-TRA ONE FOR ME
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!