Giter Site home page Giter Site logo

asad82 / os-memory-allocation-algorithms-simulation Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 3.0 128 KB

The two programs included in this repository simulate the Buddy System, First Fit, Next Fit, Best Fit and Worst Fit memory allocation algorithms used in numerous operating systems. Tree data structure was used for the implementation of buddy system where as two separate doubly link lists have been used to keep the record of the holes and the memory allocated to the processes in case of First Fit, Next Fit, Best Fit and Worst Fit algorithms simulation. The buddy system is a memory allocation and management algorithm that manages memory in power of two increments. In the first fit, the approach is to allocate the first free partition or hole large enough which can accommodate the request. It finishes after finding the first suitable free partition. The best fit deals with allocating the smallest free partition which meets the requirement. This algorithm first searches the entire list of free partitions and considers the smallest hole that is adequate. Next fit is a modified version of first fit. It begins as first fit to find a free partition. When called the next time it starts searching from where it left off instead of the beginning. In case of worst fit, the approach is to locate largest available free partition so that the left over portion will be big enough to be useful again.

License: MIT License

C++ 96.06% C 3.94%
bestfit bestfit-algorithm buddyalgorithm buddysystem firstfit memory-allocation memory-management nextfit operating-system worstfit

os-memory-allocation-algorithms-simulation's People

Contributors

asad82 avatar

Stargazers

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