248
Aρχιτεκτονική Yπολογιστών I

Αρχιτεκτονική Υπολογιστών ΕΑΠ

Embed Size (px)

Citation preview

A Y I

HPOOPIKH

HIAKA YTHMATA B'

A Y IHMHTPIO NIKOOK T M H/Y &

ATPA 2001

HPOOPIKH HIAKA YTHMATA B' A Y I HMHTPIO NIKOO K T M H/Y & XAPIHMO BEPO T M H/Y & KPATH KATIKA T M A EPAIMO MPATH EIA BAKAOOY ... TYPORAMA / 19972001 ISBN: 9605381966 K : H 21/2 Copyright 2000 & , 26222 : (0610) 314094, 314206 : (0610) 317244 . 2121/1993, .

A E, B, E E

K 1

, ,

, , E ............................................................................................................... 13 1.1 1.2 1.3 .............................................................................................................. 14 .......................................................................................... 16 , .............................................. 21 1.3.1 ............................................................................................. 22 1.3.2 .................................................................... 24 1.3.3 ......................................................................................................... 28 1.3.4 (Cache memory) .................................................................... 33 1.3.5 (Virtual Memory) ................................................................... 37 ........................................................................................................................ 39 / .................................................................................................. 40 ........................................................................................................ 42

1.4 1.5

.................................................................................................................................... 44K 2

, , E ............................................................................................................... 47 2.1 ......................................................................................................................................... 48 2.1.1 ............................................................................................. 48 2.1.2 .................................................................................... 57 ........................................................................................................................ 60 ............................................................................................................................................. 61 2.2.1 .................................................................. 61 2.2.2 (Addressing Modes) ................................................................................................ 63 2.2.3 ......................................................................... 68 2.2.4 .......... 69 2.2.5 ...................................................... 72

2.2

8

A Y I

........................................................................................................................ 74 .................................................................................................................................... 74K 3

, , E ............................................................................................................... 77 ............................................................................ 78 3.1.1 ................................... 78 3.1.2 ..... 79 3.1.3 .... 94 ........................................................................................................................ 98 3.2 ...................................................................................................................... 98 3.2.1 ............................................................................... 98 3.2.2 ......................................................................................................................... 101 3.2.3 .......................................................................... 102 3.2.4 .............................................................................................. 114 ..................................................................................................................... 115 ................................................................................................................................. 115K 4

3.1

, , E ............................................................................................................ 117 4.1 ............................................................................................................. 119 4.1.1 ............................................................................................. 119 4.1.2 ............................................................................................... 129 4.1.3. ....................................................................................................... 132 ..................................................................................................................... 134 .................................................................................................................... 136 4.2.1. ........................................................................... 138 4.2.2. ........................................................................................... 140 4.2.3. ............................................................................................................................ 141 4.2.4. ...................................................................... 141

4.2

EPIEXOMENA

9

..................................................................................................................... 142 4.3 ........................................................................................................................... 143 4.3.1 (fetch policy) ............................................................................................................... 144 4.3.2 ................................................................. 145 4.3.3 ...................................... 159 4.3.4 ....................................................................................... 160 ..................................................................................................................... 164 4.4 ............................................................................................................................. 166 ................................................................................................................................. 169K 5

, , E ............................................................................................................ 171 5.1 (Buses) .................................................................................................................. 172 5.1.1 ........................................................................................................... 172 5.1.2 ..................................................... 179 5.1.3 ................................................................................................ 183 5.1.4 ......................................................... 183 ..................................................................................................................... 187 5.2 / ................................. 188 5.2.1 / ..................... 188 5.2.2 / ......................................................................................................... 190 5.2.3 / .......... 191 ..................................................................................................................... 198 ................................................................................................................................. 198 A PA P T H M A A

, , E ............................................................................................................ 201 .1 ............................................................................... 201

10

A Y I

.2 ............... 204 A A A ..................................................................... 209 E A ..................................................................... 237 / E ...................................................................................................................... 239 B ............................................................................................................................................ 243

, , . . . . , , . , , /. . , . . . , / . . . . . . .

5 2000

, ,

, , . . , : Y A O K K B A M A

1

. . . , , /. , .

14

, ,

1.1

(hardware) (software). . , : , ,

, , , . , , , , , , . , . , , , , . . (hardware) (software). , , , , . , . . , :

15

T (system software) T (diagnostic software) T (application software) . : 1. (operating system). , . 2. (utility programs). , , : , . "explorer" WINDOWS 95. , , (editors). (library routines). , . (translators) (interpreters). , . . , , . , . .

16

, ,

. (Data Base Management Systems), , , (Computer Aided Design), . 1.1 1.2

. , .

; . . . . . .

1.2

. , : , ,

, . -

17

, . , , ' , . , , ' , . , , , . ' , . , , , ' .

APXITEKTONIKH

XPHTE

1.1

.

18

, ,

1.1 . . . , . . ' . . , , (device allocation) (scheduling). ' . , , , , (addressing modes). . , , . , . , . . , , , , , (implementation)

19

(performance). , , , , CMOS, BiCMOS . (ripple carry) (carry lookahead) . , , . , , , , . /4300, (IBM, Motorola, Apple)/PowerPC HewlettPackard/PARISC. , / / , . , . . ' , , , . ' . PA2.0 HewlettPackard, PARISC. , , . , , (compiler), .

20

, ,

, . , , . . , . , , .

1.3

: . . . .

1.4

. , , ; . . ; i. , . ii. , .

,

21

iii. , , .

1.3 ,

(). , () . , , , 1.5. , : . 1.3.1 , . 1.3.2 , 1.3.3 . 1.3.4 1.3.5 , .

22

, ,

1.3.1

(), , / . 1.2 . . (Data Path) (Control Unit). , .

M

K K

E

A 1.2

.

, , , . , . , ,

,

23

, . , , ( ) . , , . . , . , , . 1.2 , , ( ' 1.3.5), ( ' 1.3.4), . (bits) (bytes), . 0 1 . , , : Kbytes KB, 1 KB = 210 bytes =1024 bytes Mbytes MB, 1 MB = 220 bytes =1024 Kbytes Gbytes GB, 1 GB = 230 bytes =1024 Mbytes , , , G. / . / . , . . 2. 1.2 /

24

, ,

. . , 1.2 , /, ( ) . /. 1.5

, .

1.6

, .

1.7 1.8

, .

: GBytes, (bits), Kbytes, (bytes), Mbytes. H ________. H , , ________. H ________. H ________.

1.3.2

, , (Data Path) (Control Unit). (Integrated Circuit, IC) (processor). ,

,

25

, , (cache memory) , , (Memory Managment Unit, MMU). , . , (fixed point arithmetic) (floating point arithmetic) ( 2.). , , , . , , , , (coprocessor) . , . , , . , , . . , , , , . . (program counter),

26

, ,

, (index registers), , (stack pointer), , (status register), . 1.1 , , . 1.1

. / / 21064 / DEC / 1992 PowerPC 601 / IBM, Motorola, Apple / 1993 Pentium / Intel / 1993 PowerPC 620 / IBM, Motorola, Apple / 1996 32 64 32 32 8 32 32 64 32 64 32 64 8 80 32 64

, , , . , , , (CPU cycle time) . (CPU clock rate) . , . , . :

,

27

1. , , . 2. , . 3. , . 4. . 5. . 6. . 7. 1 . , , 4 6 . , 5, 7. 1.9

. , . . . . 7 . . . . , . . , . , . .

28

, ,

1.3.3

(, ) . , , . . , 0 1 ( 1.3.). . , . , .

1.3

H , 8 .

: ) ,

,

29

, ) ) . , , (access time) . . , . , , . , ( ), , (cycle time of the memory). , , . (data transfer rate bandwidth). . , . , , . , , . , . , , , , .

30

, ,

. , , 2 . (system configuration), , . , . , . , , . (Random Access Memory, RAM). RAM, , SRAM, , DRAM. SRAM, DRAM , SRAM DRAM. , DRAM. (Read Only Memory, ROM), , . ROM, , , , , ROM , RAM . ROM , , , .

,

31

, . , . , , , . . , . 1.4 , . , , , .

100 10

X

M O

1 101 102 103

104 105 106 107 108 109

1.4

DRAM SRAM

K

, .

, . (overflow), -

32

, ,

, , . , .. , , . . , (serial access) (direct access). , . . , , (tracks), . , . . , 4.

1.1

, , .

1.10

. : . . . . . RAM ROM. . ROM;

,

33

.

1.11

;

1.12

1.3.4 (Cache memory)

, , . , . , (cache memory). , , . (principle of locality) . ( ) , . , , .

SRAM, DRAM, . , , .

34

, ,

. , , . , . , , . , , , ( 1.5). , , (hit rate). , . 4 , . () (unified cache memory), (data cache) (instruction cache). , . , , , , , . .

1.3.3, , -

,

35

KME

1.5

.

( 1.4). , , . (multiprogramming) -

36

, ,

, , / / . /, . , (disk cache). . . . , . DRAM. . (file cache). , , . , . , . , . , . , WINDOWS 95 . , 8%~10% , . , WINDOWS 95 .

,

37

. , , . . .

1.2

: . .

1.13

1.3.5 (Virtual Memory)

, , . . , , (virtual memory). , . , , (logical addresses) (logical address space). H (Memory Management Units, MMU) . . , , , , , , . . , . ,

38

, ,

, . 4. , . . , , . , ( ). , , ( ) . , . . , , , , , , , , . , , , . , . . , , , ( 1.5). .

39

1.5, , . , , : , .

1.3

: . . . ;

1.14

, , / . , , . . , . . , . , , , .

40

, ,

1.4 /

/, /, . , : , , , , , . /

/ . , . / , , / . . ' , , , . ( ' ) (scanner). . , , , , . ' . .

/

41

, ' . , , . (floppy disk) , , , / . , . , , , . . , /, , CDROM, . , , , , , , .. . / . , , , , , . / , , , . , 10 , 200.000 .

42

, ,

1.15

: , , , , , , , , , , , . O _____________ . O _____________ . O _____________ . O _____________ .

1.5

. , :

, , MIPS ( ) MFLOPS ( ). . . MIPS Million Instructions Per Second

43

. o , . . . , . , ( 3) (Instruction Set) , . MIPS . MIPS. MIPS , . MFLOPS Million FLoatingpoint Operations Per Second ( 2). . MIPS . , . . , . 100% MFLOPS , 100% . , , , , .

44

, ,

. . (execution time) . (response time). (throughput). . . , , , . SPEC92 (benchmarks). SPEC92 SPECint92 , , SPECfp92, . 1.16

100 MIPS 150 MIPS. ;

, , . . , .

45

, ( , 3). , , . . , , , / . . , , . KBytes, MBytes GBytes. . . , . / . . MIPS MFLOPS , . , . .

. . , : A A E T . . .

2

48

2.1

, . , : . . . 2.1.1 , . 2.1.2 .2.1.1

. . . , . . , . (truncation). , . .

49

(rounding). /2, . = 0.3729836 10 4/2 = 0.00005, 0.3730336 0.3730. 0.3729. , , (roundoff errors). , . , . , . . . , , . , . . , . . , . , , .

50

. . . , 2.1. (Binary Coded Decimal, BCD, numbers). 2.1

0 9. 0 1 2 3 4 5 6 7 8 9 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001

(fixed point representation) (floating point representation).

. , . . ,

51

: 12 10, 1, 2, , 0 < . , 1, 0 1. (1)1 + (1)2 + +(1) = ( 1)/ (1) =1/, 1 = (1) 1 = (1) . , 0 , 0 1. 0. . . 0, , 1, . O : . (signmagnitude representation). () = 0a2a3 a1a0, () = (1)a2a3 a1a0, . (diminished radix complement representation). () = 0a2a3 a1a0, () = (1) a 2a 3 a 1a 0, a = (1) a 0 2.

1. . (radix complement representation). () =0 a2a3 a1a0, () =(1) a 2a 3 a 1a 0 +1 .

52

2.1 8 (10) = 11 (10) = 11 : . (10) = 11 (2) = 00001011 (10) = 11 (2) = 10001011 . (10) = 11 (2) = 00001011 (10) = 11 (2) = 11110100 . (10) = 11 (2) = 00001011 (10) = 11 (2) = 11110101 . 2.2

. (21 1) (21 1) (1111) (0111) (21 1) (21 1) (1000) (0111) 21 (21 1) (1000) (0111)

000 1000

1

000 111

2

000

. , 2

53

32 (231, 231 1). . , . , , = . 12 10, . , . . , 0.000003706 103, 0.0003706 101 0.3706 102 . , , (normalized) . , . , . , . , , . , . 754. 1980 .

54

. , 2 32 . 32 2.1.

2.1

32 754.

25 , 24 . , . . . , 23 , , . , . , , . IEEE 754 .

55

, . . , , . , . . , . 2.2 , 1.0 21 1.0 2+1 :

, , . 00000000 11111111. . 754 127, 127 754. 2.3 1.0 21 1.0 2+1 2.1. 754, 1 +1 127, 126(10) = 01111110(2) 128(10) = 10000000(2). , 1.0 21 1.0 2+1 2.2. 2.2. . -

56

. 2.2

. 1.0 21 . 1.0 2+1 754.

.

.

, 754, : (1) x (1 + ) 2( ) x 0 < 255. . . 64 , , 11 52 . 754, : (1) (1 + ) 2( ), = 1023 0 < 2047. 2.1 . . (2) = 101110.001001 (2) = 101011.011001 (2) = 101011.01001 (10) = 97832.0016 (10) = 105389.09601 (10) = 5389.09404 (2.2) (2.1)

57

BCD : (10) = 472.01 (10) = 902.34

2.2 2.3

(2) = 10110, (2) = 011110 (2) = 111011, . . , . 1 . 2.

754 .

2.4

2.1.2

. , , . . 7 ASCII (American Standard Code for Information Interchange) , 2.3.

58

2.3

O ASCII

, , 928 . 2.4. , 00/0 15/7, ASCII. . , ASCII.

2.4

O 928

59

60

M , . , . , Unicode 16 . M 38.885 A, E, M A, A, I, A . O 65.000 . To Unicode .

2.5

R, q, [, %, , , ASCII 928 .

. , . . , . , . . ASCII , , , 928.

61

2.2

. . , : 2.2.1

. , . , MIPS 17 20 9 0000001000 1101000100100000100000. (machine language) . . (operands) . -

62

. (operation code, opcode). , , . , . 2.3. . 1. . . . 5000 , . 2. . . , , . 3. . Boole , . 4. . , . . . , , , .

63

5. /. /. . , 10 12 20 .2.2.2 (Addressing Modes)

. (IMMEDIATE ADDRESSING MODE)

, . (DIRECT ADDRESSING MODE)

: . . , . , . 232 , , 32 .

64

2.3

. . , , . . 64 , 6 .

2.4

.

(INDIRECT ADDRESSING MODE)

, . : . , .

65

. , .

2.5

.

2.6

.

, . (pointer) , . , . -

66

. . , . . (relative addressing mode), , (offset displacement). . , . : 1. , . 2. , (statically position independent programs). (program counter relative addressing mode). , ROM 4K , . , ROM, ROM . , , ROM ROM. ROM (configuration) .

67

ROM ROM, ( , ROM). ROM . 3. , . , (relocatability of programs and data segments). . 4. , . (index register). . (0) , () +. , () . , . ( ) . . (stack). .

68

, . (stack pointer). , . , , . .

RAM

2.7

.

2.2.3

. . , . . ,

69

. , , . BCD , . , , . . . 32 . 8 ( ), 16 ( ), 32 ( ), 64 ( ) , 32 , 64 8 16 . , IEEE 754 ASCII Unicode. BCD .2.2.4

, (stack architectures), (accumulator architectures) (generalpurpose register architectures). .

70

. PUSH, POP. C : Push A Push B Add Pop C , , . : Load A Add B Store C . . C. , (loadstore) (registerregister). : Load R1, A

71

Add R1, B Store C, R1 R1 . R1 R1. R1 C. . Load R1, A Load R2, Add R3, R1, R2 Store C, R3 R1 . R2 . R1 R2 R1. R3 C. . (hardware) . , (compilers) . picoJava Sun, Java. RISC (Reduced Instruction Set Computers) CISC (Complex Instruction Set Computers),

72

. , . , , . , , . Power PC MIPS, 8086 68000.2.2.5

, , . 2.2.1, . . . , . , . , , , , ,

73

, . . . . , VAX 3 19 0 6 . . MIPS, Power PC SPARC. , . Intel 80X86. , , .

2.2.1: Load A, Store A, Add R1, R2, R3, AND R1, R2, R3, JUMP X1 ( ), JUMPE X1 ( , 1).

2.6

. . . .

2.7

74

2.8

. , , 1 2. 1 2 ; .

2.1

= + . , [3], 2931, .

. . , . . . . . , . , , , .

75

(BCD). , . . , . 754. , , , , . , ASCII. ASCII . 928 . . . , , , /. , . , , , .

76

, 754 ASCII Unicode. . . , RISC, , CISC. RISC , . CISC ,

, . , : , , M A Y M M M 1.3.2, , , (Data Path) (Control Unit). . 3.1 . 3.2 , .

3

78

3.1

, . , : 3.1.1

. , (fixed point arithmetic) (floating point arithmetic), 3.1. , , . ( 3.2.) . , . ,

79

. , . .

M E Y Y Y K Y

AM

A

M O

3.1

.

3.1.2

, , . .

80

3.2, / . /.

N

N

3.2

.

/ 3.3. . (ripple carry adder), (carry lookahead adder) . , , .

81

3.3

.

/ / , , . =+' = , ' . , ( / XOR ) ( / , , /). , 1. , . , , . , =11100000=22410 =01000001=6510 , 8 , =00100001= 3310 =1.

82

21, 25510, , , +2 +25610 = 22410 + 6510 25610 = 28910 25610 = 3310. 2 . . . 3.1

.A-1 B-1 -2 -1 Y

, , . , , . , . =11100000 =01000001, 3210 6510 =00100001 3310. , . . 3.1 1 -

83

1 1 . = '1 . '1 . 2 + 1 . 1 . '2 1 = 1 . 1 + 1 . 2 + 1 . 2, = 1 2, (3.2) (3.1)

(exclusive OR). (3.1) (3.2) / . 3.3 (3.2). 3.3 , . 3.1. 3.1 , 1 = 1 1 2 . . , =( 012 1) =(012 1). i i i=1, 2, 3, , 1. f(i, i), i, 16. , , 0, 1, 2 3. . /.

84

3.4 16 .

A-1 -1 3.4

B-1

.

85

(general purpose register file) . , , . , , RAM, . , . , 3.5 . , . , . 0 2 3. , 0, 2 3 . , . : . 0 , . 3.5 0 AND , , 0 . 1, 2 3 . , AND, 1, 2 3, , , .

86

-A A A 3 2 1 0

-B A B 3 2 1 0

- A 3 2 1 0

A

B

D Q

D Q

D Q

0 CLK

0 -A

0 -B

D Q

D Q

D Q

CLK

1

1 -A

1 -B

D Q

D Q

D Q

2 CLK

2 -A

2 -B

D Q

D Q

D Q

3 CLK

3 -A

3 -B

3.5

.

87

. 2 , . 3.5 2 AND , , 2 . 0, 1 3 , AND 0, 1, 3 , . . 3 , . , CLK AND . 3 3 , CLK flipflops 3. flipflops CLK , 3. , 0, 1 2 , flipflops 0, 1 2 , .

flipflops . . , 0, . ( 41 21). 41 t1t0. 21 C, = 0, 1, , 1. , 2 . , C3 16 1, 23 = 8 . , 0, . () : =

C 2i i =0

k -1

i

, 1

90

C 1. , 3.2 , . , , .

. , , 21 . , /, . , , :

. ,

91

. , , . 3.7 , . flipflops, . 1 2 .

3.7

.

3.8 . 1/2 1 2 . () , . 3.7 1/2 . 1/2 . . , . 3.9 -

92

3.8

3.7.

3.9

.

93

. . , 2, . (carry propagate). . carrysave . , Booth. carrysave , carrysave . carrysave , , , . carrysave, Booth, . .

. 3.7, , . 1/2 . .

94

3.1.3

, , 754. , . , , . . 3.10 3.11 .

3.1

.

3.2

. , , . . . = 01011000, = 10100010 . = 10010100, = 10011100 . = 00001010, = 01111111

95

3.10

.

96

3.11

.

97

, 64 . flipflops , , 3.6. ; . O . . O 30 .

3.3

, , ; . M . . M 3.7.

3.4

3.7 3.8. 3.7 8 . 10(10) 38(10).

3.5

3.10 . ;

3.6

98

. , , , , . .3.2

, . , : , , 3.2.1

1.3.2. : 1. . 2. , . 3. , , . 4. .

99

3.12

.

5. . 6. . 7. 1 .

. , . , , . , . , . . , . ,

100

. . , . : . (jump) (branch). . (call for subroutine). . (exception), , . . (interrupt), /. . , . , . . , . , , . . . , , ,

101

, . . . , . , . , , . . , (microprogramming).3.2.2

, . , , , . " ", . , . , -

102

, , , (debugging). (state assignment). (flipflops). log2 . . , , . ' , , (onehot encoding). , s0, s1, s2, s3 s4, (00001), (00010), (00100), (01000) (10000). , , ' , . , , . (clock) , . , .3.2.3

. -

103

(microprogrammed control unit). , (control memory). (microinstruction) . . , , (microprogram) . . ( ), . , . , (interpreter) . , , (emulator) . 1 2 2, 2 1. 1 2. . -

104

, . . (microprogrammable control units). ' , . . , , , . . ' , , . . 3.13 . , 3.14.

105

3. 13

.

3.14

.

, . . , , " " . ,

106

. , . , , . , . . , . . , , (). . . , , , . . , " " . ,

107

" " . , , , " " .

. . . . , . . , . , . , 3.15. , , . , .

3.15

.

, , .

108

3.16 . 000, . 001, 010, 011, 100, 101 110 .

0

0

0

3.16

X

Y

Z

() . () M .

, , 3.17. , ' . , . . ' , , , . , , .

109

A

B

3.17

.

, . , , . ' , . ,

110

. ' log2(100+1) = 7 , , 3.18, c0 c99 . c0 c99, . , , , , .

3.18

.

, 3.19, . , , , , ,

111

. , , . , ' , .

3.19

.

. . . ' , 3.20. . , (optimal) .

112

0

1

2

3

3.20

.

(horizontal). . (vertical). . .

, . (

113

(pipelining)) Y .

, ( 3.21.). . . . ' .1 2 3

1

2

3

1 1 2 1 3 4 1 2

2 3 2 4 1 2

3 3 3 4

1 1 1 2 1 2

2 3 2 4 1

3 2 3 3.21

X .

114

. ( 3.21.). . ' ( 3.21.).3.2.4

. ' , . . , .

3.7

. .

3.8

.

3.9

.

115

. 100 , 2048 200 . (), ;

3.10

. ; .

3.11

. . . (RISC) . . , , , , . -

116

. . . , . . . . . , . , . . . . , , . : ) , ) , ) .

M

, . , : H H M O I K , . . K K K P

4

118

/, . , . . (virtualmemory) . , , . . . , . . . , .

119

4.1

. . , : , , . . .4.1.1

(RANDOM ACCESS MEMORIES, RAM)

, , . , .

120

4.1. , . 1 0, AND 0, . H 1 . 1, AND . . .

D clk

Q

1

4.1

, .

4.2 16 , . , , 0 1, -

121

24. 4.2, . 0, AND 1, , AND 2 . 0, , ( x 4.2) .

0

1 A0 A1 2

3 E/A 1

2 E/E3 E/E2 E/E1 E/E0 4.2

, . 4.1

122

. 1 0 =1 1=0. . . . / 0, AND 1, , 0 , 1 . AND 2 1, x , 1 . . / 1 AND 1, , , / . , 4.1, . / , 0=1 1=0, . . AND 2 0, x . . . , 1 byte 16 Mbytes . 4.3 . 4 EO 1Mbyte, 20 220 .

123

4.3

16 Mbytes 16 1 Mbyte .

, , . , , 1 bytes 32 Mbytes . 4.4 . 4 4 16 . 16 ,

124

16 2 1 Mbyte = 32 Mbytes. , .

4.4

32 Mbytes 32 1 Mbyte .

125

(CONTENT ADDRESSABLE MEMORIES, CAM)

(associative). , , , . , , . , (mask register). , , , . 4.5. , . , , , . . 4.6. , 1, 0.

126

4.5

.

127

D

Q

clk

4.6

.

1. . XOR () . , , 0. ( 4.7) , i , i 0. ( 4.5) i . , i .. , .0, .1, .2 .3 i.

128

4.7

.

129

4.1.2

, , . (tracks), 4.8.. (sectors). . . , , .

4.8

H .

130

, . . /. . ( 4.8.). . . (disk controller) . , , , , , . , , , . , . X (seek time). / . . X (latency time rotational delay).

131

/ , , /. (access time). , , / . . , / . (movinghead disks). /. . (fixedhead disks). (hard disks). (floppy disks), . , /. , 1.4 , . .

. (back up storage), , , . . -

132

, , . 6.35 , 200 . . 9 , 8 . / . /. , . . . , (effective datatransfer rate), , .4.1.3

, CDROMs, . . , , . CDROM, . 12 CDROM 600 , 240.000 . 100 ms 3.6 /s ( CDROM). CD.

133

CD (digital video disk, DVD). , / 16 GB. . , CDROM.

. . , 4.3. . 4.6.

4.1

, , 32 M (32Mbytes) 16 8 .

4.1

. 4.1 4.6. . 4.2 4.5 , .

4.2

134

4.3

: . . . .

, , . : ) . , / (SRAM, DRAM ), ' (ROM), 1. , , . ) . ' , , . . . . , . . -

135

. . . , . , . . , . CDROM, .

136

4.2 . , : . , . . , .

1, 2 ,., n. 1 . 4.9 4.10 . Ci, ti Si , i i. Mi Mi+1 : Ci > Ci+1 ti < ti+1 Si < Si+1

137

.

.

4.9

.

. , . , . , , .

./ : , .. : . : . i i+1. i

138

i+1. i i+1. (data consistency coherence problem) , . i+1 i. . 1, i, i1, 1, . , 1. , 1, .4.2.1

, , , (locality of references). , ( ) . . , i i1. , ,

4.10

, , , .

139

140

+1. , 1, . i , SPi . i Mi+1. , , i, SPi1 I, , i i1. SPi2 Mi1, , i2 . SP1 , 1, . , 1 , . (loops) . . , 1, .4.2.2

1 n. , . : 1. , .

141

2. ti i. 3. . 4. . 5. (allocation algorithm) I i+1. Mi , .4.2.3 K

+ + ...+ C = C 1S1 C 2 S 2 C nS n S1 + S2 + .... + S n

Ci i, Si i n . , , C Cn, S1 Sn.4.2.4 A

. . (hit ratio) Ei i 1, 2, , i1 i. i i, Ni+1,.N i, i+1,... Ei = Ni N i + N i +1 + ... N n

142

i i Ai=1Ei. A i, i+1 i t Bi +1 , i+1 Ti +1 = t1 + t B 2 + t B3 + ... + t Bi +1 = t1 +

tj =2

i +1

Bj

t1 . T1 = t1 . T=n

E Ti =1

i i

4.4

. . . . . ;

1, 2, , . 1 . . i i+1.

143

. . 1 . . i 1, 2, , i1 i. .4.3

, . , : , . 4.3.1

144

. 4.3.2 . , . 4.3.3. 4.3.4 .

. , : , . , .4.3.1 (fetch policy)

(fetch policy) (on demand) (prefetch). . . , .

145

4.3.2 (placement policy)

(placement policy) . , (direct mapped), (kway set associative) (fully associative). , . , , , . .

. , , . 4.11 . . , , , 1, 5, 9 13.

146

0 1 2 3 00 01 10 11

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 00001101 00001110 00001111

4.11

. 4 , 16 .

, . 4.11 . , 1, 5, 9 13 01, , 01. . 2 , 2 . 2+ . 2 ,