Homework Solution: four programs must be run on one computer. all programs consist of 2 processor cycles and 2 input / o…

four programs must be run on one computer. all programs consist of 2 processor cycles and 2 input / output cycles. The input and output of all programs is done on the same disk drive. the times for each cycle of each program are shown below:
 PROGRAM PROCESSOR DISK PROCESSOR DISK P1 3 10 3 12 P2 4 12 6 8 P3 7 8 8 10 P4 6 14 2 10
```a)construct a time diagram showing which program is occupying the processor and the disk at each moment, until the 4 programs are finished. Assuming that the scheduling algorithm used is a time slice, with slices of 4 units of time
```
b)what is the processor and disk occupation rate? slice time is slice with 4 units or Q=4units

1.we suppose that each process arrive at t=0

four programs must be blend on undivided computer. integral programs hold of 2 ruleor cycles and 2 input / quenchedput cycles. The input and quenchedput of integral programs is dundivided on the corresponding disk drive. the spans restraint each cycle of each program are shown below:

 PROGRAM PROCESSOR DISK PROCESSOR DISK P1 3 10 3 12 P2 4 12 6 8 P3 7 8 8 10 P4 6 14 2 10
```a)compose a span diagram showing which program is occupying the ruleor and the disk at each consequence, until the 4 programs are refined. Assuming that the scheduling algorithm used is a span hunk, with hunks of 4 units of span
```

b)what is the ruleor and disk pursuit rebuke?

hunk span is hunk with 4 units or Q=4units

Expert Confutation

1.we judge that each rule attain at t=0

p1,p2,p3,p4 are in the queue are performed in that way

p1 blends restraint 3 and goes restraint io and comes at t=13 at which it is placed others are too placed relish that

the rule is complted at t=49

the timing

 p1 p2 p3 p4 p3 p1 p4 p2 p3 p2 p3 p4 p1 idle p2 idle p3 idle p4

time   0  3       7      11     15      18       21       23     27       31         33      37        39         39       41    41             47       47     49       49

2.the cpu is utilized restraint 39 quenched of 49.

the disk is referable utilized restraint original 3 units which is 46 quenched of 49.