write a code for below..
Construct a DiskPool with 3 feilds(bytes or words): First feild is dedicated to first process, second field dedicated to second process and third feild to third process. A zero in feild means the process is not waiting on a
disk event, a one means the process is waiting on a disk event. set the running variable to process 1,2 or 3. Read in S for system call and 0(zero) ( as a disk request )or 1 ( as a print request).Use this input data to update process tables,running variables, DiskPool or PrinterPool. For example, if process 1 was running and it issued a disk request, then process 1 goes blocked, the DiskPool field 1 is set to 1 and a ready process is dispatched