Write C++fifo job, FIFO, C + + programming job generation, C + + program course Assignment

Source: Internet
Author: User
Tags prefetch


Your implementation of the code is due 11:59pm on Wed 25th October (Week 12)
0Your code would be submitted using SVN and the WEB submission System
0The SVN directory for your code is 2017/S2/OS/ASSIGNMENT2
0Your code should is written in C + +.
0It would be compiled using g++-std=c++11 *.cpp-o Memsim
0For late code submissions The maximum mark you can obtain'll be reduced by
25% per day (or part thereof) past the due date or any extension your is granted.
Postgraduate students must complete and submit this assignment individually, making
Individual submissions.
Undergraduate students may choose-to-complete and-submit in teams for most
Students.
Marking?? scheme
This assignment are out of 15:
Implementation for FIFO (automarked)
For ARB implementation (automarked)
Working Set Implementation (automarked)
Marks for code quality (structure and comments; manually marked)
Introduction
Following our discussion of paging in lectures, this practical would allow you to explore how real
Applications respond to a variety of page replacement schemes. Since Modifying a real
Operating system to use different page replacement algorithms can be quite a technical
Exercise, your task would be is to implement a program that simulates the behaviour of a memory
System using a variety of paging schemes.
Memory?? Traces
We provide you with three (3)? Memory traces to assist you developing your simulator. each
Trace is a small portion of real recordings of running programs taken from benchmarks and my
PC;)
Each trace was a series of lines, each listing a hexadecimal memory address preceded by R or W
To indicate a read or a write. There is also lines throughout the trace starting with a # followed
By a process ID and command. For example, a trace file for GCC might start like this:
# 694 GCC
R 0041f7a0
R 13f5e2c0
R 05e78900
R 004758a0
W 31348900
Simulator?? Requirements
Your task is to write a simulator that reads a memory trace and simulates the action of a virtual
Memory system with a single-level page table.
Your memory system should keep track of which pages is loaded into memory.
As it processes each memory event from the trace, it should check to see if the
Corresponding page is loaded.
If not, it should choose a page to remove from memory.
Of course, if the page to being replaced is dirty, it must being saved to disk.
Finally, the new page is to being loaded into memory from disk, and the page table is
Updated.
This is just a simulation of the page table, so does not actually need to read and write data
From disk. When a simulated disk read or write must occur, simply increment a counter to keep
Track of disk reads and writes, respectively.
You must implement three (3) different page replacement algorithms:
Fifo? Replaces the page, has a been resident in memory longest.
See Textbook Section 9.4.2.
Arb? (Additional reference bits) uses multiple reference bits to approximate a LRU
Scheme. Your implementation should use an 8-bit shift register.
See Textbook section 9.4.5.1.
Wsarb? Extends the ARB page replacement algorithm, by using a working set model to
Keep track of page access ' over a period of time for each process. It Prepages in a
Process ' working set when a context switch to that process occurs.
See Textbook section 9.6.2.
The lines in the trace file beginning with # represent context switches.
Running? Your???
The simulator should accept arguments as follows:
1. The filename of the trace file
2. The output mode (QUIET/DEBUG)
3. The Page/frame size in bytes (we recommend your use of 4096 bytes when testing).
4. The number of page frames in the simulated memory.
5. The page replacement algorithm to Use:fifo/arb/wsarb
If the page replacement algorithm is ARB,? It should accept the following additional argument:
6. The interval, in page references for shifting the reference bits.
If the page replacement algorithm is Wsarb,? It should accept the following additional arguments:
6. The interval, in page references, for shifting the reference bits.
7. The size of the Working Set window??, in page references.
The trace provided should is opened and read as a file, not? Parsed as text input from stdin.
Your solution would be run as shown:
./memsim test.trace quiet 4096 FIFO > Output.txt
Output
If the mode is ' Debug ', the simulator prints out messages displaying the details of each event in
The trace. You could use the any format for this output, it's simply there to the help you debug and test
Your code.
If the mode is "quiet" and then the simulator should run silently with no output until the very end, at
Which point it prints out a summary like this:
Events in trace:1002050
Total Disk reads:1751
Total Disk writes:932
Page faults:1751
Prefetch faults:0
Where:
Events???? Trace? Is the number of memory access ' in the trace. Should is equal to
Number of lines in the trace file, start with R or W. Lines starting with # does not count.
Total, disk? reads? is the number of times pages has to was read from disk.
Total, disk? writes? is the number of times pages has the to being written back to disk.
Page?? faults? Should is equal to the number of disk reads in a demand paging system.
Prefetch?? faults? Is page faults that occur as part of loading the working set following a
Context switch. They is not counted in page faults. This + page faults = = Disk reads.
Http://www.daixie0.com/contents/13/1248.html

The core staff of the team mainly include Silicon Valley engineers, bat front-line engineers, domestic TOP5 master, PhD students, proficient in German English! Our main business scope is to do programming big homework, curriculum design and so on.

Our Direction field: Window Programming numerical algorithm AI Artificial Intelligence financial statistical Metrology analysis Big Data network programming Web programming Communication Programming game Programming Multimedia Linux plug-in programming API image processing embedded/Microcontroller database programming console process and thread Network security assembly language Hardware programming software Design Engineering Standard Rules. The generation of programming languages or tools including, but not limited to, the following ranges:

C/c++/c# Write

Java Write generation

It generation

Python writes

Tutoring Programming Jobs

The MATLAB Generation writes

Haskell writes

Processing Write

Linux Environment Setup

Rust Generation Write

Data Structure assginment Data structure generation

MIPS Generation Writing

Machine Learning Job Writing

Oracle/sql/postgresql/pig database Generation/Generation/Coaching

Web development, Web development, Web site jobs

Asp. NET Web site development

Finance insurace Statistics Statistics, regression, iteration

Prolog write

Computer Computational Method Generation

Because of professional, so trustworthy. If necessary, please add qq:99515681 or e-mail:[email protected]

: Codinghelp

Write C++fifo job, FIFO, C + + programming job generation, C + + program course Assignment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.