Вы находитесь на странице: 1из 33

5 Step Process Model

MWY Productions
Process 1 Process 2 Process 3

 a := 1  a := 1  a := 1
b := a + 1 read a file b := a + 1
c := b + 1 b := a + 1 c := b + 1
read a file c := b + 1 a := b - c
a := b - c a := b - c c := c * b
c := c * b c := c * b b := 0
b := 0 b := 0 c := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Running Process 2 Process 3

 a := 1  a := 1  a := 1
b a:=:=a 1+ 1 read a file b := a + 1
c b:=:=b a+ +1 1 b := a + 1 c := b + 1
c :=abfile
read +1 c := b + 1 a := b - c
a read
:= b -acfile a := b - c c := c * b
ca :=:=c *b b- c c := c * b b := 0
b c:=:=0 c * b b := 0 c := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Running Process 2 Process 3

 a := 1  a := 1  a := 1
b a:=a:=a:=1+ 11 read a file b := a + 1
c b:=:=b a+ +1 1 b := a + 1 c := b + 1
cb
read :=a:= a
++
bfile 11 c := b + 1 a := b - c
 c :=abfile +1
a read
:=read
b - ca file a := b - c c := c * b
ca :=a:=c:=*b bb- c- c c := c * b b := 0
b c:=c:=0:=c c* b* b b := 0 c := 0
b := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 Process 3

 a := 1  a := 1  a := 1
b a:=a:=a:=1+ 11 read a file b := a + 1
c b:=:=b a+ +1 1 b := a + 1 c := b + 1
cb
read :=a:= a
++
bfile
 c :=abfile
11
+1 Time c := b + 1 a := b - c
a read
:=read
b - ca file a := b - c c := c * b
ca :=a:=c:=*b bb- c- c
b c:=c:=0:=c c* b* b
Out c := c * b
b := 0
b := 0
c := 0
b := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Running Process 3

a := 1  a := 1  a := 1
b := a + 1 read a file b := a + 1
 c := b + 1 b := a + 1 c := b + 1
read a file c := b + 1 a := b - c
a := b - c a := b - c c := c * b
c := c * b c := c * b b := 0
b := 0 b := 0 c := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Running Process 3

a := 1  a := 1  a := 1
b := a + 1 a :=a1file
read b := a + 1
 c := b + 1 b read
:= a +a 1file c := b + 1
read a file cb:=:= ba ++ 11 a := b - c
a := b - c a c:=:=b b- c+ 1 c := c * b
c := c * b ca:=:= c *b b- c b := 0
b := 0 b c:=:=0 c * b c := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Running Process 3

a := 1  a := 1  a := 1
b := a + 1 a :=a1file
read b := a + 1
 c := b + 1 b read
:= a +a 1file c := b + 1
read a file cb:=:= ba ++ 11 I/O a := b - c
a := b - c a c:=:=b b- c+ 1 Operation c := c * b
c := c * b ca:=:= c *b b- c b := 0
b := 0 b c:=:=0 c * b c := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Waiting to Complete I/O Operation Process 3 is Running

a := 1 a := 1  a := 1
b := a + 1  read a file b := a + 1
 c := b + 1 b := a + 1 c := b + 1
read a file c := b + 1 a := b - c
a := b - c a := b - c c := c * b
c := c * b c := c * b b := 0
b := 0 b := 0 c := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Waiting to Complete I/O Operation Process 3 is Running

a := 1 a := 1  a := 1
b := a + 1  read a file b a:=:=a 1+ 1
 c := b + 1 b := a + 1 c b:=:=b a+ +1 1
read a file c := b + 1 a c:=:=b b- c+ 1
a := b - c a := b - c ca :=:=c *b b- c
c := c * b c := c * b b c:=:=0 c * b
b := 0 b := 0 cb :=:=00
c := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Waiting to Complete I/O Operation Process 3 is Running

a := 1 a := 1  a := 1
b := a + 1  read a file b a:=a:=a:=1+ 11
 c := b + 1 b := a + 1 c b:=:=b a+ +1 1
read a file c := b + 1 Time b := a + 1
ac:=c:=b:=b- bc+ +1 1
a := b - c a := b - c ca :=a:=c:=*b bb- c- c
c := c * b
b := 0
c := c * b
b := 0
Out b c:=c:=0:=c c* b* b
cb :=b:=0:=0 0
c := 0
c := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Running Process 2 is Waiting to Complete I/O Operation Process 3

a := 1 a := 1 a := 1
b := a + 1  read a file b := a + 1
 c := b + 1 b := a + 1 c := b + 1
read a file c := b + 1  a := b - c
a := b - c a := b - c c := c * b
c := c * b c := c * b b := 0
b := 0 b := 0 c := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Running Process 2 is Waiting to Complete I/O Operation Process 3

a := 1 a := 1 a := 1
b a:=:=a 1+ 1  read a file b := a + 1
b :=
 c := b+ a+ 11 b := a + 1 c := b + 1
c :=abfile
read +1 c := b + 1  a := b - c
a read
:= b -acfile a := b - c c := c * b
I/O
ca:=:= c *b b- c c := c * b b := 0
b c:=:=0 c * b
Operation b := 0 c := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 is waiting to Complete I/O Operation Process 2 is Waiting to Complete I/O Operation Process 3 is Running

a := 1 a := 1 a := 1
b a:=:=a 1+ 1  read a file b := a + 1
b :=
 c := b+ a+ 11 b := a + 1 c := b + 1
c :=abfile
read +1 c := b + 1  a := b - c
a read
:= b -acfile a := b - c c := c * b
ca:=:= c *b b- c c := c * b b := 0
b c:=:=0 c * b b := 0 c := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 is waiting to Complete I/O Operation Process 2 is Waiting to Complete I/O Operation Process 3 is Running

a := 1 a := 1 a := 1
b a:=:=a 1+ 1  read a file b a:=:=a 1+ 1
b :=
 c := b+ a+ 11 b := a + 1 cb :=:=ba ++ 11
c :=abfile
read +1 c := b + 1  a c:=:=b b- c+ 1
a read
:= b -acfile a := b - c ca :=:=c *b b– c
ca:=:= c *b b- c c := c * b b c:=:=0 c * b
b c:=:=0 c * b b := 0 cb :=:=00
b := 0 c := 0

Ready
Running

Waiting

MWY Productions
Process 1 is waiting to Complete I/O Operation Process 2 is Waiting to Complete I/O Operation Process 3 is Running

a := 1 a := 1 a := 1
b a:=:=a 1+ 1  read a file b a:=:=a 1+ 1
b :=
 c := b+ a+ 11 b := a + 1 cb :=:=ba ++ 11
c :=abfile
read +1 c := b + 1  a c:=:=b b- c+ 1
a read
:= b -acfile a := b - c ca :=:=c *b b– c
ca:=:= c *b b- c c := c * b b c:=:=0 c * b
b c:=:=0 c * b b := 0 cb :=:=00
b := 0 c := 0

Suppose Process 2 (Red) Finishes Input/Output Operation

Ready
Running

Waiting

MWY Productions
Process 1 is waiting to Complete I/O Operation Process 2 Process 3 is Running

a := 1 a := 1 a := 1
b a:=:=a 1+ 1  read a file b a:=a:=a:=1+ 11
b :=
 c := b+ a+ 11 b := a + 1 cb :=b:=b:=a+ a+1 +1 1
c :=abfile
read +1 c := b + 1  a c:=c:=b:=b- cb+ +1 1
a read
:= b -acfile a := b - c ca :=a:=c:=*b bb– –c c
ca:=:= c *b b- c c := c * b b c:=:=0 c * b
c:=:=0 c * b
b c:=:=0 c * b b := 0 b
c:=b0:= 0
b := 0 c := 0
c := 0

Ready
Running

Waiting

MWY Productions
Process 1 is waiting to Complete I/O Operation Process 2 Process 3 is Running

a := 1 a := 1 a := 1
b a:=:=a 1+ 1  read a file b a:=a:=a:=1+ 11
b :=
 c := b+ a+ 11 b := a + 1 cb :=b:=b:=a+ a+1 +1 1
c :=abfile
read +1 c := b + 1 Time  a c:=c:=b:=b- cb+ +1 1
a read
:= b -acfile a := b - c ca :=a:=c:=*b bb– –c c
ca:=:= c *b b- c
b c:=:=0 c * b
c := c * b
b := 0
Out b c:=:=0 c * b
b c:=:=0 c * b
c:=b0:= 0
b := 0 c := 0
c := 0

Ready
Running

Waiting

MWY Productions
Process 1 is waiting to Complete I/O Operation Process 2 is Running Process 3

a := 1 a := 1 a := 1
b a:=:=a 1+ 1 read a file b := a + 1
b :=
 c := b+ a+ 11  b := a + 1 c := b + 1
c :=abfile
read +1 c := b + 1 a := b – c
a read
:= b -acfile a := b - c c := c * b
ca:=:= c *b b- c c := c * b b := 0
b c:=:=0 c * b b := 0  c := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Running Process 3

a := 1 a := 1 a := 1
b := a + 1 read a file b := a + 1
c := b + 1  b := a + 1 c := b + 1
read a file c := b + 1 a := b - c
 a := b - c a := b - c c := c * b
c := c * b c := c * b b := 0
b := 0 b := 0  c := 0

Suppose Process 1 (Purple) Finishes Input/Output Operation

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Running Process 3

a := 1 a := 1 a := 1
b := a + 1 a :=a1file
read b := a + 1
c := b + 1  bread
:= a a + file
1 c := b + 1
read a file c := b + 1 1
b := a + a := b – c
 a := b - c a c:=:=b b- c+ 1 c := c * b
c := c * b ca :=:=c *b b- c b := 0
b := 0 b c:=:=0 c * b  c := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Running Process 3

a := 1 a := 1 a := 1
b := a + 1 a :=a1file
read b := a + 1
a :=a1file
read
c := b + 1  b :=reada + a1 file c := b + 1
read a file c :=bb:=a
b := + a+
1 +1 1 a := b – c
 a := b - c a c:=:=b b- c+ 1 c := c * b
a c:=:=b b- c+ 1
c := c * b c:=ac:=* b b -c b := 0
b := 0 c := c *
b :=c0:= c * b b  c := 0
b := 0
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 is Running Process 3

a := 1 a := 1 a := 1
b := a + 1 a :=a1file
read b := a + 1
reada :=a1file
c := b + 1  b :=read a + a1 file c := b + 1
read a file c :=bb:=a
b := + a+
1 +1 1
a c:=:=b b- c+ 1
Time a := b – c
 a := b - c c:=:=b b- c+ 1 c := c * b
c := c * b
b := 0
a
c :=ac:=* bb - c
bc:=c:=0:=c c* b
Out b := 0
 c := 0
b := 0 * b
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 Process 3 is Running

a := 1 a := 1 a := 1
b := a + 1 a :=a1file
read b := a + 1
reada :=a1file
c := b + 1  b :=read a + a1 file c := b + 1
read a file c :=bb:=a
b := + a+
1 +1 1 a := b – c
 a := b - c a c:=:=b b- c+ 1 c := c * b
a c:=:=b b- c+ 1
c := c * b c :=ac:=* bb - c b := 0
b := 0 bc:=c:=0:=c c* b  c := 0
b := 0 * b
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 Process 2 Process 3 is Terminated

a := 1 a := 1 Terminated0
b := a + 1 a :=a1file
read
reada :=a1file
c := b + 1  b :=read a + a1 file
read a file c :=bb:=a
b := + a+
1 +1 1
 a := b - c a c:=:=b b- c+ 1
a c:=:=b b- c+ 1
c := c * b c :=ac:=* bb - c
b := 0 bc:=c:=0:=c c* b
b := 0 * b
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Running Process 2 Process 3 is Terminated

a := 1 a := 1 Terminated0
b := a + 1 a :=a1file
read
reada :=a1file
c := b + 1  b :=read a + a1 file
read a file c :=bb:=a
b := + a+
1 +1 1
 a := b - c a c:=:=b b- c+ 1
a c:=:=b b- c+ 1
c := c * b c :=ac:=* bb - c
b := 0 bc:=c:=0:=c c* b
b := 0 * b
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Running Process 2 Process 3 is Terminated

a := 1 a := 1 Terminated0
b a:=:=a 1+ 1 a :=a1file
read a :=a1file
cb :=:=ba ++ 11 read
 b :=read a + a1 file
c :=abfile
read +1 c :=bb:=a
b := + a+
1 +1 1
 a read
:= b -acfile a c:=:=b b- c+ 1
c:=:=b b- c+ 1
ca :=:=c *b b- c a
c :=ac:=* bb - c
b c:=:=0 c * b bc:=c:=0:=c c* b
b := 0 b := 0 * b
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Running Process 2 Process 3 is Terminated

a := 1 a := 1 Terminated0
b a:=a:=a:=1+ 11 a :=a1file
read a :=a1file
cb :=b:=b:=a
+ a+1 +1 1 read
 b :=read a + a1 file
c :=abfile
read +1 c :=bb:=a
b := + a+
1 +1 1
c := b +1 a c:=:=b b- c+ 1
 a read b -acafile
:=read file c:=:=b b- c+ 1
a := b -
c :=ac:=* bb - cc a
c :=ac:=* bb - c
b c:=:= c*b
0:= bc:=c:=0:=c c* b
b := 0 c * b
c b := 0 * b
 b := 0 b := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Running Process 2 Process 3 is Terminated

Terminated0 a := 1 Terminated0
a :=a1file
read
reada :=a1file
 b :=read a + a1 file
c :=bb:=a
b := + a+
1 +1 1
a c:=:=b b- c+ 1
a c:=:=b b- c+ 1
c :=ac:=* bb - c
bc:=c:=0:=c c* b
b := 0 * b
b := 0

Ready
Running Terminated

Waiting

MWY Productions
Process 1 is Terminated Process 2 is Running Process 3 is Terminated

Terminated0 a := 1 Terminated0
a :=a1file
read
reada :=a1file
 b :=read a + a1 file
c :=bb:=a
b := + a+
1 +1 1
a c:=:=b b- c+ 1
a c:=:=b b- c+ 1
c :=ac:=* bb - c
bc:=c:=0:=c c* b
b := 0 * b
b := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Terminated Process 2 Process 3 is Terminated

Terminated0 a := 1 Terminated0
read a file
b := a + 1
c := b + 1
a := b - c
c := c * b
 b := 0

Ready
Running

Waiting

MWY Productions
Process 1 is Terminated Process 2 Process 3 is Terminated

Terminated0 Terminated0 Terminated0

Ready
Running Terminated

Waiting

MWY Productions
Process 1 is Terminated Process 2 is Terminated Process 3 is Terminated

Terminated0 Terminated0 Terminated0

Ready
Running Terminated

Waiting

MWY Productions

Вам также может понравиться