Code Monkey home page Code Monkey logo

cpu-scheduling's Introduction

CPU Scheduling

Introduction

Problem Statement:

Write a program to simulate the scheduling of processes in an operating system.

The following CPU scheduling algorithms are implemented in this C project:

  • First Come First Serve
  • Shortest Job First
  • Priority Based Scheduling
  • Round Robin Scheduling

Usage

Compile using:

> make -f makefile.mk

To compile without makefile, use:

> gcc main.c fcfs.c sjf.c prioritybased.c roundrobin.c queue.c time.c

Execute using:

> a.exe < inputs.txt

To add custom inputs to the program, modify the inputs.txt file, following the format below:

<Number Of Test Cases>

<Number Of Processes in Test Case 1>
<Process ID> <Burst Time> <Priority>
<Process ID> <Burst Time> <Priority>
<Process ID> <Burst Time> <Priority>
...etc

<Number Of Processes in Test Case 2>
<Process ID> <Burst Time> <Priority>
<Process ID> <Burst Time> <Priority>
<Process ID> <Burst Time> <Priority>
...etc

and so on.

NOTE: Failing to maintain the above format might cause undefined behaviour

Contents of a sample inputs.txt file are given below:

2

3
1 10 2
2 5 0
3 8 5

3
1 3 0
2 4 0
3 3 0

Team Members

  • Naveen K Murthy - PES2201800051
  • Roshan Daivajna - PES2201800372

cpu-scheduling's People

Contributors

roshan-d21 avatar naveenk2k avatar

Stargazers

 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.