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

  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.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  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.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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