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

  Change current operating system of plant

The software house has been contacted by a Governmental Nuclear Reactor Agency that wants to change the current Operating System of their plant.

  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"

  Explain page trace analysis using fifo

Increase size of memory so it contains four page frames for public use. Using same page request as above and FIFO, do another page trace analysis and calculate the failure and success ratio.

  Write down three parts of linux kernel version number

Write down the three parts of Linux kernel version number, and which is least probable to change? What are "BogoMIPS", and what is their significance?

  How many page faults are generated using lru replacement

How many page faults are generated by the following arrayinitialization loops, using LRU replacement, and assuming page frame 1 has the process in it, and the other two are initially empty.

  Stand alone child process

Forking the child process

  Explain decision variables in relation to linear programming

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

  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.

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Intermediate level tasks

Intermediate Level Tasks :  Below is a simple program. It creates 2 threads. The first thread keeps printing out X on the screen, and the second thread keeps printing out O on the screen.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Calculate effective access time of system

Assuming fetches to main memory are started in parallel with look-ups in cache, calculate the effective (average) access time of this system.

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