/*ill throw out some pseudo code added to what i know for First Come First Serve Scheduling Algorithms
#include<iostream>
#include<queue>
#include <string>
#include<fstream>
using namespace std;
int CS=10;
struct PCB
{
int CPUbursts[10];
int IObursts[10];
int waitTime;
int completionTime;
int arrivalTime;
int startTime;
int CPUcount;
int IOcount;
};
int main()
{
int processesDone=0;
int busyTime=0;
int CScount=0;
int systemClock=0;
int n;
PCB processes[30];
queue<PCB> rdyQueue;
queue<PCB> waitQueue;
ifstream inData;
string fileName;
cout << "Enter the filename: ";
cin >> fileName;
cout << endl;
inData.open(fileName.c_str());
for(int i=0;i<30;i++)
{
for(int j=0;j<10;j++)
{
inData>>processes[i].CPUbursts[j];
inData>>processes[i].IObursts[j];
}
} //enter the bursts into processes 1-30's respective arrays.
cout<<endl<<"Enter the degree of multiprogramming."<<endl;
cin>>n; //the amount of processes the CPU can handle at one time.
while(processesDone<30)
{
//ok here is where im not really sure what to code so ill throw out //some ugly pseudocode
//for(count = 0; count < n; count++)
//push processes[i] onto rdyqueue.
//make their arrivalTimes = systemClock;
//systemClock = processes[0].CPUburst[CPUcount]+10 second //context switch;
//compute all the other numbers and add 1 to the counters, this i //know how to do. make sure to add IOburst[0] to processes[0] //wait time.
//now pop this guy from the rdyQueue and push him onto a //waitingQueue.
//now i know i have to push the next processes onto the ready //queue add his burst to the system clock and add the pointers //etc.
//now this is where i get confused, i want to get processes[0] //back into the rdyQueue but in order to do that i have to make //sure (processes[1].CPUburst+context switch)>=processes[0]. //wait. How can i add and subtract two different struct values //which are on two different queue data structures?
*/