7. Consider the two-dimensional array A (stored in the heap memory): int A[100] [100]; Here, A[0][0]...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
7. Consider the two-dimensional array A (stored in the heap memory): int A[100] [100]; Here, A[0][0] is stored at location 200, in a paged memory system with pages of size 200, and with integer numbers of size 4. A small process for manipulating the array resides in page 0 (addresses 0 to 199); thus, every instruction fetch will be from page 0. For the total of three page frames allocated to the process by the OS, how many page faults are generated by the following array-initialization loops, using LRU replacement, and assuming page frame 0 has the process in it (including the local variables i and j), and the other two pages are initially empty: a. b. for (j = 0; j < 100; j++) for (i=0; i < 100; i++) A[i][j] = 0; for (i = 0; i < 100; i++) for (j=0; j < 100; j++) A[i][j] = 0; 7. Consider the two-dimensional array A (stored in the heap memory): int A[100] [100]; Here, A[0][0] is stored at location 200, in a paged memory system with pages of size 200, and with integer numbers of size 4. A small process for manipulating the array resides in page 0 (addresses 0 to 199); thus, every instruction fetch will be from page 0. For the total of three page frames allocated to the process by the OS, how many page faults are generated by the following array-initialization loops, using LRU replacement, and assuming page frame 0 has the process in it (including the local variables i and j), and the other two pages are initially empty: a. b. for (j = 0; j < 100; j++) for (i=0; i < 100; i++) A[i][j] = 0; for (i = 0; i < 100; i++) for (j=0; j < 100; j++) A[i][j] = 0;
Expert Answer:
Related Book For
Operating Systems Internals and Design Principles
ISBN: 978-0133805918
8th edition
Authors: William Stallings
Posted Date:
Students also viewed these programming questions
-
Birnessite, [Na,K][Mn IV Mn III ]O 4 xH 2 O, is a mineral with a layered structure of the same type as CdI 2 (see Fig. 6.25) comprising octahedral MnO6 units. Na + and K + ions and H 2 O molecules...
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
For each polynomial function, complete the following in order. (a) Use Descartes rule of signs to determine the different possibilities for the numbers of positive, negative, and nonreal complex...
-
1. Why would the Fed likely have faced difficulties in its effort to combine activist and passive policymaking if the inflation rate had increased substantially while the unemployment rate remained...
-
Let MU A = z = 10 - x and MU B = z = 21 - 2 y, where z is marginal utility per dollar measured in utils, x is the amount spent on product A, and y is the amount spent on product B. Assume that the...
-
What is SE?
-
Changes in Cost Structure; Break-Even Analysis; Operating Leverage; Margin of Safety Morton Companys contribution format income statement for last month is given below: The industry in which Morton...
-
1. Emily places a loading ramp next to her truck. The height of the ramp is 7 feet, and an inclined portion of the ramp is 23 feet long. What angle does the ramp make with the ground? Round the...
-
WRITE IN PYTHON AND IN THE GIVEN CODE coderbyte medium Back-end Challenge In the Python file, write a program to perform a GET request on the route Time left: Unlimited time...
-
1. How many points must a lender charge for a 5 percent, 30-year note to achieve a yield of 6%? (Though the loan amount does not matter, assume a $100,000 loan for computations) A. Assume the...
-
Mary's income for tax year 2020-21 consists of business profits of 26,920, dividends received of 124,460 and rents received of 3,750. She is not a Scottish taxpayer and her personal allowance for the...
-
What are the differences between official development assistance (public foreign aid) and private development assistance from nongovernmental organizations (NGOs)? Which type of aid is more desirable...
-
What collector can turn the stream at left to the Map at right? A. Only grouping() B. Only groupingBy() C. Only partitioning() D. Only partitioningBy() E. Both grouping() and partitioning() F. Both...
-
What is the output of the following application? A. Saved B. Too far C. The code does not compile because of the main() method. D. The code does not compile because of the saveLife() method. E. None...
-
What is the result of the following? A. Both statements print 0. B. Both statements print 0.0. C. The statements print different values. D. The code does not compile. E. The code compiles but throws...
-
1. A conventional activated sludge plant without primary clarification operates under the following conditions: Design flow : 8100 m/d : 185 mg/L : 212 mg/L : 4 units, 12 m square x 4.5 m deep : 2600...
-
Federated Shipping, a competing overnight delivery service, informs the customer in Problem 65 that they would ship the 5-pound package for $29.95 and the 20-pound package for $59.20. (A) If...
-
The following state transition table is a simplified model of process management, with the labels representing transitions between states of READY, RUN, BLOCKED, and NONRESIDENT. Give an example of...
-
An I/O-bound program is one that, if run alone, would spend more time waiting for I/O than using the processor. A processor-bound program is the opposite. Suppose a short-term scheduling algorithm...
-
The UNIX kernel will dynamically grow a processs stack in virtual memory as needed, but it will never try to shrink it. Consider the case in which a program calls a C subroutine that allocates a...
-
You are managing a pension fund with a goal of maximizing the long-term growth rate. There are three assets available. Asset 1 has a risk-free return of 5%. Assets 2 and 3 each are driven by...
-
This exercise explores the sensitivity of \(\log\)-optimality to the rebalancing frequency. Consider a market consisting of a risk-free asset with zero rate of interest and a stock that over 1 year...
-
A game of chance based on a spinning wheel is available that pays \(n\) times money bet in the case of a win and nothing in the case of a loss. A gambler has developed a device by which he may...
Study smarter with the SolutionInn App