ps::ps(){ genNums(testcycles1,6000,1000);//set testcycles1 to have mean of 60000 and standard deviation of 1000 genNums(testcycles2,6000,4000); genNums(testcycles3,3000,6000); for(int i = 0; i<50;i++){//set all processes in testcycles4 to 3000 with no standard deviation testcycles4[i] = 3000; } }
int main(int argc, char *argv[]) { FILE *fp; int n; if (argc != 3) { printf ("Usage genNums <filename> <N>\n"); printf ("<filename> the name to store randomly generated integers\n"); printf ("<N> the number of integers to be generated\n"); } fp = fopen(argv[1], "wb"); if (fp == NULL) { printf ("Unable to open \"%s\"\n", argv[1]); return 1; } // number of integers to be generated n = atoi(argv[2]); // generate data genNums (fp, n); // clos binary file fclose (fp); return 0; }