Giter Site home page Giter Site logo

os_course_project's Introduction

OS_COURSE_PROJECT

Problem Statement:

Implement the following algorithms in C or C++ without using existing/predefined classes.

i. LRU - Counter Method
ii. LRU - Stack Method
iii. LRU - Aging Register Method
iv. Apprx. LRU - Clock Method

Compare the contrast the results by testing the algorithms with different corner cases.

Draw the graph for the number of frames vs. the number of page faults.

Draw the graph for the average time taken to execute the algorithms for different corner cases.

Perform the complexity analysis.

Write your comments/critical analysis/study report on your results and complexity.

How to run:

TO run

  1. g++ .cpp -o <executable_file_name>
  2. ./<executable_file_name> number_of_frames \directory<input_file>.txt

Example: 1. g++ LRU_counter.cpp -o LRU_counter 2. ./LRU_counter 4 TEST_CASES\test2.txt

Time complexities of each algo:

LRU_counter.cpp -> time complexity= O(Total number of frames * size of page stream ) i.e. O(fp)

LRU_Stack.cpp -> time complexity= O(Total number of frames * Page Faults ) i.e. O(f
p_f) (conisdering unordered_map performance ot be O(1))

LRU_Aging_Register.cpp -> time complexity= O(size of page stream * Number of Registers)

App_LRU_Clock_Algo.cpp -> time complexity= O((frames + additional_cost) * size of page stream ) i.e. O((f+s_c)*p) (additional cot for maintaing the clock and giving 2nd chance

Graphs and comparision of the algos along with explanation of corner and test cases are included in Report.docx file

os_course_project's People

Contributors

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