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

  Discuss and provide examples of mutual exclusion

Discuss and provide examples of the following concurrency issues associated with an OS: 1. Mutual exclusion 2. Deadlock 3. Starvation

  Formulate the above in terms of a linear programming problem

Formulate the above in terms of a Linear Programming problem Solve this linear program graphically. Determine the quantity of each type of toaster that will maximise the maximum profit

  Specify the order in which processes execute

Specify the order in which processes execute and determine the mean process turnaround time for each of the scheduling algorithms.

  Illustrate how many entries are there in logical address

Consider a computer system with 48-bit logical address and 4-KB page size. System supports up to 1 GB of physical memory. Illustrate how many entries are there in each of the following?

  Characterize page fault rate-process first start execution

When a process first start execution, how would you characterize the page fault rate? Once the working set for a process is loaded into memory, how would you characterize the page fault rate?

  What is cpu utilization for round-robin scheduler

when a process requests for I/O operations, it will suspend and another process will need to be selected for execution. What is the CPU utilization for a round-robin scheduler.

  Threads

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

  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.

  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

  Analyse the different methods for collecting data

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

  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.

  Draw curves for throughput-delay and power

Assume two hosts A and B are connected via router R. A-R link has infinite bandwidth; A-R link has infinite bandwidth; draw curves for throughput, delay, and power, each as function of load.

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