#include #define TRUE 1 #define FALSE 0 #define MAXPRI 100 #define NIL -1 struct { int id; char status; int nextwr; int priority; } pcb [3]; struct { int value; int firstwr; } sem[2]; char savearea[3][4],addr; int i,s1,s2,seed, exe=NIL; init() { int j; for (j=0;j