Giter VIP home page Giter VIP logo

nsysu-2019-advanced-operation-system-homework-1's Introduction

Advanced Operating Systems - Homework 1

Page Replacement Algorithms and Evaluation

Motivation

You have learned several page replacement algorithms in class. Homework 1 asks you to implement some of these algorithms, propose your own idea, and evaluate their system performance

Specification

  1. Reference string: 1~500
  2. Number of memory references: At least 100,000 times
  3. Number of frames in the physical memory: 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
  4. Three test reference strings:
    • Random: Arbitrarily pick one number for each reference.
    • Locality: Simulate function calls. Each function call may refer a subset of 1/20~1/ 10 string (the length of string can be random).
    • Your own reference string (not same to the above two settings). However, you should discuss why you choose such a reference string in the report.
  5. You can use both reference and dirty bits.

Requirements

  1. You need to implement THREE algorithms for comparison: (1) FIFO algorithm (2) Optimal algorithm (3) Enhanced second-chance algorithm

  2. In addition, you should develop your own algorithm (not in the textbook). Your algorithm is expected to at least win the FIFO one (in terms of the page-fault rate or cost), where the cost is defined by the number of interrupts required and the number of pages needed to be written back to the disk. Recall that every time when you invoke the OS to do something, interrupt is always necessary.

  3. For each algorithm and reference string, your report should present the following three figures:

    • The relationship between page faults and the number of frames.
    • The relationship between the number of interrupts and the number of frames.
    • The relationship between the number of disk writes (in pages) and the number of frames.

    In addition, your report should give some discussions about the behaviors of these algorithms.

  4. You need to demonstrate your program to TAs and submit your report in class.

Due Day

2019/10/ 31

Grading Policy

Programming 65% (including 5% for comments) Report 35% Note If you do NOT demonstrate your program to TAs, you will get zero point in this homework even though you submit your code and report.

nsysu-2019-advanced-operation-system-homework-1's People

Contributors

zephyrxvxx7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.