Evaluate a virtual memory system

Assignment Help Data Structure & Algorithms
Reference no: EM13806616

The objective of this lab is to simulate and evaluate a virtual memory system, and experiment with different page replacement algorithms. You will need a threads package, e.g., pThreads thread package.

Assume that you have a 16-bit address space, 16 KB of main memory, and 2 KB page size. Virtual memory simulation consists of three components: a virtual address generation component, address translation component, and a statistics reporting component. Implement each component by a separate thread.

The virtual address generation component generates a sequence of 16-bit virtual addresses and writes them in an integer buffer inBuffer of size 10. Write a function getNextVirtualAddress( ) for generating virtual addresses. This function may generate virtual addresses at random or based on a trace obtained from some source.

The address translation component implements virtual address to physical address translation using a page replacement algorithm (select a page replacement algorithm). This component reads the next virtual address from inBuffer and translates that address to a physical address. It prints the virtual address and corresponding physical address in a file. It also increments an integer variable (numberOfPageFaults) on every page fault. Use appropriate bit operations (<<, >>, ~, |, &, etc.) to implement this address translation. Feel free to implement a separate version of this component for every page replacement algorithm you want to experiment with.

The statistics reporting component prints the total number of page faults (numberOfPageFaults) at the end.

Attachment:- virtula memory.txt

Reference no: EM13806616

Questions Cloud

Changes in employment relationships : What changes in employment relationships are likely to occur as the population ages? Do you think increasing age diversity will create new challenges for managers? What types of challenges do you expect will be most profound?
An indication of our unconscious desires and conflicts : Consider a situation where a boyfriend consistently gets into fights with his girlfriend. Which of the following potential explanations is more PARSIMONIOUS?
How does mcdonalds make money : What affects customers' willingness to pay? Think about what benefits and utility consumers get from buying products from this industry.  Where else could they go to fulfill a similar need or to get a similar experience? (e.g. mobile handset as a ..
Compare and contrast oppositional defiant disorder : Compare and contrast oppositional defiant disorder and conduct disorder. Compare and contrast the neurobiology of addiction with the sociocultural views of chemical dependency.
Evaluate a virtual memory system : The objective of this lab is to simulate and evaluate a virtual memory system, and experiment with different page replacement algorithms. You will need a threads package, e.g., pThreads thread package
What public policies influenced the court''s decision : Why did the court reach the holding that it did. What steps of logic did the court take in arriving at its decision
Implemented a distributed rental car management system : You implemented a distributed rental car management system using Java TCP Sockets and object streams. The goal of this project is to use code from your TCP project and create a new implementation of the rental car management system using Java RMI
Legislation relating to business regulation or taxation : A specific piece of legislation relating to business regulation or taxation. The "party platform" of either the Republican Party or the Democratic Party
Legislation relating to business regulation or taxation : A specific piece of legislation relating to business regulation or taxation. The "party platform" of either the Republican Party or the Democratic Party

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Determine storage required for bfs and dfs

Determine the minimum number of nodes expanded and storage required for BFS and DFS? (Hint: this question asks about the best case performance of BFS and DFS).

  Conceptual model entity relationship diagram

Assume you are asked you to create a new entity-relationship diagram for a corporation for a customized shipment tracking system.

  Why internet need http

Discuss why does the Internet need HTTP, TCP, IP and DNS? Explain why is not the Internet Protocol enough to do the job? Please reply to these specific points of confusion.

  Selection sort algorithm

Given the algorithm below for SelectionSort, trace the function by specifying the state of the input sequence after each call to swap()

  Online vs. face-to-face classes

Communication A significant distinction between online and face-to-face classes lies in the area of communication.

  Describe the use of a binary tree when searching for keys

question 1 discuss the use of a binary tree when searching for keys in an array. question 2 discuss the use of a binary

  Algorithm to produce a list of customers

Draw an algorithm to produce a list of customers from the Glad Rags Clothing Company's customer master file.

  Function to swap all the left-right subtrees of binary tree

Write a function, swapSubTrees, that swaps all of the left and right subtrees of a binary tree. write a method singleParent, that returns the number of nodes in a binary tree that have only one child.

  Describe an algorithm that takes as input a list

Describe an algorithm that takes as input a list of n distinct integers and finds the location of the largest even integer in the list or returns 0 if there are no even integers in the list.

  Write a program that uses a recursive algorithm to compute

Write a program that uses a recursive algorithm to compute the determinant of a maxtrix. It should read a matrix, print it out, and compute and print the determinant.

  Define a structure type

Define a structure type to represent a single CD. The year must be stored as an integer, all other fields should be strings. Because memory space will be an issue you may not assume a length for the string fields, but must dynamically allocate app..

  Using pseudocode, design an algorithm

BuzzButtons is a novelty item company manufacturing personalized lapel buttons. The owner is promoting his buttons by offering them at 99 cents each. He wants you to design a program asking the user for his or her name for the button, an e-mail addre..

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