Professional Documents
Culture Documents
CS225 - 03
CS225 - 03
/
.
/
.
CPU-
.
-.
CPU .
CPU-a?
(jobs).
(user programs).
CPU-a
.
.
CPU-a (cpu burst) /
(I/O burst).
. 1. CPU .
. 2. .
. 3. .
(PCB Process Control Block).
PCB :
.
.
CPU-.
.
/.
CPU-.
4. .
.
.
/
/ .
CPU
. 5. CPU- .
(schedulers). :
,
.
CPU
() /
. 6. .
( )
.
( CPU-)
.
.
.
.
(swapping).
SWAP IN
SWAP OUT
CPU
() /
. 7. .
.
CPU-
.
,
.
CPU-.
.
.
.
.
FCFS (First-Come-First-Served)
1
2
3
24
3
3
1
24
2 3
2 3
27
30
1
30
SJF (Shortest-Job-First)
1
2
3
6
3
8
2
0
4
9
3
16
24
. 8. SJF .
,
,
CPU .
tn n- CPU
n+1 ,
n+1 = tn + (1 - )n , 0 1.
n
n+1 = tn + (1 - )tn-1 + + (1 - ) j tn-j +
.
.
SRTF (Shortest-Remaining-Time-First).
(Round-Robin).
.
.
= 8
= 16
FCFS
. 9. .
.
.
(
)
.
.
.
MVS,
Windows NT, OS/2, Sun Unix-,
Mach.
.
.