Giter VIP home page Giter VIP logo

virtual-memory-manager's Introduction

Virtual memory manager simulator. Using linux functions forks, semaphores, and locked memory to simulate shared memory across multiple processes.

Simulate 6 different page replacement algorithms : LIFO, MRU, LRU, LFU, OPT-X, and WS. So there will be 6 different outputs.

Can run processes concurrently or can take turns respective to the input.

Process will halt if there in no more space in main memory segment. Process will resume once previous process completes and terminates.

Expected input type: tp /* total_number_of_page_frames (in main memory) / ps / page size (in number of bytes) / r / number_of_page_frames_per_process for LIFO, MRU, LRU-K, LFU and OPT, or delta (window size) for the Working Set algorithm / X / lookahead window size for OPT, X for LRU-X, 0 for others (which do not use this value) / min / min free pool size / max / max free pool size / k / total number of processes / pid1 size1 / process_id followed by total number of page frames on disk */ pid2 size2 : : : : pidk sizek These parameters are followed by a list of process id and address pairs: pid addr.

Address is broken down into address and offset. For example: 0x0F would be 00001111. Adress would be 0000 and Offset would be 1111.

To compile program: g++ -o main main.cpp -lpthread

To run program: ./main

replace input.txt with whatever input file.

Output will be in output.txt

virtual-memory-manager's People

Contributors

keychainz avatar

Watchers

 avatar

virtual-memory-manager's Issues

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.