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]
4 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]4 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 is a potential benefit of using a VPN? Select one: a. You could increase your level of privacy by guarding your real IP add
Alik [6]

Answer:

d. All of these.

Explanation:

A VPN is an acronym for Virtual Private Network and it's a secured, encrypted and private web-based service used for accessing region-restricted and censored internet content. A VPN protects web data from potential hackers and government surveillance by hiding the real IP address of the host and encrypting user's internet traffic.

Basically, the VPN is a computer software that enables internet users to create a secured connection (sends and receives data) over public or shared networks like they're directly connected to the private network.

The potential benefits of a VPN service are;

- It increases privacy level by guarding the real IP address on the Internet.

- It protects user data exchange on a public Wi-Fi network by encryption.

- It can be used to securely connect to a corporate or personal network from far away through the Internet and access local resources.

8 0
4 years ago
PLEASE HURRY!!<br> Look at the image below
Tanzania [10]

Answer:

source append (6,2)

Explanation:

Mark me as brain list

7 0
3 years ago
QUICK HELP ME PLEASE
Sholpan [36]

Answer: Cable Internet access requires the setting up of fiber cables. It is the fastest type of Internet access technology. that's the answer

4 0
3 years ago
What is meant by close to 75% of all viruses is contracted through friendly means?
snow_lady [41]

Answer: This means that even though we believe the information is coming from a trusted source, it could still contract a virus due to someone else hacking it or the original sending not being aware of the virus.

Explanation: Just because information comes from a trusted/friendly source does not mean the information is clear of potential threats. Viruses are able to hide in information and the sending may not be aware that the virus is hiding in the information.

4 0
4 years ago
Which line of code will only allow a non-decimal point to be stored in a variable? candyCost = float(input("How much is the cand
ad-work [718]

Answer:

candyCost = int(input("How much is the candy?"))

Explanation:

candyCost = input("How much is the candy?") → By default, this how you get input and store the value. And it is stored as a string

candyCost = str(input("How much is the candy?")) → This also gives you a string to store

candyCost = float(input("How much is the candy?")) → This gives you a float number, decimal number, to store

candyCost = int(input("How much is the candy?")) → This gives you an integer number, a non-decimal

4 0
3 years ago
Read 2 more answers
Other questions:
  • Dani needs to present a mathematical formula to his audience. How should he start the process of adding an equation to a slide?
    5·1 answer
  • A number of related records that are treated as a unit is called
    6·1 answer
  • What kind of software program delivers advertising content in a manner that is unexpected and unwanted by the user, and is typic
    14·1 answer
  • Your boss wants you to set up an authentication scheme in which employees will use smart cards to log in to the company network.
    15·1 answer
  • What is a feature of audio editing software
    11·1 answer
  • Case Study
    15·1 answer
  • 2.<br> The force of impact is
    5·1 answer
  • What is the significance of the following terms A A L U control unit in the CPU​
    13·1 answer
  • Which of the expressions is false? when a = 10 and b = 4
    8·1 answer
  • I will give brainyest
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!