How many page faults are generated array-initialization loop

Assignment Help Operating System
Reference no: EM1371857

Consider the two-dimensional array A:

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

where A[0][0] is at location 400, in a paged memory system with pages of size 400. A small process is in page 0 (locations 0 to 399) for manipulating the matrix; 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, 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;

 

Reference no: EM1371857

Questions Cloud

Risky behavior amoung youths in behavioral economics : Determine what is Risky Behavior Amoung Youths in Behavioral Economics and explain how does it affect the economy?
Design application-layer protocol for streaming video : Suppose you are designing the application-layer protocol for streaming video. How would you deal with unreliability of Internet Protocol?
Depict an isoquant map : Depict an isoquant map depicting a typical firm's use of two inputs - white and black labor. Label its slope. What would be the effect of an increase the price of black labor from $12 to $13 and a decrease in the price of white labor from $13 to $12..
Decision management and decision control : Define and explain the terms decision management and decision control. Under what situations might it be optimal to make one individual responsible for both decision management and decision control?
How many page faults are generated array-initialization loop : Illustrate how many page faults are generated by following array-initialization loops, using LRU replacement, and assuming page frame 1 has process in it, and the other two are initially empty?
Determine the annual break even point : Andre has asked you to evaluate his business, Andre's Hair Styling. Andre has five barbers working for him. Each barber is paid $9.90 every hour and works a forty hour week and a fifty week year,
Capital and labor elasticity of production : what are the capital (k) and labor (L) elasticities of production? What do these elasticities tell you? Log Q=-1.5+.52log k+.65log L
Write down the body of method for header : Write down the body of method for the following header. Method must return the welcome message which includes the user's name and visitor number.
Maximizing total production function : Suppose that raw materials (input R) are fixed at 10 units. Determine the number of units of input L that maximizes the total product function.

Reviews

Write a Review

Operating System Questions & Answers

  Give three technical merits of unix

Give three technical merits of UNIX b) Differentiate between "clustered systems" and "real-time systems". c) Describe the purpose of using "trust relationship"

  Operating system maps user-level threads to kernel

Suppose an operating system maps user-level threads to the kernel using the many-to-many model and the mapping is done through LWPs.

  Explain how a race condition is possible

the wife calls deposit (). Describe how a race condition is possible and what might be done to prevent the race condition from occurring.

  Write pseudocode of thread with and without semaphores

Assume we have two threads A and B A and B are to repeatedly print out ping and pong. Write down pseudocode of thread A and B How can this be solved with and without semaphores.

  Explain decision variables in relation to linear programming

Explain the following terms in relation to linear programming problems- (1) decision variables (2) objective function

  Analyse the different methods for collecting data

Analyse the different methods for collecting data Explain by taking examples 3 types of Sampling techniques.

  Fragmented mean in reference to hard drives

What does fragmented mean in reference to hard drives, and what, if anything, should be done to prevent it. Describe the general path data takes in an application from user input to the computer hardware.

  Write the start-up steps in windows nt

Write the start-up steps in Windows NT. Provide estimate for the capital investment needed in computer forensics for a 2,000,000 population.

  Why thread belonging to same process affected by page fault

Other user user threads belonging to the same process also be affected by the page fault (i.e., would they also have to wait for the faulting page to be brought into memory?) Explain.

  Challenges os faces-passing parameter among user-kernel mode

Write two challenges an OS faces when passing parameters between user and kernel mode. Describe how an OS can overcome them

  Design virtual memory system for new operating system

You are asked to design the virtual memory system for a new operating system working on small mobile devices. The memory operates at 333 MHz with a word size of 4 bytes.

  Create algorithm which prevents deadlock using one semaphore

Using exactly one semaphore, create an algorithm which prevents deadlock. Do not be concerned about starvation and inefficiency.

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