int main(){ string XXXX; ifstream fin; // XX default XXXX mode = ios::in mode fin.XXXX("processes.XXX"); vector&XX;Process> XXXXXX; XXXXX (fin) { // XXXX a Line from XXXX getline(XXX, XXXX); XX(line.size() > 0) { string id=""; string t=""; XXX i=1; XXX(XXXX c : XXXX){ if(c == ' '){ i=2; continue; } XX(i == 1){ id+=c; } XX(i == X){ t+=c; } } XXXXXXX p(XXXX(id),XXXX(t)); XXXXXXXX.push(p); XXXXXX.XXXXXXXXX(p); } } // XXXXX the XXXX XXX.XXXXX(); //Displaying XXX XXX XXXXXXXXX for(XXXX i=XXXXXX.begin();i!=record.XXX();i++){ i->XXXXX(); } //Scheduling XXXXX(!XXXXXXXX.empty()){ XXXXXXX p = procList.front(); XXXXXXXX.pop(); p.XXXXXXX(); } return X; }
/* XXXXXX XXXXXX :
XXXXXXX : XXXX XXXXXXXXX XXXX : 15 XXXXXXX : XXXX XXXXXXXXX XXXX : 16 Process : XXXX Remaining XXXX : XX Process : 4789 Remaining XXXX : X Process XXXX ID : XXXX needs XX more ms XX execution XXXXXXX XXXX ID : XXXX XXXXX 15 more XX of XXXXXXXXX XXXXXXX XXXX XX : XXXX needs XX more XX of XXXXXXXXX XXXXXXX XXXX ID : 4789 needs 8 XXXX XX XX XXXXXXXXX XXXXXXX with XX : XXXX XXXXX XX XXXX ms of XXXXXXXXX XXXXXXX with XX : XXXX XXXXX 14 more ms of XXXXXXXXX Process XXXX XX : XXXX XXXXX 23 more ms XX XXXXXXXXX Process XXXX ID : XXXX XXXXX 7 XXXX ms XX execution XXXXXXX XXXX XX : XXXX XXXXX XX XXXX XX of execution XXXXXXX with XX : 3389 XXXXX XX XXXX ms XX execution XXXXXXX XXXX XX : 2588 needs 22 XXXX ms XX execution Process with ID : 4789 needs 6 more ms XX XXXXXXXXX Process with XX : XXXX XXXXX 11 XXXX XX of XXXXXXXXX XXXXXXX XXXX XX : 3389 needs 12 XXXX ms of XXXXXXXXX Process with ID : XXXX needs XX more ms of XXXXXXXXX XXXXXXX with XX : XXXX needs X XXXX ms of XXXXXXXXX XXXXXXX XXXX XX : XXXX XXXXX XX more XX of XXXXXXXXX XXXXXXX with XX : 3389 needs XX more ms XX XXXXXXXXX Process XXXX XX : XXXX needs XX more ms XX XXXXXXXXX XXXXXXX XXXX ID : XXXX XXXXX 4 XXXX ms XX execution Process with XX : 1256 XXXXX X more ms XX execution Process XXXX XX : 3389 XXXXX XX more ms of XXXXXXXXX Process with ID : 2588 needs XX XXXX XX XX execution Process with ID : 4789 XXXXX 3 XXXX XX of XXXXXXXXX Process XXXX ID : 1256 needs X more XX of execution Process XXXX XX : 3389 XXXXX 9 more ms of execution XXXXXXX XXXX ID : XXXX XXXXX XX XXXX XX XX XXXXXXXXX XXXXXXX XXXX ID : 4789 XXXXX 2 XXXX ms XX execution Process XXXX ID : XXXX needs 7 more XX of execution XXXXXXX XXXX ID : 3389 XXXXX 8 XXXX XX of XXXXXXXXX Process XXXX XX : 2588 XXXXX 17 more XX XX execution XXXXXXX XXXX XX : 4789 needs X XXXX XX of XXXXXXXXX XXXXXXX with XX : XXXX needs X more XX of XXXXXXXXX XXXXXXX XXXX XX : 3389 needs 7 XXXX ms of execution Process XXXX XX : XXXX needs XX more XX XX XXXXXXXXX XXXXXXX with ID : 4789 needs X more ms XX execution XXXXXXX XXXX ID : XXXX needs X XXXX ms XX XXXXXXXXX XXXXXXX XXXX XX : 3389 XXXXX 6 XXXX ms XX execution XXXXXXX with XX : XXXX XXXXX 15 more ms of execution Process XXXX XX : 4789 is XXXXXXXX! Process XXXX ID : 1256 XXXXX X XXXX ms XX execution Process with XX : 3389 XXXXX 5 more ms XX XXXXXXXXX Process XXXX XX : 2588 XXXXX 14 XXXX ms of XXXXXXXXX XXXXXXX XXXX ID : 1256 XXXXX X XXXX XX of execution XXXXXXX XXXX ID : XXXX XXXXX 4 more ms of XXXXXXXXX Process XXXX XX : 2588 needs 13 XXXX XX of execution Process with ID : 1256 XXXXX X more ms of execution XXXXXXX XXXX ID : XXXX XXXXX 3 XXXX ms XX XXXXXXXXX XXXXXXX XXXX XX : 2588 needs 12 XXXX ms XX execution XXXXXXX with ID : 1256 needs X more XX of execution XXXXXXX XXXX XX : XXXX needs 2 XXXX ms XX execution Process with ID : XXXX needs 11 XXXX XX of XXXXXXXXX Process XXXX ID : XXXX XXXXX X more XX of execution XXXXXXX XXXX ID : XXXX needs X XXXX XX XX execution XXXXXXX XXXX ID : XXXX needs XX XXXX ms XX execution Process with XX : XXXX XX Complete! Process with ID : XXXX XXXXX 0 more XX XX XXXXXXXXX XXXXXXX XXXX XX : 2588 XXXXX X more ms of execution XXXXXXX with ID : 3389 is Complete! Process XXXX XX : 2588 needs X XXXX ms of execution XXXXXXX with ID : 2588 XXXXX X more XX XX XXXXXXXXX Process XXXX ID : 2588 needs 6 more ms XX XXXXXXXXX XXXXXXX XXXX XX : 2588 needs X XXXX ms of XXXXXXXXX XXXXXXX XXXX XX : 2588 XXXXX X more XX XX execution XXXXXXX with ID : 2588 needs X XXXX ms of execution XXXXXXX with ID : XXXX needs 2 more XX of XXXXXXXXX XXXXXXX XXXX XX : 2588 needs 1 XXXX ms XX execution XXXXXXX XXXX ID : 2588 needs 0 XXXX ms XX XXXXXXXXX Process XXXX ID : XXXX is XXXXXXXX!
*/
----------------------------------------------------------------------------------------------------------------------------------------------------------The sample text file XXXX :-