Advertisement
mohamedmahmoud97

Untitled

Dec 16th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. typedef struct proc{
  5. int id;
  6. int CPU_time;
  7. int IO_time;
  8. int arrival_time;
  9. bool IO_done;
  10. char*state;
  11. int ready_time;
  12. int start_time;
  13. int remaining_time;
  14. int turnaround_time;
  15. }proc;
  16.  
  17. struct proc **process;
  18. int no_proc=0;
  19. int *blockedArray;
  20. int *readyArray;
  21. int frontR;
  22. int rearR;
  23. int itemCountR = 0;
  24. int frontB;
  25. int rearB;
  26. int itemCountB = 0;
  27.  
  28. void readInputFile(FILE*inFile, char*fileName);
  29. int getMin(int*array, int count);
  30. int fpeek(FILE *stream);
  31. void FCFS(FILE*outFile);
  32. void RR(FILE*outFile, int quantum_time);
  33.  
  34. void createR();
  35. void insertR(int data);
  36. void checkR(int data);
  37. void deleteR(int data);
  38.  
  39. void createB();
  40. void insertB(int data);
  41. void checkB(int data);
  42. void deleteB(int data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement