Code Monkey home page Code Monkey logo

noelv11 / resource-allocation-graph-program Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 928 KB

This program has a predefined limit of processes. Resources are then assigned by the user to the processes. Given the resource, the program will be able to point out to the process to which the particular resource(input) is allocated to. It showcases the job scheduling responsibility of the OS and coded in C++ Language

C++ 100.00%
os resource allocation

resource-allocation-graph-program's Introduction

Resource-Allocation-Graph-Program

This program aims to mimic the functionality of an OS,to generate a Resouce Allocation Graph,to give an idea of what resources are allocated to what processes.

Functionality of the Program

  • There is predefined limit of processes.The filesystem mimics a 4x3 structure
  • Resources are then assigned by the user to the processes.
  • Given the resource, the program will be able to point out to the process to which the particular resource(input) is allocated to.
  • If the resource is allocated to a process and facing a deadlock ,return counts of deadlock,along with the [row] [column] location where the resouce locates

Motivation

  • I am in constant awe of an OS.It is a super machine that is able to do anything
  • It's functionalities never cease to amaze me and I love the subject
  • This program is created as a humble action to mimic at least one feature of an OS

Programming Language Used

  • The program is coded in C++ Language

Screenshots

Case 1 -The user specifies 3 columns for the filesystem,while providing an input of 12 processes in total.

  • These processes are mapped to resources A,B and C
  • The user now provides a resource (4),to check for an occurance of deadlock

Output1

Since resource '4' resides at [1][1] and [2][1] it returns a deadlock count of 1 -Why? - It is because initial count of deadlocks are set to -1 Output 2

Case 2 - The user specifies a total of 4 processes,while allocating 12 resources

  • After allocation,the structured filesystem is displayed
  • It is observed that resource '6' is not allocated to any process

Output 3

  • After analysing the filesystem,the program displays that there are no deadlocks
  • A total count of -1 deadlocks are displayed

Output 4

Improvements:-

There is definitely a scope to increase the structure of the file system from a 4x3 matrix,to a user defined matrix It is one of the limitations,where the program comes short in.

This repository is open to the public,to collaborate and contribute.Get in touch with me and I would be more than happy

resource-allocation-graph-program's People

Contributors

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