Demonstrate various page replacement algorithms

Assignment Help Operating System
Reference no: EM13705333

Objective: Demonstrate various page replacement algorithms.

Problem Statement:

For this project you are to implement a program that accepts a choice of a replacement algorithm (FIFO, OPT, or LRU), a number of memory frames, and a reference string. For development purposes you can use the following data:

F,4,2,3,2,1,5,2,4,5,3,2,5,2

O,3,1,2,1,3,1,4,1,5,1,6,1,7,1,8

L,5, 2,3,2,1,5,2,4,5,3,2,5,2

The input file will be given to students through the class web-site.

Your program should calculate the number of page faults and display an output similar, Virtual memory, depending on the algorithm selected. (When no page fault occurs you may show the column as blank or you may simply show the pages that are there without any change.)

You will assume that the reference string is generated by one process and consider local replacement only. This is an example of desired output using FIFO and 4 frames.

for FIFO
2: <2, , , >
3: <2,3, , >
2: <2,3, , >
1: <2,3,1, >
5: <2,3,1,5>
2: <2,3,1,5>
4: <4,3,1,5>
5: <4,3,1,5>
3: <4,3,1,5>
2: <4,2,1,5>

5: <4,2,1,5>

2: <4,2,1,5>

The number of page fault using FIFO = 6

You can use any programming language for the implementation. In addition, you can develop the program on the platform of your choice. Keep in mind how easy it is for the TA to run your program.

Write-up

You should submit a write-up as well as your program. Your write-up should include any known bugs, limitations, and assumptions in your program. This wirte-up should be in text-format and titled as ‘README'. It should be submitted along with your code. TA will use the ‘README' file to compile (or install) and run your program. If the TA has trouble with your program then he will contact you to makeup it.

Reference no: EM13705333

Questions Cloud

Calculate the lattice parameter for each of these unit cells : Iron is a polytropic material. At room temperature, it has a BCC crystal structure (alpha-iron or ferrite). Upon heating above 912C, it converts to a FCC crystal structure (-iron or austenite). If heated above 1394?C, it converts to a different BCC s..
Determine the power required to drive the pump : A centrifugal pump draws water from a reservoir through a 4.0 in diameter pipe and delivers it to a 2.0 inch discharge pipe. A pressure gage on the discharge pipe is located 6.0ft above the free surface of the reservoir and reads 45psig.
Horsepower required to operate pump to discharge in tank : Water is pumped from a reservoir to a tank with a lift of 20.0 ft. The suction pipe, which connects the reservoir to the pump, has a 12in diameter and is 25ft long. The discharge pipe, which connects the pump to the tank, has a 10in diameter and is 4..
Laminar flow conditions-hydraulically-smooth horizontal pipe : Oil (p = 800 kg/m3 , u (mu) = 3.0 x 10^-3 kg/ms) is to be pumped at a rate of at least 6.3 x 10^-5 m3/s through hydraulically-smooth horizontal pipe with an equivalent length of 300 m. The pressure at the pipe inlet is 198 kPa (abs).
Demonstrate various page replacement algorithms : Demonstrate various page replacement algorithms - Calculate the number of page faults and display an output
Determine the pressure in the vessel and the enthalpy : Water is contained in a 0.2 m3 vessel at 200 C. The mass of water in the vessel is measured to be 2 kg. Determine (a) the pressure in the vessel, (b) the enthalpy, h, of the water in kJ/kg, (c) the mass and volume of vapor in the vessel.
What is the mass of air in the cylinder : The cylinder of a turbocharged diesel engine is filled with air at 30.0 psia and 250°F. When the intake valve closes, cylinder volume is 60.0 in3. The piston moves upward un-til cylinder volume is 4.00 in3, at which time pressure is 1100 psia. What ..
The acceleration of a particle is defined by the equation : The acceleration of a particle is defined by the equation a = -k*sqrt(v), where k is a constant. When t=0, the initial position is xo=0 and the initial velocity is vo=81ft/s. Knowing that v =36ft/s when x=18ft, determine the velocity of the particle ..
Determine how to best maximize the amount of net fixed asset : Analyze the accounting for each fixed asset class using US GAAP and IFRS and determine how to best maximize the amount of net fixed assets.

Reviews

Write a Review

Operating System Questions & Answers

  Task 1nbspon a fictitious computer of 32 bits paging memory

task 1nbspon a fictitious computer of 32 bits paging memory management system is used to manage its main memory

  Explain the function of input controls

Explain the function of input controls and identify four types of input control and explain the function of each

  What is life cycle costing

What is Life Cycle Costing. Describe briefly the methodology for Life Cycle Costing. What are the criteria to consider when a procurement officer is faced with the decision of procuring a used equipment instead of a new one.

  Deadlock prevention.

Describe what changes could be made to an operating to break the conditions of non-preemption and hold and wait for deadlock prevention. What are the drawbacks of your changes?

  Write a program that will accept the names of 3 processes

Write a program that will accept the names of 3 processes as command-line arguments. Each of these processes will run for as many seconds as: (PID%10)*2+3 and terminate.�

  Write a recursive descent parser

Perform the pairwise disjointness test for each rule to show that this grammar allows top-down parsing.

  Time consuming phase of the data warehousing project

Proper design and implementation of the ETL process is crucial to a BI project. ETL is considered the most time consuming phase of the Data Warehousing project. Therefore, anything that might go wrong with this process will significantly affect the s..

  describe how you would do so with a positive feedback loop.

Describe how you would use a negative feedback loop to manage your bank balance.Describe how you would do so with a positive feedback loop. Explain which you would prefer and why?

  What is the predication about of the next run time?

1). An aging algorithm with a = 1/2 is used to predict run times. The previous four runs, from oldest to most recent, are 30, 10, 20, 40 msec. what is the predication about of the next run time? You may use regular arithmetic or binary with bit shift..

  Creating algorithms to print the daily salary

Construct two algorithms to print the daily salary of a worker who, each day, is paid twice the previous day's salary for a thirty day period.

  Determine the average seek time of traversed disk

Traversed Disk receives request to access random sector on random track. Suppose head starts at track 0. Determine the average seek time?

  Individual operating systems

Discuss and explain the statement: "Global communication has developed to such a degree that the true operating system is the net itself, where the individual operating systems are just its nodes".

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