Code Monkey home page Code Monkey logo

os2's Introduction

Memory Management Simulation

C project

Details:
Produce statistics based on the behavior of page replacement algorithms LRU and Second Chance
Two Threads read 2 different trace files alternately and load them into main memory.
Main memory is implemented by a queue-array.
The virtual memory is implemented by a hash table for each thread.

Statistics include:
Queue size (memory frames number),
Total iterations, Total P1 (gcc) iterations, Total P2 (bzip) iterations,
Total pagefaults, Total hits, Total updates,
Total reads from disk, Total writes on disk

What you need:

- A Linux Distribution OS

- In terminal:

sudo apt install gcc -y

sudo apt install make -y

In the project folder, open a terminal

Compile with: make all

Execution: ./main.ex [algorithm (0/1)] [frames number] [q] (max entries)

~ Page replacement algorithm options are 0 for LRU and 1 for Second Chance

~ frames number stands for memory capacity

~ q stands for continuous trace entries a thread will refer before switching to the other thread

~ max entries is the total entries (from both threads) that the simulation will stop at

Example executions:

./main.ex 0 96 10 400

./main.ex 0 2048 11 100000

./main.ex 1 2 1 500000

./main.ex 1 5120 17 2000000

os2's People

Contributors

john-fotis 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.