Giter VIP home page Giter VIP logo

freddy10035 / demandpagingwithtlb Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 34.77 MB

This project simulates the process of demand paging in a virtual memory system, including the use of a Translation Lookaside Buffer (TLB) to speed up memory access. The TLB is a small, fast cache that stores recent mappings of virtual memory addresses to physical memory addresses.

Makefile 2.12% C++ 64.38% C 33.50%
demand-paging

demandpagingwithtlb's Introduction

Getting Started

Clone the repository to your local machine Navigate to the project directory and build the simulation by running the command make

Usage:

./main [inputfile] [page table size] [TLB size] [page replacement algorithm]

where:

  • inputfile is the name of the input file containing the virtual memory address traces
  • page table size is the number of pages that can be stored in the page table (in pages)
  • TLB size is the number of entries in the TLB (in pages)
  • page replacement algorithm is the algorithm to use for page replacement. Possible options are FIFO, LRU, OPT.
  • The output of the simulation will include statistics on the number of page faults, the TLB hit rate, and the page replacement algorithm used.

NOTE: Find the sample input files in the Input folder

Dependencies

g++ (or any c++ compiler)

Input format

The input file should contain a list of virtual memory addresses, one per line. Each address should be a decimal number.

Page Replacement Algorithms

FIFO: First-In, First-Out algorithm
LRU: Least Recently Used algorithm
OPT: Optimal Page Replacement algorithm

demandpagingwithtlb's People

Contributors

freddy10035 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.