Array-initialization loops using lru replacement algorithm, Operating System

Assignment Help:

Q. Consider the two-dimensional array A:

int A[][] = new int[100][100];

Whereas A [0][0] is at location 200 in a paged memory system with pages of size 200. A little process is in page 0 (locations 0 to 199) for manipulating the matrix thus every instruction fetch will be from page 0.

For three page frames how various page faults are generated by the following array-initialization loops using LRU replacement and assuming page frame 1 has the process in it 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;

Answer:

a. 50

b. 5,000


Related Discussions:- Array-initialization loops using lru replacement algorithm

Write a note on threads, Question 1 Explain (a) tightly coupled systems   ...

Question 1 Explain (a) tightly coupled systems                               (b) Loosely coupled system Question 2 Describe the RPC model Question 3 Write a note o

What do you mean by semaphore?, What do you mean by semaphore?  Semap...

What do you mean by semaphore?  Semaphore : A synchronization variable that acquires on positive integer values. Invented by the Dijkstra P (semaphore): an atomic proce

List post-installation procedures that need to be performed, Problem: (...

Problem: (a) Based on your experience in setting up Windows 2003 Server operating system, briefly describe the twelve different steps in which the installation is conducted du

State the advantage of multiprocessor system, State the advantage of multip...

State the advantage of multiprocessor system? The advantages of multiprocessor system are:- a)      Enhanced throughput. b)      Economy of scale. c)       Enhanced re

Memory management, example of first fit best fit and worst fit

example of first fit best fit and worst fit

Define the turn-around time of a user job, Define the “turn-around” time of...

Define the “turn-around” time of a user job Turn- around time is total time taken to execute the job.

Semispace, Semispace works by maintaining two disjoint areas from which mem...

Semispace works by maintaining two disjoint areas from which memory can be allocated. These areas are called the from-space and the to-space. At ?rst, the algorithm allocates memor

What do you mean by first fit, What do you mean by first fit? First fit...

What do you mean by first fit? First fit allocates the first hole that is big sufficient .Searching can either start at the starting of the set of holes or where the previous f

Explain segmentation and paging, Why are segmentation and paging sometimes ...

Why are segmentation and paging sometimes combined into one scheme? Segmentation and paging are often combined in order to improve upon each other. Segmented paging is helpful

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd