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...
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
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...
-
Suppose that people who previously had held jobs become structurally unemployed due to establishment of new government regulations during a period in which the inflation rate remains unchanged. Would...
-
This activity raises a concern that transgenic crops may reduce biodiversity. In your own words, explain how this might occur and why it is significant.
-
It looks to me that you have devoted everything to this company and they have treated you badly. Is that right?
-
Parry Company has accounts receivable of $95,400 at March 31, 2012. An analysis of the accounts shows these amounts. Credit terms are 2/10, n/30. At March 31, 2012, there is a $2,100 credit balance...
-
Unpolarized sunlight goes through two pairs of sunglasses. The second pair is oriented 20 o respect to the first. What is the exiting intensity in terms of the initial intensity I0?
-
A plank of weight 70N and length 5m rests on supports at points C and D. The distance from A to C= 0.4m. The reaction on the rod at C is 9N. Calculate the reaction force at point D, calculate the...
-
The Loftis Company is preparing its pro forma financial statements for the next year using this model. The abbreviated financial statements are presented below: Sales Growth 20% Tax Rate 34% Income...
-
Knowing that the allowable stress in section a-a of the hydraulic press shown is 9 ksi in tension and 15 ksi in compression, determine the largest force P that can be exerted by the press. 12 in. 1...
-
Junid is interested in investing in share market of Canada and France. He has gathered the following information on the share market: Share Market Return (%) Standard Deviation (%) Correlation Canada...
-
Gains and losses on pension assets and liabilities used to be only disclosed, but now they are recognized on the balance sheet. have always been disclosed but not recognized. used to be recognized on...
-
10. A planet is orbiting a star with radius of 4.0 x 101 m and a period of 1100 days (24 hour day). What is the mass of this star? 11. If a curved road with radius of 90 m is properly banked for a...
-
The market value of EEL Ltd's equity is $50 million and it has $50 million debt. Management intends to issue bonds $20 million worth of bonds and use the proceeds to repurchase some outstanding...
-
Solve for the equilibria of the following discrete-time dynamical systems Pr pt+1 = Pr+2.0(I-Pr)
-
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...
-
The group \(\mathrm{D}_{3}\) in Schoenflies notation (32 in international notation, which is read "three-two"; see Table 5.1 ) consists of the proper (those not reflections or inversions) covering...
-
Derive the two-dimensional matrix representation Tic)=(2) Tin)=(3) Tex)=(37) (69) T(c2b)= 1 TO)-(71) 10-(11) TO=(9) = for the group D3, using the basis (e1, e2) defined in the following figure.
-
Prove that the matrix representation of \(\mathrm{D}_{3}\) worked out in Problem 5.6 is irreducible. Data from Problem 5.6 Derive the two-dimensional matrix representation Tic)=(2) Tin)=(3)...
Study smarter with the SolutionInn App