#include /* test1.c * This program creates a process A with Ri = 30. The main program has a Ri = 20 * We can expect the programs to get the CPU in the ratio of 20:30 (ie) 4:6. To * check this, we track the progress of the programs by the variable 'j'. At any * time during the execution, the value of the variable 'j' in the processes * should be approx in the same ratio of the rates. Report the values of the * 'j' variable at different times of program execution. */ int prch(), prA, prB, prC; unsigned long ctr100; main() { int i, j = 0; kprintf("\n\nTEST1:\n"); resume(prA = create(prch,2000,30, PROPORTIONALSHARE, "proc A",1,'A')); while (1) { kprintf(":%c %d:", 'D', j); for (i=0; i< 10000; i++); j++; } } prch(c) char c; { int i,j=0; while(1) { kprintf(":%c %d:", c, j); for (i=0; i< 10000; i++); j++; } }