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
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
|