Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

 

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;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Operating Systems Internals and Design Principles

Authors: William Stallings

8th edition

133805913, 978-0133805918

More Books

Students also viewed these Programming questions

Question

Define self-expectancy and explain two ways to boost it.

Answered: 1 week ago