美文网首页
Operating System代写:CS611 VM Page

Operating System代写:CS611 VM Page

作者: zangjixie | 来源:发表于2019-04-21 19:04 被阅读0次

    代写OS中的内存换页算法,代码量虽不大,但是调试非常麻烦。AimBy doing this practical work, you will learn how to implement page replacement algorithms, gain experience in creating and evaluating a simple simulator, and develop your skills in scientific writing.IntroductionIn class, we have explored a variety of page replacement algorithms for managing virtual memory.In this practical, you will evaluate how real applications respond to a variety of page replacement algorithms. Of course, modifying a real operating system to use different page replacement algorithms is quite a technical mess, so we will simulate it instead. You will extend a program that simulates the behaviour of a memory system using a variety of page replacement algorithms.Then, you will use memory traces from real applications to evaluate your algorithms properly. A main outcome of your work will be a report. The report itself counts for 60% of this assignment, so you should be sure to spend time thinking about what to measure, and what the significance of your results are.Memory TracesWe provide you with four large memory traces to use for your evaluation. Each trace is a real recording of a running program, taken from the SPEC benchmarks. Real traces are enormously big: billions and billions of memory accesses. However, a relatively small trace will be more than enough to keep you busy. Each trace only consists of one million memory accesses taken from the beginning of each program. Each trace is compressed with gzip, so you will have to uncompress it with a command like this:> gunzip –d gcc.trace.gz Each trace is a series of lines, each listing a hexadecimal memory address followed by R or W to indicate a read or a write. For example, gcc.trace trace starts like this:0041f7a0 R 13f5e2c0 R 05e78900 R 004758a0 R 31348900 W Simulator RequirementsYour job is to build a simulator that reads a memory trace and simulates the action of a virtual memory system with a single level page table. Your simulator should keep track of what pages are 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 be replaced is dirty, it must be saved to disk. Finally, the new page is to be loaded into memory from disk, and the page table is updated. The current simulator fixes the pages and page frames size to 4 KB (4096 bytes).This is just a simulation of the page table, so you do 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 different page replacement algorithms. rand replaces a page chosen completely at random. lru always replaces the least-recently-used page. esc (enhanced second chance) performs the replacement algorithm described in the textbook section 9.4.5.3.The simulator accepts 4 arguments as followsthe name of the memory trace file to use.the number of page frames in the simulated memory.the page replacement algorithm to use : rand/lru/escthe mode to run: quiet/debugIf the mode is “debug”, the simulator prints out messages displaying the details of each event in the trace. You may use any format for this output, it is simply there to help you debug and test your code. If the mode is “quiet”, then the simulator should run silently with no output until the very end, at which point it prints out a summary like this:total memory frames: 12 events in trace: 1002050 total disk reads: 1751 total disk writes: 932 page fault rate: 0.83 Your solution will be run as shown :> java Memsim trace1 32 lru debug In the tarfile provided there is a code skeleton called Memsim.java that reads the parameters, processes the trace files and for each access it generates a page read or write request. Your job is to implement the memory management unit for each replacement policy. You should start thinking how you can keep track of what pages are loaded, how to find if the page is resident or not, and how to allocate frames to pages. Some short traces (trace1, trace2 and trace3) are provided to facilitate testing of your code.Alternatively, if you prefer to use the C language, there is an equivalent skeleton of the simulator called memsim.c in the folder.You simulator code should be saved in an svn directory, and submitted using the web submission system, by the code deadline.ReportAn important component of this practical is a report describing and evaluating your work. Your goal is run the simulator to learn as much as you can about the four memory traces (swim, bzip, gcc and sixpack). For example, how much memory does each traced program actually need? Which page replacement algorithm works best when having a low number of frames? Does one algorithm work best in all situations? What is the size of the working set?Think carefully about how to run your simulator. Do not choose random input values. Instead, explore the space of memory sizes intelligently in order to learn as much as you can about the nature of each memory trace. Your report should have the following sections:Introduction: A section that explains the essential problem of page replacement and briefly summarizes the structure and implementation of your simulator. Do not copy and paste text from this project description. Describe it using your own words.Methods: A description of the experiments that you performed. As it is impossible to run your simulator with all possible inputs, so you must think carefully about what measurements you need. Make sure to run your simulator with an excess of memory, a shortage of memory, and memory sizes close to what each process actually needs.Results: A description of the results obtained by running your experiments. Present and compare the performance of each algorithm on each memory trace using graphs that show the page fault rate over a range of available memory sizes. In the text, explain what each graph or table shows and point out any interesting or unusual data points.Conclusions: Describe what you have learned from the results.Report length: use enough space to say what needs to be said; a one page report is probably too short; a six page report is too long. Your report must be well structured and free of typos and errors. Each group must submit a PDF file by the due date.本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

    相关文章

      网友评论

          本文标题:Operating System代写:CS611 VM Page

          本文链接:https://www.haomeiwen.com/subject/sswjgqtx.html