Giter Site home page Giter Site logo

gridl / visualization-of-cpu-scheduling-algorithms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tapaswenipathak/visualization-of-cpu-scheduling-algorithms

0.0 1.0 0.0 16 KB

Visualization of CPU Scheduling Algorithms.

License: MIT License

C 99.05% Shell 0.95%

visualization-of-cpu-scheduling-algorithms's Introduction

Visualization of CPU Scheduling Algorithms

Code structure

  1. struct.h: This has structure of the process which has process ID, arrival time, burst time and struct object. Create struct object in this file if you need more process objects.

  2. generatepid.c: This generates and assigns process ids, arrival time, burst time.

  3. main.c: This file is used to let the user provide the number of processes which is later used in other files.

  4. graphics.c: This has basic implementation of visualization using C graphics library graphics.h. To add implementation of any new CPU scheduling algorithm:

    • Change the name of the algorithm
    • Manipulate the sorting algorithm

Instructions

To use this code you need to install some packages and libraries which will enable you to compile graphics.h program in Linux.

  1. sudo apt-get install build-essential

  2. For Ubuntu 16.04: sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-2.0 guile-2.0-dev libsdl1.2debian-all libart-2.0-dev libaudiofile-dev libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-dev libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev libslang2-dev libasound2 libasound2-dev

  3. Download libgraph.

    tar -xvzf libgraph-1.0.2
    
    cd libgraph-1.0.2
    
    ./configure
    
    sudo make
    
    sudo make install
    
    sudo cp /usr/local/lib/libgraph.* /usr/lib
    

Compile and Run

  1. Compile and run the source code files.

    gcc generatepid.c struct.h graphics.c main.c -lgraph
    
    ./a.out
    
  2. Enter the number of process and view how these CPU scheduling algorithm works. Everything will be genrated randomly.

visualization-of-cpu-scheduling-algorithms's People

Contributors

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