Skip to content

Instantly share code, notes, and snippets.

@Farwa-Rajput
Farwa-Rajput / DatacenterBroker.java
Last active June 15, 2023 01:24
Shortest Job First (SJF) Task scheduling algorithm implementation in cloudsim
package org.cloudbus.cloudsim;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@Farwa-Rajput
Farwa-Rajput / schdeulling.cpp
Last active June 6, 2020 09:03
ROUND ROBBIN SCHEDULING (C++)
#include<iostream>
using namespace std;
void calcTimes(int processID[], int n, int burstTime[], int timeSlice);
void calcWaitingTime(int n, int bt[], int wt[], int quantum);
void calcTurnAroundTime(int n, int bt[], int wt[], int tat[]);
int main() {
int n;
cout << "Enter number of processes: ";