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

32.973.

23-02
004.3
18

18

., .
. 6- . .: , 2013. 816 .: .
ISBN 978-5-496-00337-7
, , , , . , . , , .
: , , , .

32.973.23-02
004.3

Prentice Hall, Inc. Upper Sadle River, New Jersey 07458.


. .
, , ,
. , ,

, .

ISBN 978-0132916523 .
ISBN 978-5-496-00337-7

Prentice Hall, 2013


, 2013
, , 2013


........................................................................................... 16
1. .................................................................................. 20
2. .......................................... 76
3. ................................................ 172
4. ..................................................... 270
5. ....................................... 377
6. ............................................. 475
7. ............................................................... 555
8. ............................. 590
9. ......................................................................... 699
. . ......................................................... 708
. .......................................... 720
. ...................... 729
. ......................................................................... 791


............................................................... 16
............................................................................... 19

1. ......................................................... 20
........................................... 20
, ...................................................20
................................................23
..........................................................26
....................................................... 31
(16421945).............33
(19451955)..........................35
(19551965).....................................38
(19651980)..........................40
(1980?)......42

.................................................................46
.................................................................................... 47
...........................................48
...............................................................50
.....................................................................50
................................................................................53
.......................................................55
...................................................................56
................................................................................................57
...............................................................................................58
.........................................................................................59
. ......................................................................... 60
x86...................................................................60
ARM.................................................................66
AVR..................................................................69
................................................................................. 70
....................................................................... 72
................................................................................... 73

2. ..................... 76
............................................................................................. 76
...................................................77
..............................................................................78

RISC CISC.............................................................................82
.........................84
.............................................................85
....................................................90
...................................................................................... 94
........................................................................................................94
.......................................................................................95
............................................................................96
.......................................................................98
-.........................................................................................102
.......................................................106
........................................................................ 106
.........................................................107
.................................................................................108
IDE-............................................................................................112
SCSI-..........................................................................................114
RAID-......................................................................................115
..................................................................119
CD-ROM....................................................................................121
CD-R.........................................................................................126
CD-RW.......................................................................................128
DVD-...........................................................................................128
Blu-Ray......................................................................................130
- ............................................................................................ 131
...................................................................................................131
PCI PCIe..................................................................................133
...........................................................................................136
.......................................................................................141
..................................................................................................142
..........................................................................143
............................................................................................146
................................................151
.......................................................................159
....................................................................................162
..................................................................... 167
................................................................................. 168

3. .......................... 172
....................................................................... 172
...............................................................................................172
....................................................................................175
..............................................................177
.........................................................................179

.................................................. 182
...........................................................................182
........................................................................184
.......................................................................187
...........................................................................192
.................................................................................................... 193
..............................................................................................194
..............................................................................................196
.............................................................................................198
............................................................................199
............................................................................202
............................................................................................205
FPGA ....................................................................................................... 208
.......................................................... 210
...................................................................210
...........................................................................212
......................................................................................215
..........................................................................216
...................................................................................221
......................................................................224
....................................................... 227
Intel Core i7..........................................................................................227
Texas Instruments OMAP4430......................234
Atmel ATmega168.....................................................238
......................................................................................... 239
PCI.............................................................................................240
PCI Express..........................................................................................249
USB............................................................................................255
........................................................................................... 259
-..................................................................259
........................................................................260
..................................................................... 263
................................................................................. 264

4. ............................... 270
..................................................................... 270
.......................................................................................271
....................................................................................277
Mic-1...................279
IJVM ........................................... 284
.....................................................................................................284
IJVM............................................................................286

IJVM-.............................................................................288
IJVM.................................................................................292
.................................................. 294
..................................................................294
IJVM Mic-1.............298
.................................................... 313
..............................................................313
......................................................................315

Mic-2.................................................................322
Mic-3.........................327
Mic-4......................332
. .......................................................... 336
-.........................................................................................337
...............................................................343

......................................................................348
.................................................................355
....................................................... 357
Corei7................................................357
Omap4430..............................................................364
Cortex A9.....................................................364
ATmega168...............................368
i7, OMAP4430 ATmega168...........................370
..................................................................... 372
................................................................................. 373

5. .................. 377
.................................. 379
......................................379
....................................................................................381
.............................................................................................384
..............................................................................................385
Core i7....................385
OMAP4430I.............388
ATmega168........................390
........................................................................................... 392
........................................................................393
.....................................................................394
Corei7..........................................................395
OMAP4430.........................................................395
ATmega168......................................................................396

10

.................................................................................... 396
......................................397
.................................................................399
Corei7...................................................402
OMAP4430............................................403
ATmega168...............................................................405
.............................................................................................. 406
..............................................................................406
.............................................................406
...............................................................................406
.......................................................................407
......................................................407
..........................................................................408
..................................................410
............................................................................410
............................................413
.....................414
Corei7...............................................416
OMAP4430.........................................418
ATmega168........................................418
...........................................................419
........................................................................................... 419
...........................................................420
.............................................................................421
...............................................................................422
.........................................................424
..................................................................426
............................................................................427
-.......................................................................428
Corei7...............................................................432
OMAP4430............................................................................436
ATmega168............................................................................439
.................................................................442
................................................................................... 442
...............................443
..........................................................................................444
......................................................................................449
..........................................................................451
.........................................................................................452
.................................................................................... 456
Corei7.................456
OMAP4430..........458

11

IA-64 Itanium 2 ................................................. 459


IA-32...................................................................................460
IA-64 .............461
..............................................462
.........................................................................463
.......................465
.......................................................................467
..................................................................... 468
................................................................................. 470

6. ........................ 475
................................................................................ 476
.........................................................477
......................................479
...........................482
.............................................................483
.........................................................485
........................................................................................486
.....................................................................489
Corei7.................................................................492
OMAP4430...........................................................497
....................................................499
................................................................ 500
Corei7....................................................502
- ...................................................... 502
.................................................................................................503
-...................................504
.........................................................508
................................... 509
.....................................................................510
..................................................................................511
.....................515
............................................................. 518
UNIX WindowsXP..............519
.............................................................526
-.................................................529
.......................................................541
..................................................................... 547
................................................................................. 548

7. ........................................ 555
.................................................................... 556
?.............................................................556

12

......................................................................557
.......................................................558
...........................................................................................559
................................................................................................. 561
, .........................562
......................................................................564
............................................................565
....................................................565
..................................................................... 566
........................................................566
....................................................................................567
.....................................................................................571
..............................................................573
........................................................................... 574
.........................................................................575
..............................................................578
.........579
..................................................................582
..................................................................... 586
................................................................................. 587

8. ......... 590
........................................................ 592
...........................................................592
...............................................599
.................................................606
........................................................................................ 612
...........................................................................612
....................................................................620
NVIDIA Fermi..................................................620
..............................................................................623
................................................................................. 624
............................................624
...............................................................................631
UMA-
.................................................636
NUMA-...................................................................644
COMA-...................................................................653
................................................................................ 655
.....................................................................656
............................................659
......................................................................670

n=",

13


.................................................................675
....................................................................................678
.................................................679
..........................................................................686
................................................................ 691
.................................................................... 694
................................................................................ 696

9. ............................................... 699
. ................................... 708
.......................................................................
..........................................................
..............
............................................................
...........................................................................
................................................................................

708
710
712
714
716
717

. ..................... 720
............................ 720
IEEE 754 .................................................................................. 724
................................................................................ 727

. ... 729
................................................................................. 730
................................................................................730
......................................731
8088 ..................................................................................... 732
................................................................................732
.............................................................734
- ...........................................................................735
............................................................................... 737
.........................................................737
..........................................................................................739
8088 ................................................................................ 743
, ...................745
, .........747

......................................................................748
...............................................................749
.........................................................................751

14

.................................752
......................................755
.............................................................................................. 756
.............................................................................................756
as88 ACK...........................................................757
8088.................................761
.................................................................................................. 762
...............................................................................764
................................................................... 766
................................................................................................ 767
Hello World...........................................................................................767
..............................................................770
...................................................772
...................................................775
............................778
...................................................................782
.............................784
................................................................................. 790

. ............................................... 791

. (AST): , , ,
. . (TA): ,
( )


,
, .
, , , .
, ,
, ,
.
,
, . , ,
. Intel
Core i7, Texas Instrument OMAP4430 Atmel ATmega168. Core i7
, ,
. OMAP4430 ARM, .
, ATmega168,
. ATmega168
AVR , -.
, ATmega168
, , . , ATmega168 Pentium Corei3,
i5 i7. ATmega168
Arduino ,
,
.
,
, . - (. ),
.
8088, iA32, Corei7.
ARM AVR ,
, 8088
8088- .
Core i7 .
8088 , .
, Core i7, , 8088.
, , -


17

, 8088,
. Windows,
UNIX Linux. - .
( 443 ;
816). , ,
.
, ,
(, ) .
, 4 ( 4.4 ) 5, 4,
6, 7 8 .
( ). 1 -
, . ,
, 1960-,
,
. , FPGA, ,
. ,
(Core i7, OMAP4430 ATmega168).
2 . ,
(GPU). , , , . -
, , Wiimote Kinect, ,
.
3 . , ,
,
, .
(FPGA, Field-Programmable Gate Array) ,
, .
, .
4,
, .
, Core 7, OMAP4430 ATmega168.
5 6 ; ,
ARM AVR. 6
Windows XP Windows 7.
7, , .

18

8, , , .
Core i7 NVIDIA Fermi. ,
, BlueGene Red Storm,
.
9 . -,
, .
. ;
.
,
. , ,
(Evert Wattel)
. , ,
. ,
-, -.
, - ( ),
4. (Richard Salter)
. .
, .
- :
http://www.pearsonhighered.com/tanenbaum

Companion Website
.
:
/.
.
.
:
PowerPoint.
, .
.
, Pearson
Education.
( ) . , (Anna Austin),
(Mark Austin), (Livio Bertacco), (Valeria
Bertacco), (Debapriya Chatterjee),
(Jason Clemons), (AndrewDeOrio), ( Joseph
Greathouse) (Andrea Pellegrini).

19

:
. (Jason D. Bakos) , (Bob
Brown) ,
(Andrew Chen) (), .
(J. Archer Harris) ,
(Susan Krucke) , . (A.Yavuz
Oruc) , (Frances Marsh) (Kris Schindler) . .
, . . (Byron A. Jeff) ,
. (Laura W. McFall) , .
(Taghi M. Mostafavi)
(James Nystrom) . .
(Tracy Johnson) , .
(Carole Snyder)
. (Bob Englehardt)
.
(AST) . 21- , !
, ,
. :
, .
, ,
iPad.
, (TA) ,
.
() , ,
.


,
comp@piter.com ( , ).
!
- http://www.piter.com.

1.

, ,
. , , . .

, , , :
;
, ;
.
,
. .
, .
, . ,
.
, - , .
,
.
.
. ,
. , .

, , ,
, . X, Y. - . ,
.

,
. , , . ,

21

1. , 0.
, 0. , ,
1 , ,
0.
, 1, 0.
, 0,
, 1. .
0 ,
, 1. 1 ,
0. 0. , ,
, .
. 0,
1. , 1 0, 1 ,
0 . 0 .
1 0
. .
, 1
, . , .
, ,
, 1.
1, 00. 1
, 0, ,
0, .
1, . ,
, , (-
),
. , 0, . ,
, .
, 0 1 . , 1
, 0, . , 1 -

22 1.

, ,
. .
,
, 1. ,
2, 2.
2,
2 .
1, ,
1.
, , , ,
.
, ,
.1.1. ,
, ,
.

. 1.1.

.
- , , . ,
. ,
, , .
, , ,
,

23

. , C C++, , ,
.

. , ,
.
n n
, .
. ,
, , , ;
. , 0,
. ,
1, 2,...,n,
, .
, n,
.
, ,
.
.
, n,
, . , , ,
.
( ).
, ,
.


.
(.1.2). 0 . 1. , .
.1.2, , , .
. ,
. - ,
, .
, , , .
( ),
.
(, 0 1).
, .

24 1.

. 1.2. .
,

.
1 , 0 1. , , , 16, 32 64, .
.
.
3.
.
() 8 32 , , (- ).
.
, .
: , - ( ),
- .
, . .
,
.
(
), , .
, ,
2.

25

,
. , ADD , , , , .
,
, 2.
2 .
, ,
X,
Y ..
, .
-
.
, , .
.
(,
, ).
: , ,
. 3
, 1 2.
, 3, ,
. -
. 3, 2,
, . , 3 , .
.
.
3 4 .
.
,
. , .
, .
, 4,
. 2 3 , 4, 5
( ) .
1, 2, 3 4, 5
. 1, 2 3 . ,
, , , . 4,
, .
4
. -

26 1.

1,2 3 , .
1, 2 3, .
, , .
5 , . .
. C, C++, Java,
Perl, Python PHP. , , 3 4. , ,
, . , Java ,
- Java,
.
5
, . ,
.
, ,
, .
. ,
, ,
.
,
. ,
. , ,
, . (, , )
.
, .
.



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

27

, , - ,
; , , , , .

.
, ,
, . (Vahid, 2003).
, :
.
, ,
( ,
). (Karen Panetta): . ,
: , ,
. , ,
, , . , , X ,
Y , . .

40- :
, ,
, .
,
.
1951 (Maurice Wilkes),
, , , ,
() [Wilkes, 1951].
(),
ISA .
ISA ,
.
,
, , (
).
50- . 60-
. 70- , ,
, .
.

28 1.


, ,
.
. ,
, - , , 3 5 (
). ,
, ( ) .
80 ; .
,
.
FORTRAN,
:
1. , ,
FORTRAN,
.
2. ,
FORTRAN, .
.
3. ,
.
, .
.
4. . , ,
.
,
.
5.
.
. ,
. .
, ,
FORTRAN,
. , , .
.
, ,
, .
, ,
.

29

60- , . .
, .
.1.3
FMS (FORTRAN Monitor System) 709
IBM.

. 1.3. FMS

*JOB ( ,
). *FORTRAN
FORTRAN . , FORTRAN.
,
*DATA
.
, ( ),
. *FORTRAN
, *DATA
. ,
.
. ,
,

30 1.

.
, ( , -)
.
, . .

. . , .
.
60- ,
() ,
.
. , .
,
(, ).
( ) .
, 3, ISA, .
, , ,
ISA, .

1970, ,
, . ,
( ) . , ,
, .
,
, ,
. ,
INC (INCrement), .
ADD, ,
. INC
, ADD, .
.
:
;
;
;
;
.

31

, ,
,
. :
( );

();
, , ;
,
( );
, .
,
.

60-70- .
, .
,
, . , ,
.
, , .
,
.
, ,
.
,
. , . ,
( , , ). ,
, ,
, . ,
, .
.



. ,
.
,
, . , ,

32 1.

.
,
. 1.1.
- (1987).
,
- , (1997).
1.1.

1834

1936

Z1

1943

COLOSSUS

1944

MarkI

1946

ENIACI

1949

EDSAC

1951

WhirlwindI

1952

IAS

1960

PDP-1

DEC

- ( 50)

1961

1401

IBM

1962

7094

IBM


1960-

1963

B5000

Burroughs

1964

360

IBM

1964

6600

CDC

1965

PDP-8

DEC

- ( 50000 )

1970

PDP-11

DEC

-
70-

1974

8080

Intel

8-

33

1974

CRAY-1

Cray

1978

VAX

DEC

32-

1981

IBMPC

IBM

1981

Osborne-1

Osborne

1983

Lisa

Apple

1985

386

Intel

32-
Pentium

1985

MIPS

MIPS

RISC

1985

XC2064

Xilinx


(FPGA)

1987

SPARC

Sun

RISC
SPARC

1989

GridPad

Grid Systems

1990

RS6000

IBM

1992

Alpha

DEC

64-

1992

Simon

IBM

1993

Newton

Apple

2001

POWER4

IBM


(16421945)
, ,
(16231662), . 1642,
19, , .
.
,
(16461716) ,

. ,
.
150 ,
(17921871), , -

34 1.

. , ,
, ,
.
.
:
, -.
,
, . ,
17000 ,
, . 4 : (),
, ( ), ( ). 1000
50 ; .
,
, , . ,
.
, . .
,
, (,
) .
,
, .
, .
.

, .
,
(Ada Augusta Lovelace), .
.
Ada.
, ,
. ,
, 19 .
,
. ,
.
30- (Konrad Zuse) .
, . ,
1944, -

35

.
.

: ( John Atanasoff)
Bell Labs.
. , , .
() . , . -
: ,
.
(George Stibbitz) ,
, .
1940. ( John Mauchley), .
.
, , (Howard Aiken)
.
. ,
, .
MarkI
1944. 72 23 , 6 . -
. ,
MarkII, .
.

(19451955)
.
.
, ,
, ENIGMA, .
ENIGMA , ,
, .
, , .

COLOSSUS.
. COLOSSUS 1943 ,
-

36 1.

30 , COLOSSUS
. , .
COLOSSUS,
.
, .
(, ,
). ,
.
, , , . .
1943 , .
( J. Presper Eckert) ,
ENIAC (Electronic Numerical Integrator and Computer
). ENIAC 18000
1500 , 30 140
. 20 , 10- . (
, -
, - , .) ENIAC 6000
, .
1946 , , .
, ,
-.
.
.
EDSAC (1949 ).
. JOHNNIAC Rand, ILLIAC , MANIAC - WEIZAC
.
EDVAC (Electronic
Discrete Variable Computer ). , , ,
(
). Unisys
Corporation.
. , ,
. , ,

37

, ,
.
EDVAC,
ENIAC, ,
, EDVAC
IAS (Immediate Address Storage ).
, .
, , : , - , .
,
. ,
.
,
,
. ,
, . ,
, ENIAC,
(1 9 ),
.
.
, ,
- . EDSAC,
, , , .
IAS, (Herman
Goldstine), , .
, , , .
.1.4.

. 1.4. -

: , , , -.
4096 , 40 (0 1).

38 1.

2 20 , 40- 40 . 8 , 12
4096 .
.
, ().
-
40 , .
. ,
,
.
, IAS, WhirlwindI.
IAS, ENIAC , , Whirlwind I
16 .
( Jay Forrester) , -.
IBM ,
. IBM
,
1953 701, , UNIVAC
. 701 2048 36 ,
. ,
.
704, 4096 , 36 . 1958 IBM
, 709,
704.

(19551965)
Bell Laboratories
( John Bardeen), (Walter Brattain)
(William Shockley), 1956 .
, 50-
.
. 16 , WhirlwindI.
TX-0 (Transistorized eXperimental computer0 0)
TX-2.
TX-2 ,
, (Kenneth Olsen), 1957
DEC (Digital Equipment Corporation
) , TX-0. ,

39

PDP-1, , ,
DEC, , .
, . . , IBM, ,
. DEC .
PDP-1 1961 . 4096 18
200000 . , 7090, 709
. PDP-1 120000 , 7090 . DEC PDP-1,
.
PDP-1 , , .
PDP-1 512512 ,
. PDP-1,
.
DEC PDP-8, 12- . PDP-8 , PDP-1 (16000).
(omnibus), .1.5.
, . PDP-8 IAS.
.
DEC 50000 PDP-8
-.

. 1.5. PDP-8

, IBM
709 7090, 7094.
2 , 32536 36 . 7090
7094 ENIAC,
60- .
IBM 1401 .
, 7094, .
, .
1401 ,
. 4000 8 (
16000).

40 1.

6 , . MOVE, , : . ,
, 1.
1964 , CDC (Control Data
Corporation) 6600,
, 7094 ( ).
, CDC
. ,
( )
. ,
, .
,
, 10 .
6600 .
, ,
( ,
) . , 6600
.
6600.
6600 (Seymour Cray)
, .
, .
6600, 7600 Cray-1.
: ,
, , , :
.
( )
( ).
BurroughsB5000.
PDP-1, 7094 6600 , (DEC) (IBM CDC).
. B5000
. Algol60 ( C Java),
, .
,
. , .

(19651980)
1958 (Jack
Kilby) (Robert Noyce)
.
, ,
.

41

1964 IBM , : 7094 1401, , .


,
36 ,
.

, .
, IBM
.
System/360, , . System/360 .
(),
. 1401 360
(30), 7094 360 (75). 75 ,
, , ,
. , , .
. .
,
.
.1.2 360.
.
1.2. IBM360

30

40

50 65

- 1

3,5

10

21

1000

625

500

250

65536

262144

262144

524288

16

360 .
,
, -, .
.
360 ,
() .
1401, 7094,
360.

42 1.

360 , 1401, , 1401,


.
360 , ,
, .
:
360, 1401, 7094.
.
,
360 .
360
: 16 32
, , 1401. 360
, 1401.
360 ( ) 224 (16 ). , ,
. , 360
370, 4300, 3080, 3090,
. 80- 16 , IBM ,
32- , 232.
, 32- ,
32- . 16 .
32- IBM,
,
232 (4294967296) .
64-
.
-
PDP-11, 16- PDP-8. PDP-11
360, PDP-1 7094. 360, PDP-11 ,
, ,
. PDP-1 ,
, DEC
-.


(1980?)
() 80-
, , ,
.
. PDP-1
,
( ). 80-

43

, , . .
,
. , ,
(, ), .
.
, ,
Intel8080, , 8-
. .
. .
CP/M, (Gary Kildall) Intel8080.
( ), ,
.
, Apple ( AppleII), (Steve Jobs) (Steve Wozniak).

, Apple
.
, , IBM, ,
.
IBM ( IBM, IBM), , : ,
(Philip Estridge), ,
- , (.-). ,
2000 ,
Intel8088 .
(IBM PC) 1981 . 30- PC ,
[Bradley, 2011], [Goth, 2011], [Bride, 2011]
[Singh, 2011].
IBM , . (
, ),
, ,
, 49. ,
IBMPC,
.
IBM, IBMPC ,
PC , IBM (
).
.

44 1.

( Commodore, Apple Atari)


, Intel, IBMPC ,
. , , ,
.
( ) Apple
Macintosh. 1984 Apple Lisa
,
Windows. Lisa ,
Macintosh, ,
.

.
, . Osborne-1 11 , ,
, . ,
. Osborne-1 ,
Compaq IBM PC
.
IBMPC MS-DOS, Microsoft. ,
Intel , IBM Microsoft
MS-DOS OS/2,
(Graphical User Interface, GUI), AppleMacintosh.
Microsoft
Windows, MS-DOS, , OS/2 . , OS/2 ,
Microsoft Windows,
IBM Microsoft.
, Intel Microsoft IBM, , , -
.
8088 Intel
. 80386, 1985 , 32-.
, , , 80486.
Pentium Core. PC.
x86. ,
AMD, x86.
80- CISC (Complex Instruction Set Computer
) RISC (Reduced
Instruction Set Computer ). RISC . 90-

45

, , , .
RISC, CISC 2, .
1980- (Ross Freeman) Xilinx ,
.
, (FPGA, Field-Programmable Gate Array),
,
, .
FPGA
. FPGA
, . ,
-
, . FPGA
, , .
1992 8-, 16- 32-. 64- Alpha
DEC RISC-, . , 64- ,
.
1990-
, . ,
,
. 1990-
- : , . ,
,

. 2001 IBM POWER4 ,
.

. ,

, ( )
,
.

46 1.



1981 500
,
. ,

,
.
,

. - ,
,
.
, , ,
,
. 1989 Grid Systems
, GridPad.
, . ,
GridPad, ,
,
.
Apple Newton, 1993 , , . GridPad,
Newton ,
.
,
(Personal Digital Assistants, PDA), , .
.
PDA
( Jeff Hawkins), Palm
, .
-,
( ). ,
,
,
Graffiti, ,
.
Palm Palm Pilot , Graffiti,
,
.
PDA ,
. 1990-

47

. IBM
PDA, . ,
Simon, , PDA, ,
.
.
Apple iPhone Google Android.
-
. , , , [Bechini et al., 2004].

.
,
( 1970- ), . ,
.

, .
,
[Henkel et al., 2003],
.
,
(, ENIAC), (IBM7094),
(IBM360), ( Intel).
, ,
.
.
,
, .
, (Mark Weiser)
, ,
[Weiser, 2002].
, .
, , [Lyytinen and Yoo, 2002; Saha and Mukherjee, 2003; Sakamura,
2002].


.

. ,
, .

48 1.



.
.
( ), . (Gordon Moore),
Intel,
, ,
, 500 20
20 . ,
.
,
. , ,
.
4 , , ,
,
, .
, ,
18 ,
60% . ,
(.1.6).

. 1.6. ,
60% .

, , , -
, ,
. ,

49

, , . ,
,
, - [Bose,
2004; Kim et al., 2003]. ,
, .
,
. ,
,
[Oskin et al., 2002] [Heinze et al., 2002].
, , .
,
. ( )
. ( ,
10 $120000,
).
.
, , ,
. .

, (Nathan
Myhrvold), Microsoft. :
. , . 80-
troff ( troff ). troff
.
. , , ( ,
, , ; . ).
,
, , - .

, . , IBM PC/XT, 1982 , 10. -
PC/XT 1.
50%.
, ,
, , (
, , ..),
, 1982 /-

50 1.

50% .
, ,
, , , (Al
Hoagland) ,
( ). , ,
- .
. , 300/, ,
56/, - ,
1012/. -
(, TAT-12/13) 700 , 10
300000 , 10- .
, , 1/ (1012/) 100 .
.


(Richard Hamming), Bell Laboratories,
, . , , 1000/ ,
, 100/ .
100 .
,
10, 1000000 .
, ,
: .
,
. .1.3.
, .


,

Happy Birthday, - .
, , , ,

51
1.3. .

0,5

(
)

, ,

50

500

5000

5000000

. ,
,
, .
, . , RFID
(Radio Frequency Identification ). 0,5
; , 128- .
,
.
,
.
- .
, RFID ( -).
, ,
, . ,
,
. , ,
/ .
.
/ RFID , .
,
!
, -,
, 128- RFID -

52 1.

. , RFID. ,
,
,
RFID, , .
.
, ,
.
, !
RFID, .
. ,
. , , , !
, ,
. , , , RFID.
( )
RFID . ,
,
. , ,
.
.
RFID .
RFID . ()
, ,
. , ,
RFID,
. RFID , ,
.. ,
, ,
.
RFID .
.
, .
, , ,
, , -

53

.
, ,
,
. , ,
? ,
RFID,
.
RFID . (
), . RFID ,
, , .
, , -,
.
/ RFID .
. ,
, , . , ,
,
. RFID
, ,
. www.rfid.org.

,
. , , . ,
, ( ):
(, , , , );
( , , );
(, , , CDROM);
(, DVD-, , MP3-, );
(, , , , );
( , ,
, );
( ,
, );

54 1.

( , );
( , ,

).

, ,
, , ,
.
200 ! ,
. ,
, .

( ) .
RFID, , ,
.
, -. -, ,
, .
. : .
, .
,
, , .
4-, 8-, 16- 32-.
, ,
, , ,
. -,
.
, ,
( ) , . ,
, , .
, , ;
, 8-
10 . 10 .
-, .
. ,
,
.
.

55

-, , , .
, .

Arduino,
(Massimo Banzi) (David Cuartielles) ().

, ,
. ( .) ; Arduino 20 !
Arduino ; ,
,
( ) Arduino. 8- RISC- Atmel AVR,
-.
Wiring,
.
Arduino -
. , Arduino

, ,
, . Arduino
Arduino, www.arduino.cc.


. , ,
.

-, . ,
,
.
, , .
Sony PlayStation3. 3,2 ( Cell) RISC-
IBM PowerPC, 128- SPE (Synergistic Processing
Elements). PlayStation 3 512 ,
Nvidia 550 Blu-ray. Microsoft Xbox 360 IBM PowerPC
3,2 512 , ATI

56 1.

500 , DVD- .
Samsung Galaxy .
ARM- 1 , ( Nvidia Tegra2),
1 , , 3- -.
,
, , . ,
, , 128- SPE
PlayStation3 ( ).
, , , , , .
, USB FireWire. ,
.
. ,
, ,
( ) , .
, ,
, .
:
.
, .
,
(, )
, ,
.


. . : ().
,
, , CD-ROM/DVD/Blu-ray, , , .
, ,
.
, , ( , ..), , , , ,
. .1.7.

57

. 1.7.
. Intel DQ67SW
( Intel)

, ,
. , , .
. , ,
,
.
(, ,
iPad). PC ,
, , x86.

-.


(
), . , , .
,
.
.
, . ,
,
. , , ,
UNIX Windows.

58 1.

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

. ,

.
, ,
.
-.
- ,
( ) . , Google
;
( ) .
- , , 2- ,
.
Google 1000000 .
, - . 1960- -
(. ), .
. . 1980-
. ,
.
2.0.
,
: PC, , , , , ( ),
, , .

59

, .
, : ,
- .
, ? , 10 , , ()
. : ,
.

,
60- . 360.
, ,
- , .
, -
, ,
. , ,
.
2000 .
- , 60- 70- ,
COBOL, . ,
. ,
, ,
, ,
. ,
31 9999 ,
, 8000 COBOL.
, 40 ,
.
,
, ,
, .
. , , .

, , , , , . ,

60 1.

, , ,
, .



(ISA): x86, ARM AVR. x86 (PC Windows Linux, Mac)
.
, , , . -. ARM

ARM. , AVR , .
, ,
, , ,
,
50. ,
.

x86
1968 (Robert Noyce),
, (Gordon Moore), ,
(Arthur Rock), -,
Intel . 3000,
( Intel
).
60- 20.
1969 Busicom Intel
12
. Intel (Ted Hoff ),
, , 4- ,
. 1970
4004 2300 [Faggin et al., 1996].
, Intel, Busicom , .
Intel , 4004 ,
Busicom 60000, , Busicom Intel
. Busicom Intel,
Intel 8- , 8008, -

61

1972 . Intel, 4004


8008, .1.4.
1.4. Intel.
(1=1 /)

4004

4/1971

0,108

2300

640

8008

4/1972

0,08

3500

16 8-

8080

4/1974

6000

64

8086

6/1978

510

29000

16-

8088

6/1979

58

29000

IBMPC

80286

2/1982

812

134000

16

80386

10/1985

1633

275000

32-

80486

4/1989

25100

1200000

- 8

Pentium

3/1993

60223

3100000

,

MMX

PentiumPro 3/1995

150200

5500000

41

PentiumII

5/1997

233400

7500000

PentiumPro MMX

PentiumIII

2/1999

6501400

9500000

SSE,

Pentium4

11/2000

13003800 42000000

, SSE-

Core Duo

1/2006

16003200 152000000

Core

7/2006

12003200 410000000

64

64- 4-

Core i7

1/2011

11003300 1160000000 24

PentiumPro PentiumII 36,


64. . . .

62 1.

8008,
. ,
, Intel
, 16 (
8008), , . 8080,
1974. PDP-8,
. : DEC
PDP-8, Intel 8080.
1978 8086, 16-
. 8086 8080, . 8088 ,
8086. , 8086, 16-
8-, - ,
, 80861. IBM 8088 IBMPC,
.
8088, 8086 1. 80- , Intel 80286, 8086.
, 8086 8088,
-
-. 80286
IBMPC/AT PS/2. , 8088,
( ,
8088).
32- 80386, 1985
. 80286, .
,
, , ,
.
80486. , 80386,
-
8. -
()
. 80486
, .
Intel, , , (, 80486)
, Pentium ( ). 1

, ,
8088, ,
8086. 8- , 8088 . . . .

63

80486, , Pentium
, (
2).
Pentium ,
MMX (MultiMedia eXtension
). , ,
.
, ,
Sexium (sex ), .
Pentium , , PentiumPro. , .

.
Pentium Pro -.
8
8 . PentiumPro ( ) -
256.
- Pentium Pro MMX- ( Intel , ).

MMX- , PentiumII.

SSE
(Streaming SIMD Extensions SIMD-)
PentiumIII [Raman et al., 2000]. , PentiumII.
Pentium .

. Pentium4.
. 3,06
(hyperthreading).
,
; ,
. , SSE-.
2006 Intel Pentium Core Core 2 duo.
, Intel
Core 2 duo ,

. Core ; i3, i5 i7 -, - .

64 1.

, . i7
.1.8. ,
, Xeon, . ,

(-).
1 2 , 3 (L3),
. .

. 1.8. Intel Core i7-3960X. 2121


2,27 (
Intel)

, , Intel .
1998 Celeron.
, Pentium 2 . Celeron
, Pentium2, .
1998 Intel Pentium2
Xeon. -
,
,
Pentium2,
. PentiumIII,
, Xeon.
Xeon .
2003 PentiumM ( M
Mobile) .
Centrino, , -, , , -,

65

, -,
IEEE 802.11 (WiFi). Pentium M
Pentium 4; , ( )
Pentium 4 Intel.
Intel 8086. , ,
- 8086, Pentium4 .
Intel
.
, Pentium4 , 8086,
. - , , , Pentium4
42 .
,
, .
(..1.4), ,
. .1.9.
10G
1G
Pentium III

100M
10M

1M

80286

100K
10K

4004

1K

8080

80386

8086

Core 2
Core Duo
Pentium 4

Core i7

Pentium II
Pentium
80486

Pentium
Pro

8008

8008

100
10
1
1970

1975

1980

1985

1990

1995

2000

2005

2010

. 1.9.

, , , .
, , , .

66 1.

, , , ,
, . Pentium4
3,6 115. ,
100. , .
2004 Intel
Pentium4 4 - .
, , , , . ,
, ,
. , ,
, ,
Intel . Intel

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

ARM
1980- Acorn Computer 8- BBC Micro
, IBM PC.
BBC Micro 8- 6502,
(Steve Furber) Acorn , 6502
16- IBM PC 8086. , , .
Berkeley RISC, (
SPARC),
. Acorn RISC Machine ( ARM , ARM Acorn,
Advanced RISC Machine). 1985 .
32- , 26-
VLSI Technology.
ARM ( ARM2)
Acorn Archimedes.
, 2 MIPS ( )

67

899 . , , ,
.
Archimedes, Apple Acorn
ARM Apple Newton.
, ARM Acorn
, Advanced RISC Machines (ARM).
ARM 610 Apple Newton 1993 . ARM,
4- , .
Apple Newton , ARM 610 ; ,
Acorn RISC PC.
1990- ARM Digital Equipment
Corporation ARM ,
PDA. StrongARM,
- (233 ) (1 ). , , 16- . StrongARM
DEC .
PDA, , .
, ARM ARM7, ARM 1994
. ,
16- Thumb 32- ARM, 16- ,
.
- , ,
Nintendo Gameboy Advance.
, ARM . ,
. , Samsung Galaxy Tab
Android ARM. Galaxy Tab Tegra 2, ARM Cortex-A9
Nvidia GeForce. Tegra 2
ARM, Nvidia TSMC
(Taiwan Semiconductor Manufacturing Company).
,
.
. 1.10
Nvidia Tegra 2. ARM: ARM Cortex
1,2 ARM7. Cortex-A9

68 1.

, 1- L2 . (
, .
, !)
ARM7 ARM-,
. 333- (GPU) GeForce, . Tegra 2 /
, HDMI.

. 1.10. Nvidia Tegra 2


( Nvidia)

ARM
, . 2011
ARM , ARM 15 . ARM , ,
. , 2011
64- ARM-. 2011
Nvidia Denver ARM
. 64- ARM-
(GPGPU, General-Purpose GPU).

.

69

AVR
( x86, ) (
ARM, PDA ). AVR
. AVR 1996 ,
- (Alf-Egil Bogen) (Vegard Wollan) 8- RISC-, AVR. ,
, RISC- ((A)lf and
(V)egards(R)ISC processor).
Atmel , AVR.
AVR AT90S1200 Atmel 1997 .
, Intel
8051 .
AVR ,
Arduino.
AVR , .1.5. tinyAVR
,
. 8- , - (,
). tinyAVR ,
:
,
. megaAVR,
Arduino,
-, .

AVR XMEGA, USB.
1.5. Intel.
(1=1 /)

EEPROM

tinyAVR

0,516

0512

32512

,
-,

632

megaAVR 8256

0,54 0,258

28100
,

AVR
XMEGA

14

44100 ,
- USB

16256

216

70 1.

,
AVR .
: -, (EEPROM, Electrically Erasable Programmable Read Only
Memory) (RAM, Random Access Memory). -
; . -
,
. EEPROM , - .
, (12- 24-).
,
. .
2.
:
, ( ,
), .
,

-. ,
,
Atmel megaAVR-168:
1. ( 8- 16-).
2. .
3. - , , ,
.
4. - ,
.
5. /.
6. I2C .
7. , .
8. , .
9. ,
.
10.
.


, ,
, -

71

.
.1.6. ,
1 (, ..). , 1 / 106 , 100- 1010 .
1.6.

103

0,000001

106

0,000000001

109

0,000000000001

1012

0,000000000000001

1015

0,000000000000000001

1018

0,000000000000000000001

1021

0,000000000000000000000001

1024

0,000000000000000000000000001

103

1000

106

1000000

109

1000000000

1012

1000000000000

1015

1000000000000000

1018

1000000000000000000

1021

1000000000000000000000

1024

1000000000000000000000000

, , ,
. ,
103 (1000), 210 (1024). , 2. , 1 210 (1024)
, 1 220 (1048576) , 1 230 (1073741824) ,
1 240 (1099511627776) .
, 1/
1000 , 10/ 10000000 .
, , . , ,
.
, : 210 , 220 , 230
240 . . , ,
, , 210, 220, 230

72 1.

240 , /, /, / /
103, 106, 109 1012/.


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

. ,
, .
, , , , x86, ARM
AVR. . -,
, . , ,
. , ,
, ,

, . ,
, .
, ,
x86, ARM AVR. , . , ,
.
2 : , , -.
, .
36 , .1.2.
, . k
k1, , ,
, .
, .

73

3 ,
. ,
. , . , ,
, PCI.
,
.
4 .
, , . .
5 (ISA),
. ,
, .
6 , ,
. : Windows (
x86) UNIX, x86 ARM.
7 . ,
. .
8 , .
, .
, ,
.
9 , .
C - www.
prenhall.com/tanenbaum.


1. :
1) ;
2) ;
3) .
2.
, ?
.
3. ,

? , .
4. ,
. m

74 1.

, r , m r 1.
k , 2, 3 4, , r+ 1 n r?
5.
. , .
, , .
6. 1, 2
3. ,
n . 1
k . 2,
3 4?
7. ?
?
8.
. -? .
9. . , (:
).
10. 75- 360 50 , 30,
5 . , .
11. .1.4 1.5 . ,
- .
?
12. , 300
, RFID.
,
? , ?
,
?
13. ,
.
14.
.
?
15. , ,
( ) . ,
, 4 ,
, 3 ,

75

15 , 6 . ,
5
, 3 .
16. 1959 IBM 7090 500000 , 32768 36- , 3 .

, . ,
. 707
1959 . 950 /,
180 4000000 .
, ,
, ?
, .
17. .
,
, RISC-,
. . ,
.
18. , ,
1973 ,
Sperry Rand Corporation, ENIAC,
. Sperry Rand ,
, .
1971 ;
30000 .
20000 . ,
,
,
. ,
?
19. , , ,
; ,
.
20. .
21. , , , -,
. , .

2.

, -. 2
, .
. , - , ,
.

.2.1 .
. , .
, , .
, , .
( -)
. .

. 2.1.
-

77

.
. -
(, ) (, ).

. , . .
,
.
, .
, ,
. ,
, 1.
,
. ,
, - .
.


-
.2.2. ( 1 32),
- () .
, .2.2
A B. ,
. , .
, .
, .
A, B . .2.2 ,
.
: -. ,
,
( , 2). . . .
,
, - 1

. . . .

. , 16- 8086 8088 16 , 32- 32 . . . .

78 2.

. 2.2. -

. . -
, .
,
. ,
.


.
:
1. .
2. , 1.
3. .
4. , , .
5. , , 2.
1

, . .
. .

, ,
. . . .

79

6. .
7. 1, .
( )
.
. 2.1 - Java.
: (PC)
(AC), . , ,
(instr), (instr_type), (data_loc) (data).
. ,
, .
2.1. ( Java)
public class Interp{
static int PC;
static int AC;
static int instr;
static int instr_type;
static int data_loc;
static int data;
static boolean run_bit

// PC
// ,
//
// ( )
// 1,
//
= true; // , ,
//
public static void interpret(int memory[], int starting_address{
// ,
//
// . ().
// - ,
// ADD .
// ,
// HALT, run_bit
// false. , ,
// run bit AC.
// .
PC=starting_address;
while (run_bit) {
instr=memory[PC]; // instr
PC=PC+1;
//
instr_type=get_instr_type(instr);
//
data_loc=find_data(instr, instr_type); // (1,
// )
if(data_loc>=0)
// data_loc=1, ,
data=memory[data_loc];
//
execute(instr_type,data);
//
}
}
private static int get_instr_type(int addr) {...}
private static int find_data(int instr, int type) {...}
private static void execute(int type, int data) {...}
}

80 2.

, , , , (). , ,
.
.
1.


. ()
, , ,
,
. ,
. ,
, .
(). , ,
, ,
.
. ,
(), ,
.
, . ,
, .
, ,
. (
, ..)
, , , .
,
. ,
.
. ,
, .
,
,
, .
50- IBM, , , , , , . , IBM
.
, ,

81

.
, ,
?
. , 1951 , , , , .
IBM System/360, ,
. , ,
.
.
:


;
, ;
( ) ,
.
70- ,
.
.
. , ,
.
, 70- ,
- .
70-
, (, Cray-1 Control Data Cyber). , ,
( ) .
VAX,
DEC; 200 . , VAX
,
.
, .
VAX, ( DEC).
Compaq DEC 1998 (,
Compaq Hewlett-Packard).
8-
, 70-

82 2.

. .
, ,
. , .
Motorola68000 ZilogZ8000,
, ,
.
, , Z80 (
ZilogZ8000) , Motorola6800 ( Motorola68000). ,
, Motorola , Zilog Exxon
.
(
). ,
Motorola68000
10 ( ), 100 ,
, 500 .
, , 2000
,
. ,
6000 .
.

RISC CISC
70- , .
,
, , .
- ,
( )
, , - ..
IBM
( John Cocke);
, - 801.
IBM , [Radin, 1982],
,
.
1980
(David Patterson) (Carlo Squin) -

83

VLSI [Patterson,
1985; Patterson and Squin, 1982].
RISC, RISCI,
RISCII. , 1981 , ( John Hennesy)
,
MIPS [Hennessy, 1984].
SPARC MIPS .

. ,
,
.
, .
, , .
, , ,
.
, ( 50).
: VAX DEC
IBM 200 300.
RISC (Reduced Instruction Set Computer
) CISC (Complex Instruction Set Computer
)
VAX, .
, ,
.
RISC (VAX, Intel, IBM).
, ,
(. .2.2), -
(,
) .
, RISC 4 5
, CISC, RISC
, RISC- 10 (
). ,
, ,
RISC.
RISC ,
, , UltraSPARC Sun,
CISC (Intel Pentium ..).
. ?
-, RISC ,
Intel. -, , Intel

84 2.

CISC. Intel, 486,


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


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

. , . . CISC
,
.
,
.
.
,
. , 500 ,
500 MIPS, .
(MIPS Millions of Instructions Per Second
.) ,
,
, .
, ( ) () . ,

85

1 , 2
, , 2
, .
,
,
.
.
.
, . ,
, . ,
.
, .
.

,
. .
, ,
,
.
(LOAD STORE).
.
, (
32). ,
, .
.
.


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

86 2.

, .

. 1959 Stretch IBM,
. , ,
, .

: , .
. ,
,
, .
. 2.3, 5 , . (1) , , . (2)
, .
(3)
. (4) , (. .2.2). , 5
.

. 2.3. ();
(). 9

. 2.3, , . 1 1 1, . 2
2 1, 1 2. 3 3 1, 2
2, 1 3. 4 4

87

1, 3 2, 2
3, 1 4. , 5 5 1 ,
.
,
. ,
. , , 5
( ). 10 ( )
.
, .
, .
, . ,
. : ( )
.
.2.3. , 2. ,
, 10. ,
100 ,
. (2)
, 100, 500
!

( )
( , ). T, n ,
nT.
,
109/T, 109/T. , T= 2, 500
. MIPS,
; , (109/T)/106= 1000/T
MIPS. , (Billion Instructions Per Second, BIPS),
, .

, . .2.4. , .2.3.
.
. , - (,
) . ,

88 2.

(, ,

),
.

. 2.4.

( , )
RISC-. 386 .
Intel ,
4861. 486 , Pentium . .2.4,
( 1 2)
. (u-)
. (v-)
, (FXCH).
. , ,
, ( u-).
. . Pentium
,
, . ,
, ,
Pentium , 486 [Pountain,
1993]. .
,
(, , , ). .
, .2.5. Intel Core, , (
4). 1987
[Agerwala and Cocke, 1987]. 40 CDC6600.
100
10 .
, .
1

,
(386). 5-
486. . . .

89

. 2.5.

.
, ( ) . ,

. ,
, , .2.5.
6600

.
, .
, 100, ,
400, , .
;
.
, 3 , 4 . 3
10 ,
10 , 4
, .
4 (,
)
, .
.2.5, 4 .

90 2.


, ,
. , ,
,
. ,
,
- - 20/,
, Intel. ,
, 1, .
,
510 . 50, 100 ,
.
.


, . .
,
,
. : SIMD- .
, ,
,
.
.

. ( )
, 1 (4047 ). , , .

. , , .
,
.
,
1

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

91

,
.
SIMD- (Single Instruction-stream Multiple Data-stream
)
, .
ILLIACIV ( ) [Bouknight et al., 1972].
, ,
88 /
. .
, ,
. ,
50 . , 1
,
.
(GPU) SIMD .
SIMD-,
, , .
. 2.6 SIMD- Nvidia Fermi.
16 (SM, Stream Multiprocessor)
SIMD, 32 SIMD.
SIMD.
SIMD ( 16,

). 16
, Fermi 32 SM
512 . , ,
1/32 .
(vector processor)
SIMD-.
.
SIMD-, , . CrayResearch,
, , Cray-1 (1974).
.
, , ,
. SIMD- ,
, ,
.
, .
,

92 2.

. 2.6. SIMD- Fermi

. ,
, . SSE (Streaming
SIMD Extension) IntelCore
,
.
ILLIACIV Intel Core.

, , , . , ,

93

.
,
- , . ,
, , (tightly coupled).
.
.
.2.7,.

. 2.7. ();
()

, ,
,
. , .
.2.7,.
, .
, . , ,
, .
(, . ).
, .
, , .
, -
.
, , , .

(256)
,
. , .

94 2.

, ,
. .
,
.
(-
, ). , - , .
, .
, 250000 ,
Blue Gene/P IBM.
, , ,
.
, .
8.


, . . ,
, .

, . 0 1.
. (, ,
, , .)
,
. ( ), - , . ,
.
, ,
.
, .
, , IBM, , .
- .
4 . 4 16
10 ( 0 9). 6 -

95

. 1944 - ( 16 ):
- 0001 1001 0100 0100;
0000011110011000.
- 16
0 9999, 10000 ,
16 65536 .
, .
, , - ,
0 9, 0 10
10. 0
9999, 10000 .
, 16 .
, .


,
. , .
. n , 0 n 1.
. k,
2k . .2.8 3 96- . ,
.

. 2.8. 96-

96 2.

, ( ),
. m ,
2m. , , .2.8,,
4 , 0 11. , .2.8, 2.8,, 3- .

. 12- 212 8
, 212 64 .
.2.1
.
2.1.

BurroughsB1700

IBMPC

DECPDP-8

12

IBM1130

16

DECPDP-15

18

XDS940

24

ElectrologicaX8

27

XDSSigma9

32

Honeywell6180

36

CDC3600

48

CDCCyber

60

. 8- ,
( ).
. 32-
4, 64- 8.
, , ,
(, ). , 32- 32-
32- , 64-
64- , ,
64- .


.
, ,

97

, . .2.9, 32- , ( SPARC IBM).


.2.9, 32-
( Intel).
, (big
endian)
(little endian) (.2.9,). , (big endian
little endian) ,
, ,
. (1981).

. 2.9. ();
()

, 32- (,6) 110 ,


29 . , 110
3 ( 7, 11 ..). , 110 0 ( 4, 8 ..). ,
, 0.
, .
, . , , , ( ) ( ).
, .
.2.10, JimSmith, 21 , 260 (1 256+ 4= 260)
, .2.10, .
.
,
. ,

98 2.

. 2.10.
(); ();

();
( )

, 0 19. , . ,
0 0 ..,
.2.10,.
, , , 21 224, . , ,
, ,
.
,
.
.2.11,. , ,
MIJTIMS, H
. ,
0 (), 1 (M)..
. , .
( , , , ..
- .)
, .


-
. , .
.
, ,
.

99

, , ,
. , m
, r ( ).
n ( n= m+ r). n ,
m r ,
.
, 10001001 10110001, , .
. ,

1 .
, ,
[Hamming, 1950]. d,
, d ,
. , 11110001 00110000
3,
.
m- , , 2m . n , -
2m 2n .
, ,
. ,
.
.

. d d+ 1, d
. ,
d 2d+ 1,
, d ,
, ,
.
,
. , 1
( ). 2,
. ,
.
. , .
, .
: 0000000000, 0000011111, 1111100000
1111111111.

100 2.

5. , . 0000000111,
, 0000011111 (
). (, 0000000000
0000000111) .
, m r
, . 2m
n ,
. n
n- . , 2m
n+ 1 , (n ).
2n, (n+ 1)2m 2n. n= m+ r,
(m+r+ 1) 2r. ,
. .2.2 .
2.2. ,


12

50

16

21

31

32

38

19

64

71

11

128

136

256

265

512

10

522

,
(1950). ,
,
4- .
.2.11 3, A, B C, .
4 1100 AB, ABC,
AC BC, ( ).
.2.11,.
,
, A, B, C, , .2.11,. 4 : 0, 0, 1 1,
2. B 1, 1, 0 0,
2. C.
, ,
0 4. , 4
3 .

101

. 2.11. 1100(); ();


AC()

, AC 0 1,
.2.11,. , A C .
, , 0 AC.
.
, .
, m , r ,
m+ r . ( ),
. , ,
; . ,
16- 5 . 1, 2,
4, 8 16 , .
21 (16 5 ).
( ).
.
1 . :
1 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21;
2 2, 3, 6, 7, 10, 11, 14, 15, 18, 19;
4 4, 5, 6, 7, 12, 13, 14, 15, 20, 21;
8 8, 9, 10, 11, 12, 13, 14, 15;
16 16, 17, 18, 19, 20, 21.
b b1, b2,...,bj, b1+ b2+
+ ...+ bj= b. , 5 1 4, 1+ 4 = 5.
6 2 4, 2+ 4= 6 ..
2.12 16-
1111000010101110. 21-
001011100000101101110. ,
, , , 5 (, - ).
001011100000101101110 001001100000101101110.
5 . .

102 2.

1 ( 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 -

);
2 ( 2, 3, 6, 7, 10, 11, 14, 15, 18, 19
);
4 ( 4, 5, 6, 7, 12, 13, 14, 15, 20, 21
);
8 ( 8, 9, 10, 11, 12, 13, 14, 15
);
16 ( 16, 17, 18, 19, 20, 21
).
1, 3, 5, 7, 9, 11, 13, 15, 17, 19 21
, .
, 1
( 1, 3, 5, 7, 9, 11, 13, 15, 17, 19 21). 4 .
, : 4, 5, 6, 7, 12, 13, 14,
15, 20, 21. , .
5, 7, 13, 15 21. 2 , 7 15 . 8
13. , 21 , 16 . 5,
. 1, 0.
.

. 2.12. 1111000010101110

, .
, ( , ).
, . ,
, . ,
1 4 , 2, 8 16 ,
5 (1+ 4).

-
, . , .
, ,
.

103

, ,
.
, ,
, .
, , .
, .
, -
, , .
, . ,
5 ,
.
50, 11 (5 + 50
).
, , , -
, . .
, ,
, . ,
, .
, .
, , , .
(
). , , . , ,
. ,

. (, , .)
, ,
,
, .
- (
cacher 1; ).
, - .
4.
- : ,
. - ,
1

cash () , ,
. ,
. . . .

104 2.

-. , , . -,
.
, ,
-. , .
, , .
( ) . ,
,
. ,
, ,
- .
, , .
-. ,
, -, .
, - .2.13.
k ,
k 1
-. k, .

. 2.13. -
.
-

. c -, m h
- (hit ratio),
.
h= (k 1)/k. - (miss
ratio), 1 h.
, :
= c + (1 h)m.
h 1, -,
c. , h 0,
, c+ m:
c - ( ),

105

m .
-, -
.
-, .
-
. -
(cache lines). - -
, . ,
64 , 260 ( 256 319) ,
.
, , k , k .
, ,
, , . , ( 32-)
64128 .
- .
. -. , , . . - 16
1024 16, 2048 8 ..
-, , ,
. - 4.
-. - (unified
cache), , .
.
- (split cache),
-, . (Harvard architecture),

MarcIII,
(Howard Aiken) .
, ,
, ()
. - , . ,
,
.
, -. -
, - ,
, - .

106 2.


90-
, . 1 1
. ,
.
. (
8 16)
. SIMM (Single Inline Memory Module
) DIMM (Dual Inline Memory
Module ).
SIMM 72 ;
32 . DIMM,
, (
) 120 ; ,
240, 64 .
DDR3 DIMM . DIMM .2.14.

. 2.14. 4- DIMM 256-


. .

DIMM 8 256 .
, 2 .
; ,
2 8
( ).
DIMM
, SO-DIMM (Small Outline DIMM). SIMM
DIMM , ,

10 ,
.


, .
, ,
.
, . , -

107

,

( $299,95).
1 1 . ,
50 1014 100 .
(50000)
.
( , ).



(.2.15). . .
-, 32 . ,
1 .
.

.

. 2.15.

. , .
, - , . : 10
.
(

).

108 2.

-, . 128, - , ,
.
,
.
, ,
. 1, ,
.
, - .
, .
, ;
.


2,
. 50,
3 9, 3,
. , ,
, .
,
. .
, ( )
, .
, , . .2.16.
,
.
. 512 . (preamble),
. (ErrorCorrecting Code, ECC),
, ,
.
. ( ),
,
, ECC- .
15% .
1

, , .
. 10 . . . .

IBM . . . .

109

. 2.16. ( )

,
, .
. ,
, .
. 50000
, 200
(1= 1/1000000). , , ,
.
. , , ,
.
.
25 .
. ,
, .
,
, . ; ,
100/. ,
.
,
. .
, IBM, 30

110 2.

30 . ,
30301. ,
- , . , 30 .
, , .2.17.
. , . , , .
1 12 ,
12 24 .
1 , .

. 2.17.

.
, .
.
5 10, 1. ,
( ),
.
5400, 7200 10800 . ,
( ) 3 6.
.
150 (512) 3,5 . ,
. ,
.
, - , ECC-,
, - ,
1

30- . . .

111

, ,

. , .
.
(, )

.
,
c= 2r ,
, .
, ,
.
,
.
, , 18 ,
20, , .
.
( 10 30).
.
, ,
. .
.2.18.

. 2.18. .

, . .

112 2.

,
READ, WRITE FORMAT ( ),
, , , , , .
, .
,
, .
, ,
.

IDE-

IBMPCXT. Seagate 10,
Xebec . 4 , 306
17 . .
.

BIOS (Basic Input Output System -), . BIOS
, .
,
80- IDE (Integrated Drive Electronics ) 1. BIOS ,
.
, , 0, 1. , -
BIOS, 8088.
4 , 6 10 ,
16 , 63 1024 ,
1032192 . 504,
(
, 1000?).
504, (4 , 32 , 2000 ).
- , BIOS
( ). ,
BIOS,
. , ,
.
1

, , . . .
. .

113

IDE- EIDE (Extended


IDE ), LBA (Logical Block Addressing
). 0 228 1. LBA-
, ,
504. , ,
22829 (128). 1994 , EIDE,
, . , , ,
, .
EIDE- . ,
4 ( , ),
(16,67 4/), CD-ROM DVD.
EIDE
, ATA-3 (AT Attachment),
IBM PC/AT ( AT,
Advanced Technology ,
16-
8.) , ATAPI-4
(ATA Packet Interface ATA),
33/. ATAPI-5 66/.
128 , 28- , , ATAPI-6
LBA- 48 . 24829
(128). 50%, 48- LBA- 2035 .
, , , , 11-
. , LBA 64. ATAPI-6
100/. , .
ATAPI-7.
(, , ) ATA (Serial ATA, SATA),
7- 150/
( 1,5/). 80-
. , SATA 0,5 ( 5 ATAPI-6),
. ,
SATA .
, , ,
[Gurumurthi et al., 2003].

114 2.

SCSI-
SCSI- ,
IDE-, . 1979
(Hovard Shugart) SASI (Shugart
Associates System Interface). 1986 ANCI
SCSI (Small Computer System Interface
). SCSI . ,
, Fast SCSI (10), Ultra SCSI
(20), Ultra2 SCSI (40), Ultra3 SCSI (80) Ultra4 SCSI (160).
16- . ,
16- .
.2.3.
2.3. SCSI

,
/

SCSI-1

Fast SCSI

10

10

Wide Fast SCSI

16

10

20

Ultra SCSI

20

20

Wide Ultra SCSI

16

20

40

Ultra2 SCSI

40

40

Wide Ultra2 SCSI

16

40

80

Wide Ultra3 SCSI

16

80

160

Wide Ultra4 SCSI

16

160

320

Wide Ultra5 SCSI

16

320

640

SCSI- , ,
RAID (. ).
SCSI . ,
SCSI- .
SCSI-, CD-ROM,
, .
0 7 ( 15
16- ). : ,
.
. . , .
,
.

115

8- SCSI- 50 ,
25 () 25 ,
, . 25 8 , 1 ,
9 , .
16- 32-
. ,
( ..).
SCSI- SCSI-
. , , , ,
, . 16, , .
,
, , .
, SCSI
, ,
. IDE EIDE
.

RAID-
,
1,5 . . 70- -
50 100 .
10. (,
) 5
10 , . , .
, ,
. ,
, - .
1988 6 , , [Patterson et al., 1988].
, - RAID.
RAID Redundant Array of Inexpensive Disks
( ), I
Inexpensive () Independent ()
(, ?)
RAID- SLED (Single Large Expensive Disk
).

116 2.

RAID . (
) , RAID-, RAID-, . ,
RAID SLED, RAID- . SCSI-
( 7 8- SCSI 15 16-),
RAID- SCSI-,
RAID-, SCSI-,
. , RAID-, ,
.
RAID- . -, ,
RAID- .
-, RAID-
, .
, ,
RAID- 0, RAID- 1 ..,
RAID- 5. , ,
. ,
. 6
.
RAID- 0 .2.19,. , (strips) k ,
0 k 1 0, k 2k 1 1 ..
k= 1 , k= 2
.. RAID- 0 ,
.2.19,. (striping)
. RAID- . ,
,

, RAID- 4
, , .
, - .
RAID- 0
, . ,
RAID-, ,
,
. ,
, , .
, .
RAID- 0 , (

117

. 2.19. RAID- .

118 2.

). , , ,
, , . ,
, SLED-. , RAID-,
,
20000 . RAID- 5000 , .
SLED- 20000 ,
, 4 . , RAID-.
RAID- 1.
.2.19, , RAID- 0, RAID. , ,
4 4 . .
,
, RAID- 0. ,
, , ( ). :
, .
.
0 1, , RAID 2 , . ,
4 ,
,
7 , 1, 2 4 . , 7 ,
.2.19,, . 7
7 , 1 .
CM-2 Thinking Machines. 32- 6 ( ). 38- , , 39 .
,
32 . ,
39- , .
,
. , , ( 32
6 19%).
,
.
RAID- 3 RAID-
2. .2.19,. . RAID-

119

2, ,
.
,
, . , . , ,
. , ,
0. , ,
, 1, , , .
RAID- 2 3
, - ,
.
RAID- 4 5, RAID- , , , ,
. RAID- 4 (. .2.19,) ,
RAID- 0 , RAID- 4
, . ,
k .
,
k . ,
.
,
.
, ,
. .

.
.
RAID- 5,
, .2.19,.

, .


-, SSD- (Solid State Disk),

. SSD , .
,
. .

,

120 2.

,
.
, (Fujio Masuoka)
Toshiba
. 1980-
-.

. 2.20. -

- ,
-. -
. 2.20. ,
. , .
.
-
( 12 ), .
, . , ; ,
, ,
, 0 1 . ,
- .

121

SSD- ,

.
100 /, SSD - .
, (
). SSD-
.
, SSD-
. , . SSD ,
. , SSD
, .

. -
100000 .

. SSD
,
. ,
, , . -
, -
. -
, ,
.
SSD- ,
-. ,
. ,
.

CD-ROM
, ,
. , ,
, .
Philips
. 30 , LaserVision, .
1980 Philips Sony -
(Compact Disc, CD), , -

122 2.

. -
(IS10149),
( ). (International
Organization for Standardization, ISO),
, ANSI, DIN ..
IS (International Standard ).
, -
. 120 1,2 , 15. -
, .
, .
- , 0,8
-. -
, .
(), , , -
, .
, , , .
.
(pits), (lands).

0,78
. ,
,
.
, , ,
, .
, , , .
. , , , ,
- -,
.
. ,
32 . 22188 ( 600
1). , 5,6.
.2.21.
, . , -

.
, , 120/,
530 .

123

. 2.21. -

, 200 , . -, , ,
,
. , - (530 )
,
3600 7200 .
1984 Philips Sony -
. , , CD-ROM (Compact
Disc-Read Only Memory -). -,
- , , . ,
,
- .
.
, , , , . -
14- . ,
14 , 8-
, .
. 14- 8- .
42
588 . 192 (24 ).
396 . - .

124 2.

- 98 ,
.2.22. 16, 12 00FFFFFFFFFFFFFFFFFFFF00 ( ),
. 3 . ,
-, , , ,
. , , ;
, , ,
. .

. 2.22. -

. . 2.22
1, 16 ,
2048, 228 ( ).
2 2336 . ,
( ,
), . ,
: ,
. , ,
.
98 588 (7203 ), 2048 . , 28%.
- 75 , 153600/
1 175200/ 2.
.., .
- 74 ,
681984000 , 650, 1= 220 (1048576),
1000000 .
, ,
. CD-ROM Philips

125

Sony ,
.
, .
640 700.
, ,
703,12 (360000 2048- 333000)
.
, - , 32x (4915200/), SCSI-2 (10/), SCSI ( , IDE).
, -
, 1.
1986 Philips ,
- ,
, .
,
-, .
- ,
-.
,

, High Sierra (
, ). (IS9660). . 1 8 ,
3 (
MS-DOS). ,
. 8 . .
, ,
,
. -, IS9660
1, MS-DOS, Apple, Unix
. - .
2 IS9660 32 ,
3 . Rock
Ridge ( )
( UNIX), UID
GID, , -, 1, .
1

- . .
. .

126 2.

CD-R
, - ( ,
), . ,
, .
90- -
,
.
, ,
-, .
,
. ,
-
, .
CD-R (CD-Recordable -).
CD-R 120- . CD-ROM.
CD-R CD-ROM ,
0,6, .
0,3
22,05, . CD-R
, , ,
.
-, CD-R .
(.2.23).

. 2.23. CD-R ( ).
- , ,

127

: -
. , . .
,
.
816. , , .
. (
0,5) ,
, ,
. -
CD-ROM.
-
. CD-R , 1989 . CD-R, ,
CD-ROMXA, CD-R
( , , ..).
, , .
CD-R -
Kodak.
- ,
- , (
) . ,
, - . , CD-R
.
.
-
VTOC (Volume Table of Contents ), -
. VTOC.
, VTOC, . CD-R
,
VTOC,
. VTOC ,
, , .
. -.
-,
VTOC .
CD-R
-,
. ,

128 2.

- , .
. .

, -, - - ( ).
ECC-.
, -,
, ,
. ,
.

CD-RW
, (, , ,
), - . CD-RW (CD-ReWritable -), ,
CD-R, ( )
CD-RW , ,
. : ,
.
-
. ,
, .
, . (
), .
CD-RW CD-R,
CD-RW CD-R. , ,
, , CD-R .

DVD-
- (CD CD-ROM) 1980 .
,
. ,
, , ,
, . ,
.
,
, DVD-

129

. DVD Digital Video Disk


( ), Digital Versatile
Disk ( ). DVD- . -, 120 ,
, . :
(0,4 0,8,
-);
(0,74 1,6 );
( 0,65 0,78 ).
( 4,7). DVD1x
1,4/ ( -
150/). , - DVD -,
.
4,7? .
MPEG-2 ( IS13346), DVD- 4,7
133 (720 480) 8
32 . 92% , ,
133 . (, ) ,
.
4 DVD-:
1. (4,7).
2. (8,5).
3. (9,4).
4. (17).
? , . Philips Sony ,
, Toshiba Time Warner . Philips Sony ,
, Time Warner ,
, . , , .
. , ,
, .
, , , .
0,6 . ,
0,6 (-

130 2.

133 , ,
, ).
.2.24.

. 2.24. DVD-

DVD- , 10
( ), (
). ,
,
DVD .
DVD:
( NC171 ,
), , . DVD- ,
,
3:2,
( 4:3).
, , , ,
, ,
. ,

. ,

(
). , ,
3,5 , 9.

Blu-Ray
, .
DVD,
. DVD Blu-Ray, 1

NC17 , . . .

- 131

. , , ;
.
Blu-Ray 25 ; 50. 4,5/,
, - (, ATAPI-6
100/, Ultra4 SCSI 320/c).
, Blu-Ray CD-, DVD-,
, , .

-
,
: , ( ) - (, ).
.
- , .


, .2.25.
,
(
). , DIMM . ( )
-.

. 2.25.


.2.26. -

132 2.

, -;
. - : ,
-, .
,
. , (, ),
. ()
,
,
,
..
, .

. 2.26.

- . , ,
, .
.
, .
.

, , (Direct Memory Access, DMA). , ,
.
,
, ,
, - .
,
, .

- 133

-,
. , - ?
, , ,
. -,
,
. -
,
. -
-, ,
. , , (cycle stealing).
,
. ,
- , : . ,
,
.
-
, .
,
,
, .
, ,
- IBMPC,
,
. IBM ,
IBMPC PS/2. PS/2
,
PC,
ISA (Industry Standard Architecture ). -
, IBM :
, IBM.
ISA. ISA
,
, . ,
ISA Instruction Set Architecture ( ), .

PCI PCIe
, , , - .

134 2.


, ISA, EISA
(Extended ISA ),
ISA -.
,
PCI (Peripheral Component Interconnect
), Intel,
,
( )
.
PCI.
.2.27.

. , ,

PCI.
PCI. 2 3
PCI, PCI
).

. 2.27. PCI.
SCSI PCI-

, , .
PCI, PCI Express ( PCIe).
, , PCIe, ,
PCI.
PCI ISA
, PCIe PCI.
, , , . ,
. PCIe . 2.28.
PCIe . -,
,
8, 16, 32 64 . , 64--

- 135

. 2.28. PCIe PCI

,
64- ,
, . , .
PCI 66 .
64 528 /.
8 /, ,
PCIe 1/. ,
. 32 ,
(lanes) . , .
16- , PCIe 3.0 16 / 30 ,
PCI.
, ,
.
-, .
,
. , , (
PCI PCI). ,
, ,
Ethernet ( ),
, .

136 2.

. .
: .

. ,
, ,
. , .

. IBMPC
,
.
.

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

(
).
, ( 1 102).
, . ,
SHIFT, ,
SHIFT, , , . SHIFT, CTRL ALT
(
CTRL+ALT+DEL,
IBMPC ).


, .
Apple iPhone 2007 , .
Royal Radar Establishment
, , 1965 . / ,
iPhone, ,
1982 .
.

- 137

.
() .
. ,
. , .
(, )
, .
,
, .
, ; (x, y)
. ,
,
.

.
. . ,
( ) .
, .
, , .
, .
, . , (3, 3) (8, 8).
x = 3 x = 8, y = 3 y = 8.
: (3,8) (8,3) (3, 3),
(8, 3), (8, 8) (3, 8). ,
, . .
(,
/)
.
( !)
- .
, . ,
, -. , .
, : ,
.
, . -

138 2.

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

.

.
( 50 )
, . .

(!).
, .
, ,
.
,
,
. ,
(x, y).
(, , / ) .
10 , ,
, - .

-
(), .
, .
(flat-panel) -, , .

-.
. ,
,
.

- 139

, , ,
. (Rheinitzer)
1888 ( , ..) 1960 . ,
.
, , , . , ,
, .
.
, .
.
. , , ,
.
, .
,
. .2.29,.

. 2.29. ();
, ()


, (Twisted Nematic, TN).

140 2.

,
, .2.29,.
. () ,
90.
. .
.
. ,
, , ,
.
, , .
.
,
, .
.
. , 640 480
640 ,
480 .
, ,
, ,
. .., ,
- .
60 , ( ,
- ).
.
, , ,
. . ,
. (Thin Film Transistor, TFT),
, , TFT-.
TFT
.
, . , ,
, , .
, ,
, .
.

- 141

. OLED (Organic Light Emitting


Diode).
, . .
.
( ).

- TFT- 60
100 ; ,
. ,
. , ,
1920 1080 (), , 1920 1080 , .
.
3-
RGB, (Red), (Green) (Blue) ( 10 ). ,
.
1920 1080 ,
3 ,
6,2;
. 8- . ( ),
256 RGB (24-). ,
, 2/3 ,
. ,
256. , , ,
.
216 , 1/3.
( )
. ,
1920 1080
6,2. ,
25 , 155/.
PCI (132/), PCIe
.

142 2.

, , . ENIAC , .
50- . , , (
) , .

, . ,


( Macintosh Windows), .
,
. ,
,
. , , . , .
( ),
,
.
: , .
,
. , , ,
. ().
, ,
, ,
.
, ,
(.2.30).
. , .
.

, , . , ,
.
.
, ,
, ( , 1818 ) 1000 .
, . .
, .
. , , , ,

- 143

. 2.30.

. .
, . , ,
, .
.
-,
: 3 ,
(, 0,01). .
, , x .
y.
. 2 .

, ,
. ,
. , ,
.


.
.
: Nintendo Wiimote
Microsoft Kinect.

144 2.

Wiimote
Wiimote, 2006 Nintendo
Wii, .
Wiimote
Bluetooth. Wiimote
, .
. 2.31 , Wiimote . Wiimote
3- .
,
x, y z ( ). ,
.
-

. 2.31. Wiimote

- 145

. Wii Wiimote.
Wiimote, ,
.
, , Wiimote
.
Wiimote
, ,
.
,
Wiimote ( )
.
Wiimote .
(Sensor Bar) , . Wiimote ,
.
, Wiimote
Wiimote .
Wiimite , Wiimote
.
, .
Kinect
Microsoft Kinect
.

, .
,
. ,
, ,
.
Kinect
. ,
Kinect.
, . , , Kinect
.
, . . ,
( ), .
, .

146 2.


, ,
.
( -) .

,
( Johann Gutenberg),
XV , . , ,
. ,
. ,
, .
.2.32. (
).
1000 . ( ),
- ,
.
, .
, , .

. 2.32.

,
.
( ). , .

- 147

, . ,
.
. .
,
, , ,
. , ,
(print engines). .


, ,
. , ( ,
).
PCL HP PostScript Adobe , , .
600dpi - , ,
. ,
600dpi,
(600dpi).
600 600 , 0 ( ) 255 ( ).
600dpi,
( ),
( ). .
( ). ,
6 6 . 0 36
.
, .
0 255 . 37 . 0 6 0, 7 13 1
.. ( 36 , , 256 37
). 0, ,
.2.33,. 1 .
2 , .2.33,.
.2.33,. -

. 2.33. : 06(); 1420(); 2834();


5662(); 105111(); 161167()

148 2.

600dpi,

100 . lpi (lines per inch ).

, ,
(
). : .
, , - .

: , .
.
, .
: (
), ( ) ( ). ,
.
, .
: (Cyan),
(Magenta), (Yellow) (blacK).
CMYK ( black ,
blue RGB). , ,
, .
, , . ,
.
256 ,
16777216 . , .
, ,
.
, ,
,
. :
;
;
- 256 ,
;
; ;
RGB CMYK
.

- 149

( ), , .

.
.
, . .
,
100 .
: (
Epson) ( Canon, HP Lexmark).
. , . ,
, .
()
.
, , .
, , . ,

.
/.
, , ,
.
1200dpi
(dots per inch ) 4800dpi. ,
, .
,
810.

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

150 2.


.
, , .
.
4 ,
, 10
(, , ).
, . -
( ) (
).

, .
, .
CMYK. - ,
.
. 1,

. , ,
( ). ,
, CMYK ,
.
. 256
. ,
. ,
,
.
.
.
. .
,
, , . ,
, .
,
, . .
1


; ..
. .

- 151


,
.
.
.


. ,
,
. .
( )
, 0
, 1 3 5 (.2.34,).
,
, ,
. 1000 2000,
,
,
.

. 2.34. 01001011000100
: (); ( );
(); ( )

, . , ,

152 2.

, .2.34.
.
2 , 0 1 (.2.34,).
, 1
, 0 .
, 1 0 (.2.34,).
: 0, 1. .

, 180, 0
1 1 0 (.2.34,).

45, 135, 225 315, 2
. . ,
45 00, 135 01 .. .
( ) .
. ,
. :
, , . ,
, .
8- ,
8 , 8
. , , ,
( , ).
,
( )
, ,
.
8- , ,
10 .

. , 9600 ,
104 . , , .
. ,
, .
56 /,
.
, ,
. ,
,
. , -

- 153

(
), . ,
, .

56/,
.
10/.
,
50/.
,
,
- ,
.
. , ,
,
, , , , . ,
. , 10- Ethernet,
, , .

xDSL (Digital Subscriber Line ) x.
ADSL (Asymmetric DSL ).
ADSL ,
, . , , , . ADSL
[Summers, 1999, Vetter et al., 2000].
? ,
,
. .
( ), (),
.
, (
) 1,1.
ADSL
.2.35. 1,1 256 , 4312,5 .
0 . 15 ,
.
250

154 2.

.
. , ADSL- 250 .

. 2.35. ADSL

, , ,

. , , .
,
8090% ( 32 , ),
,
. ADSL .

, .
15/ . , , 224
, 4000 15/,
13,44/. / ,

48/ .
ADSL .2.36.
, (Network Interface Device, NID).
. NID ( ) ()
, 04000,
. ADSL-,
. ADSL-
, 250
. ADSL- , .

Ethernet Ethernet- ADSL-.
(Ethernet

- 155

.) ADSL- USB.
ADSL-.

. 2.36. ADSL


, . 26
(Digital Subscriber
Line Access Multiplexer, DSLAM).
,
.

.
ADSL, .
, ,
( ),
. .
. ,
, .
. ,

156 2.

750. ,
ADSL
, .
,
1,1, ,
200, ,
( , 400 ).
,
, ADSL
. :
, ( , , ,
), (
).
,
. , , .
54550 (
, , 88108, FM). 6 ( ,
). 65, 68 (
PAL/SECAM);
.

.
,
:
1. ?
2. ?
. 550, 750 . ( ) 542
( ), (
) (.2.37).
: ,
542, 54 .
, ,
. ,
,
, .

- 157

. 2.37.

, DSL ,
.
. , , , .
ADSL,
Ethernet. ,
, ,
, , .
.
,
. ,
,
ADSL-.

,
.
, , .
,
.
, .

. ,
, .

.
(ranging). , . ,
,
- (minislots).

158 2.

-.
-, ,
, . , ,
, -.
- .
- 8 .
-,
. ,
. , -.
,
,
-. , -, .
.
- , .
,
.
-. -,
. , , -, ,
, ,
. -, , , 204 .
, 184 ,
.
MPEG-2

. .2.38.
, . ,

. ,

, (Internet
Service Provider, ISP), .
, , (IP-).
.
.
,
.
,
, ,

- 159

. 2.38. .
QAM-64 ( )
6 /, . QPSK
( ) ,
2 /

. , , . ,

. ,
[Kaufman et al., 2002].
,
. .
. [Adams and Dulchinos, 2001;
Donaldson and Jones, 2001; Dutta-Roy, 2001].



.
. ,
. ,
, . .


(Charge-Coupled Devices,
CCD). ( ,
CCD .)
CCD
. , .

160 2.

- 0 255 ( ) 0 4095 (
). .2.39.

. 2.39.

CCD, ,
.
CCD .
(Bayer filter), CCD
, , . : -,
, -, ,
. ,
6 , . 6
CCD, 1,5 . 28282121 (
) 30002000 ( ) . .

: ,
.

.
, CCD, ,

- 161

CCD.

.
CCD . , ,

; , ,
1 . ,
.

,
( , , ,
, ).
CCD. (
)

.
,
. , , JPEG
( Joint Photographic Experts Group
). .
, .
, -
.
.
,
, USB FireWire.
. (, Adobe Photoshop)
, , ,
, , ,
.
, , , - DVD
.
,
, ,
(Single-Lens Reflex, SLR)
.
,
, , , ,
, .

162 2.


, . , 26 26 1, 0 9,
, , , ,
..
, , , a= 1, b= 2,..., z= 26, += 27, = 28.
. ,

, .
. .
ASCII
ASCII (American
Standard Code for Information Interchange
). ASCII- 7 , ,
128 . 0 1F (
) , (.2.4). 0 1F ( )
, . 128 255
ASCII; IBM PC ( . .),
.
2.4. ASCII-

NUL

BS

BackSpace ( )

SOH

Start Of Heading (
)

HT

Horizontal Tab ( )

STX

Start Of Text (
)

LF

Line Feed ( )

ETX

End of Text ( )

VT

Vertical Tab (
)

EOT

End Of Transmission ( )

FF

From Feed ( )

ENQ

ENQuiry ()

CR

Carriage Return (
)

ACK

ACKnoligement ( )

SO

Shift Out (
)

BEL

Bell ( )

SI

Shift In (
)

. . .

- 163

10

DLE

Data Link Escape (


)

18

CAN

CANcel ()

11

DC1

Device Control1 ( 1)

19

EM

End of Medium (
)

12

DC2

Device Control2 ( 2)

1A

SUB

SUBstitute (
)

13

DC3

Device Control3 ( 3)

1B

ESC

ESCape ()

14

DC4

Device Control4 ( 4)

1C

FS

File Separator (
)

15

NAK

Negative AcKnolidgement 1D
( )

GS

Group Separator ( )

16

SYN

SYNcronous idle ()

1E

RS

Record Separator ( )

17

ETB

End of Transmission Block


( )

1F

US

Unit Separator ( )

20

(- 30
)

40

50

60

70

21

31

41

51

61

71

22

32

42

52

62

72

23

33

43

53

63

73

24

34

44

54

64

74

25

35

45

55

65

75

26

&

36

46

56

66

76

27

37

47

57

67

77

28

38

48

58

68

78

29

39

49

59

69

79

2A

3A

4A

5A

6A

7A

2B

3B

4B

5B

6B

7B

2C

3C

<

4C

5C

6C

7C

2D

3D

4D

5D

6D

7D

2E

3E

>

4E

5E

6E

7E

2F

3F

4F

5F

6F

7F

DEL

164 2.

ASCII- .
, SOH (Start
of Header), , STX (Start of Text),
, ETX (End of Text) , , EOT (End of Transmission). ,
, -,
ASCII- .
ASCII- ,
, .
Unicode
,
ASCII, ,
. , .. ,
ASCII-.
(, ),
(, ). ,

, ,
- .
ASCII IS646,
ASCII- 128 , 8- Latin-1.
. IS8859, .
256 ,
IS8859-1 Latin-1. IS8859-2
(, , ),
IS8859-3 , ,
.. , ,
, .
.
,
Unicode, (IS10646). Unicode
(, Java),
(, WindowsNT) . ,
.
Unicode 16- , .
- .
16 , .
Unicode- 16 , 65536 . 200000
, ,

- 165

.
, , Unicode,
.
Unicode, Latin-1 0 255,
ASCII- Unicode-. ,
.
, 16 .
Unicode . ( ): (336),
(144), (256), (96), (112), (128),
(128), (128), (128) (128). ,
, . ,
. ,
: . ,
, : , .
, (112),
(112), (48),
(48), (256), (96),
(192).
, .
1024 (, ),
, (20992),
(11156).
, 6400 .
Unicode , , .
, , , cat dog ,
,
, , .
, .
50 , , ,
, , . , .
, 20000
( ).
, , .
. Unicode .

166 2.

Unicode ,
,
- (
blue blew,
).
, ( , 16-
?). , 50000 ( ,
), 20992
- . , , ,
, .
, , 65536 , 1996
16- , 1114112.
UTF-8
Unicode ASCII, . , 16
ASCII-, .
UTF-8 UCS Transformation Format.
UCS Universal Character Set
Unicode. UTF-8 1 4 ,
. World Wide Web.
UTF-8 , 0 127 ASCII-. , ( Unicode). ,
ASCII, 1;
, .
, . 2.5. d .
2.5. UTF-8

0ddddddd

11

110ddddd

10dddddd

16

1110dddd

10dddddd

10dddddd

21

11110ddd

10dddddd

10dddddd

10dddddd

26

111110dd

10dddddd

10dddddd

10dddddd

10dddddd

31

1111110x

10dddddd

10dddddd

10dddddd

10dddddd

10dddddd

UTF-8 Unicode .
,

167

ASCII, 8 . -,
UTF-8
. -, UTF-8
10, ; . ,
() .
UTF-8 17 Unicode,
1114112 .
-
( ), UTF-8
.


: ,
-. ,
, .

. , -,
.

, .
,
.
.
,
;
, ;
, ,
.
.
, .
( ) , . -
. .
, , (
)
.
, , .
: , , IDE-,
SCSI- RAID-.
CD-ROM, CD-R, DVD Blu-ray.

168 2.

- . . , ,
. - ASCII,
Unicode , UTF-8
,
Web.


1. , .2.2.
, 5 ,
10, 5 .

?
2. 2 ,
? , ?
3. 1 10 , 2 5 . , 2
? .
4. ,
.
, .
, , ,
( ).
5. ,
. .
,
. , .
, . ,

, ?
6.
.
? (,
.)
7. (, ,
?),
: , .
, , Socimagnetic
Computer .

169

; ,
(, ) 8 ,
0, 1 2. 6-
? ,
n .
8. , . 106
(). , 64 .
100 .
9. , . 22 .
, 22,
44. 16-

( 65535 ).
10.
.
: A, C, G T. 3109 30000 .
( )?
( )?
11. 1073741824 . - , , 1000000000?
12. 7-
0 9.
13. 0 9 , 2.
14. , .
, (
) 2n 1?
n 3 10.
15. ASCII- 8 .

.
ASCII-
: Earth. .
16. ASCII : 0D3 DD3
0F2 5C1 1C5 CE3. .
17. , .2.16, 1024
7200 .
?

170 2.

18. 5 .
32- .
Ultra4-SCSI,
160/.
32- 25.
?
19. , , .
0
- .
.
. , ?
.
20. 10000 ,
4 2048 ?
0, 0, 1, 0 .. 10 ,
1 ,
20 .
.
21. RAID- 3 , . RAID-
2? ,
.
22. ( ) CD-ROM 2, 80 ( )?
1?
23. CD-R,
. ( ) , - 1 10x?
24. 133 DVD , . ,
. ,
3,5, 720480 24- 30 .
25. Blu-ray 25
4,5/.
?
26. , 224 .
. ?
27. ,

10, .
. 108

171

.
(, , , ),
32 .
10 .
(/) .
28. 1920 1080 .
75 . ?
29. 50
80 .
2 2, 25% ,
. 25 . 25 8 2. ?
30. , , , 64 2.
n ,
64 .
?
31. , ADSL
2/,
12.
QAM-64. n , .
( f ) .
ADSL?
32. 3000 2000
RGB 3 .
, JPEG 5 - .
?
33.
24 , 6. -
8 5?
, 1 230 .
34. , ( )
. ,
ASCII ? -
10000 ?
DVD- ?
35. hamming(ascii, encoded), 7 ascii 11- encoded.
36. distance(code, n, k),
code n k
.

3.

.1.2
, .
,
.
, ,
.
, ,
. ,
( ),
. ,
,
. ,
, , .
,
.
.



.
, , , .

, .
0 1 (, 0),
2 5 (, 1).
. ,
, . ,
.
, ,
0. ,
. ,
.

173

.3.1, , .
: , . Vin ,
.
Vout, VCC (,
), +5. Vin
, , Vout ( 0).

. 3.1. (); ( ); ()

, Vin , Vout , .
, , , 0
1 1 0. ( ) , ,
.
.
.3.1, . V1, V2 ,
Vout. ,
, .
, Vout , V1, V2 .
.3.1, .
, . ,
.
. , - - . . . ,
(VCC) 1, ()
0, -

174 3.

. ,
, .3.2,.
. A B , X
.
.

. 3.2. .

.3.1, ,
, -, , 1 , 1.
;
.3.2,. -
. ,
1 , ,
0, . ,
,
.3.2,. , -
- . .
, .3.2, . ,
- - ,
.
- -, . (
, - - ,
.) , .
-, ,
, .
,
,
.
(, , ).
(- ),
, (-

175

), ,
.
.
- , ,
,
. : p- , n- . - ,
, .

, +1,5. , .
, , , .


, , ,
: 0 1. .
(18151864). ,
, ,
, .
( , ),
. ,
. f, , f()= 1,
= 0 f()= 0, = 1. (. .3.2,).
n 2n ,
2n .
.
. .3.2 .
, 00, 01, 10, 11,
2n- , , .
, - 1110, - 1000, 0001 0111.
, 16 ,
16 4- . ,
, ,

,
.
.3.3,
: = f(A,B,C ). , -

176 3.

0, 0, 1, 1.
,
.
.

. 3.3. ();
()

, ,
,
. .3.3, 4 , .
, , . , .
, ()
( ) (+) . , ABC 1,
A= 1, B= 0 = 1. , AB+ BC 1,
(= 1 B= 0) (B= 1 C= 0). .3.3, 1 : ABC, ABC, ABC ABC. -

177

( 1), .
,
= ABC + ABC + ABC + ABC.
. , n
2n ,
n . ,
,
.
. ,
A, B C, , . , :
F = ABC + ABC.
( ) ,
, , , .


, 2n
. .3.3, A, B ,
, , .
, 1, 2 3.
, 6 , 3
, 3 .
. , 5, 6 7 . , ,
- .
,
( 1). . , (
) .
.3.3,. : ,
, . ,
3 6 , .
, .
. 3.3 , :
1. .
2. ,
.
3. 1.

178 3.

4. .
5. .
,
, .
. , , ,
- -.
,
- . .3.4 ,
- -. ( , .)

. 3.4. (), () ()
- -

-
-, , , . . ,
A+ B+ C+ D (A+ B)+ (C+ D), . , ,
.3.4.

, ,
. - - ,

179

.
, .


,
, , ..
, ,
,
( ,
). .
AB+ AC (.3.5,).
, .
, AB+ AC A(B+ C). .3.5,
A(B+ C ). ,
.
.3.5 , A(B+C )
AB+ AC. , .3.5, ,
.3.5,, .

. 3.5. : AB+ AC(); A(B+ C)()

180 3.

,
, ,
.
.
, () , .3.1. ,
. ,
0 1. ,
. , ,
.
, ABC= A+ B+ C.
3.1.

1A = A

0+A=A

0A = 0

1+A=1

AA = A

A+A=A

AA = 0

A+A=1

AB = BA

A+B=B+A

(AB)C = A(BC )

(A + B) + C = A + (B + C)

A + BC = (A + B)(A + C)

A(B + C) = AB + AC

A(A + B) = A

A + AB = A

AB = A + B

A + B = AB

. .3.7,
,
. ,
-. .3.6,,
, , - .

(.3.7,, ).
(, n-
- ).
, .3.6,
,
- -. (.3.7,).
, , .3.7,.
-, ,
, ,

181

. 3.6. :
-(); -(); (); ( )

.3.7,. , .3.6,, .3.7,.


A B A B, -
- . , () , ,
.

. 3.7. ().
( )

,
. .3.8,
F
. , .

182 3.

, 0 , 3,3 5 , , .3.8,,
. .
, , 0 , 3,3
5 , ,
.3.8,, .

. 3.8. ();
( ); ()

, , .
, 1,
, 0, .


,
.
, - . ,
.
,
.


, ,
(), .
,
, .
2 2,
18 18. ,
.
- , .

183

. 3.9
. (, ), (Dual Inline Package, DIP)
, .
DIP 14, 16, 18, 20, 22, 24, 28, 40, 64 68 .
,
.
PGA (Pin Grid Array) LGA (Land Grid Array).
PGA
. PGA
; , PGA ,
PGA, . LGA
, LGA ,
LGA
.

. 3.9. : DIP (), PGA ( ) LGA ()

, . DIP
,
DIP. PGA , PGA . LGA
,
LGA. LGA,
.
, ,
.
,
. c.
1
1.
-, ,
1

. PentiumIV 42 ,
, , . . . .

184 3.

, 500 -. ,
1500000002 .
1 , LGA
38, , , . ,
,
. ,
,
.



,
. .
. , ,
, , ,
. ,
(, .3.3,), .
.


2n , n ,
. . .3.10
. A,
B C 3- , , , , .
, ,
0, 0
1 .
.
.3.10.
,
(. .3.3,), .3.11,. A, B
.
VCC ( 1), ( 0).
: Di , i . .3.3, 0, 1, 2 4 0,
;
1, .
.3.11,
.
,
.

185

. 3.10.

. 3.11. (); ,
( )

186 3.

. 8 ,
, 000 111 ( ), 8 .
, 7- 8- ,
.
,
2n
n .
k, k.

,
n- , (
1) 2n . .
n= 3 .3.12.

. 3.12. , 3 8

, , ,
, 256. 0
0 256, 1 256 5122 ..

. .3.12 A, B .

187

(D0,..., D7)
1; 0.
.
1, .
, .3.12, . , , B B,
. :
D0 ABC, D1 ABC ..

. , . , .3.13,
A B 4 1, , 0,
. , 0, , 1, .
,
0. .
0, , , , ;
.
, :
1 , 0 .

. 3.13. 4-


, . , -

188 3.

, , ,
. 8- ,
, , -
, .

, ,
8 8 (.3.14).
D0,..., D7. , , , S0,..., S7.
: 0 , 1 . 7
0. 0 1.

. 3.14.

, , (
). = 1, ,
. , ,
. = 0, ,
.

, , .
,
.
.3.15,. : A B () .
.3.15,.
.
. ,
.

189

. 3.15. ();
()

(.3.16). ,
. 1, A, B
1 (
). 1, B
1 ( ), 1
1. ,
.

. 3.16. ();
()

190 3.

, , 16- ,
16 , .3.17,. . 0.
. 1
111...111 ,
. , . ,
.
. 32- : 16- 16-.
, ,
, , 16 .
. ,
. 16- :
U0 U1, .
U0 0, U1 1.
, .
16
, .
.
. 16-
8- ..
-

, .
n- n
. .3.17 , (). 4-
: A B, A B, B A+ B.
, F0 F1: 00, 01, 10 11 (
). , A+ B
A B, .
, .
F0 F1. F0 F1
,
.
, , ,
.
1, .
0 .

191

. 3.17.


, , ENA ( ) ENB ( B). ,
INVA ( ). ENA, ENB INVA,
4. ENA, ENB 1,
, INVA 0.
.

, . ,
. , .3.17,
.
. .3.18 8- ,
. INC (
) .
, + 1 + + 1.

192 3.

. 3.18. , 8- .

, . ,
; ,
. ,
.


.
,
.
,
. , . . .
.
100 4,
10 250 .
.
.
,
. , ,
. ,
(.3.19,). , .3.19,,
:
1. 1.
2. 1.
3. 2.
4. 2.

193

( ),
. ,
.

. 3.19. (); ();


()

,
. , , , 1 .
, 2 .
,
,
. 4 : 1 2,
1 2, 1 2 12.
.
(. .3.19, ). (. .3.19,), ,
.
.

.
, , . , . -

194 3.

, . ,
, .

, , - .
-, .3.20,.
-. ,
-.

. 3.20. - 0(); - 1( );
-()

, .3.20,, SR-.
: S (Setting ) R (Resetting ).
: Q Q. ,
.
, , , S= 0 R= 0 ( 0 ).
, Q= 0. Q -
0, , Q, 1.
, 0, 1,
Q= 0.
(. .3.20,).
, Q= 1, R S 0.
0 1 Q ( 0), . , .3.20,,
. , 0,
,
, , .
1, 0 1,
0, 1. : R= S= 0
, 0 1 Q.
. , S 1, Q= 0.
1 0,

195

Q= 0. 0, , , 1. , S 1
0 1. R 1, 0, ,
- 0 10, 11.
, , S 1 1 ( Q= 1) ,
R 1 .
, S 1, Q 1 . R 1
Q= 0. , : S R.
, .
SR-
, . ,
SR- (3.21).

. 3.21. SR-

, 0. 0, 0,
S R . 1, ,
S R.

.
, , S= R = 1.
: R, S 0,
. S= R= 1
Q= Q= 0, 0,
. 0
, , 1 ,
. 0
( ), .
D-
SR- (
, S= R= 1), .

196 3.

.3.22 D.

, , 1,
. D= 1 1,
Q= 1. D= 0 1,
Q= 0. ,
1, D . , D-,
. Q.
D,
.

. 3.22. D-

11 . (
) 6 . ,
( ). ,
, , , .


. ,
(flip-flop), , 1, 0 1
() 1 0 (). ,
, .
. , .
, . , , 1.
. ,

, D-.
1

(latch) , .
-, .
. . .

197

.
.3.23,.

. 3.23. (); ()

, , 0,
. , - .
. , a, b, c d. a
( .3.24, ).
b . ,
.
.
c ,
( ).
a , , 20 , 0,0001 , , ,
. ,
c a.
b c , , () ( 5 ). ,
- ( .3.24, ). , D-
.
. 10c 1c (
, D) ,

198 3.

, .3.24. ,
,
.

. 3.24. D-

.3.25.
.3.25, , ,
CK ( clock) 1,
, .3.25,,
1, 0, D. 3.25,, . , ,
, . .3.25,
( 0 1),
.3.25, ( 0 1).
( ) Q,
: Set () Preset (
) Reset () Clear (). (Set Preset)
Q= 1, (Reset Clear) Q= 0.

. 3.25. D- D-

. .3.26 , 8- .
8- (I0 I 7) CK.
CK, CK 8- . ,
.3.25,, ,

199

CK, 0 1.
, CLR 0, 0. ,
CK ,
, :
, ;
.
O0

I0 O1
Q

I2 O3
Q

O3 CK
Q

CK
CLR

CK
CLR

CK
CLR

CK
CLR

CLR
CK

CLR
CK

CLR
CK

CLR
CK

Q
CLR O4

I1 O2

D
I4 O5

Q
I5 O6

Q
I6 O7

D
I7

. 3.26. 8- ,

8- . , 32-
16- ,
CK CLR.
4.


1 (..3.22)
8- (.. 3.26,),
, . ,
, .3.27. 3- .
3- . (12 ) , 8- ,
, , ,
.
: 2.
, .3.28,
, . 8 , 3
I0, I1 I2; 2 A0 A1; 3 CS
(Chip Select ), RD (ReaD , ) OE (Output Enable ), 3 O0, O1 O2.

200 3.

. 3.27. - 43.
3- .

, 12- ,
8- . 8-
20 ( ), 12-
13, 4
. ,
.
, CS 1, RD 1 0 .
, 3-
. -

201

, .
, , ; .
, , .3.27.
.
, . (
0, 1, 2 3). ,
CSRD 1, . , 1.
CK , . , CS 1, RD 0, , 0 1; .
.
, . CSRD
0, ,
. ,
Q . , 4- ,
, 0. ,
, .
.
,
, .
.
.
, (
) , . -

. , ,
.
, . .3.28, .
,
. 1, (. 3.28, ). 0,
(.3.28,), -
. , 1.
.3.28, ,
, 1,
, 0. ,
,
( ). , ,

202 3.

. 3.28. ();
, 1( );
, 0(); ( )

, . ,
.
, . CS, RD OE 1,
1, , .
CS, RD OE 0,
.


, .3.27, ,
. 4 3 ( 4- 3 ). 4 8, 5 4 ,
5 5 . 4 3
8 3, ,
2.
,
.
. ,
, ,
18 ( ). ,
, , ,
.
, , ,
.

. .3.29 4: 5128 40961 (
, , ). .3.29, 19
219 8 .

203

. 3.29. 4

.
- ,
. , , - , ,
. ,
, .
, 0, .
CS , CS .
.
. , , , ,
. CS (Chip Select ) . , .
, , . WE (Write
Enable ) , ,
. , OE (Output Enable )
. ,
.
.3.30, . 20482048 ,
4. , .
11- .
RAS (Row Address Strobe ).

CAS (Column Address Strobe ).
, .

204 3.


mn, . , , ,
, :
, .
,
.

, .3.29,. 8
32 , .
4096K1 32- ,
32 , . 32
16. 512K8,
4 , 2.
32 ,
4, 8 16 . 64-
, , .
512 .3.30.

128; ,
. 3216, .3.30, , 13
RAS, 10 CAS 2 .
, 25 225
16- . 1284, .3.30, ,
RAS 13 , CAS 12 ,

. 3.30. 512

205

2. , 27
227 4- .
.
.

.
( ) , (1, 4, 8, 16 .) . ;
: -,
, -,
, .3.30.
,
.


, ,
: , .
( ), RAM (Random
Access Memory ). :
. (Static RAM, SRAM) D-.
, : , ,
. .
.
- .
(Dynamic RAM, DRAM), , . ,
. , .
,
() ,
.
, ,
, .
( 6
), (
).
.
( ). ,
.
. , , FPM (Fast Page Mode
). .
, (

206 3.

, , .3.29,).
.
FPM EDO (Extended Data Output
)1, , .
, , ,
.
FPM EDO , 12 . ,
, , FPM
EDO (Synchronous DRAM, SDRAM).

. .
, . , , . 4, 8 16
.
.
SDRAM DDR (Double
Data Rate ). , ,
. , 8-
, 200 , 8-
200 (,
); , , 3,2 /. DDR2
DDR3 DDR 533 1067
. DDR3
17,067 /.

.
(,
, ). , , .
( ), ROM (ReadOnly Memory ).
( , ). .
,
1

EDO , FPM, . . . .

207

, ( ) .
.
, ,
.
,
.
, , (Programmable ROM, PROM). ,
,
. . ,
,
.

(Erasable PROM, EPROM), , .
15 , 1.
, ,
, . , . , 27040 ,
.3.30,, . ,
. , .
27C040 $3, .
(Electronically
EPROM, EEPROM), ,
. ,
,
,
.
64 , .
, 10 ,
100 , . , .
. ,
, ,
, - .
, 64
-. . 2, -
, ,

208 3.

50 . -
; , , .
.3.2.
3.2.

SRAM

DRAM


( )

SDRAM


( )

ROM

PROM

EPROM

EEPROM

FPGA
1, (FPGA)
FPGA
, . FPGA
( ,
). , FPGA,
. FPGA -

.
FPGA , . FPGA
, : LUT (LookUp Table) .

FPGA 209

LUT (. 3.31a)
, , ( ),
.
. LUT
164,
. LUT
. ,
X Y,
LUT X.
.3.31, , 4- LUT
3- .
1 ( 4),
CLR; 0.
LUT . 0 . ,
LUT (I3) (CLR).
LUT I0..3 (I+ 1)
4. O0..3
I0..3.

. 3.31. FPGA (a); LUT


3- ( )

FPGA ,
. , , 2,
(CLR) , LUT 2,
3. (CLR),
LUT 6, 0.
, . ,
,
. FPGA ,
,
, .

210 3.

FPGA, ( ,
). ,
FPGA.
FPGA ,
FPGA. FPGA
LUT,
. , ,
, ,
( ) FPGA.
FPGA,
FPGA;
, - .


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


,
. ,
.
, , . ,
, -
.

: , .
- ( ).
,
.
, , (, ).
, , .
, .

211

, .
.
, .
,
-,
. .

, . , m , 2m .
m 16, 32 64. , n ,
n- .
n 8, 32 64. 8
4 , 32- , ,
32 ,
. , 32
, .
,
.
, .
( +1,2 +1,5), ().
.
:
;
;
;
;
;
.
, Intel Core i7, TI OMAP4430 Atmel ATmega168,
. ,
, .3.32.

(, ,
-). ,

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

212 3.

. 3.32. .
,
.


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


, .
.

,
-.

.
,
-.
.
,
. ( 50
100), .
-.

213

-. .3.33 -.

. 3.33.

, . ,
,
. , , . ,
, .

, , ;
, , ,
, ,
. . ,
,

, ,
, .. ,
,
(SoC).
, ,
: Omnibus (PDP-8), Unibus (PDP-11), Multibus (8086), VME ( ), IBMPC (PC/XT), ISA (PC/AT), EISA
(80386), Microchannel (PS/2), Nubus (Macintosh), PCI (
), SCSI ( ),
Universal Serial Bus ( ), FireWire (
). , , , , . ,
,
.

214 3.

, . , , ,
.
, .
, , . ,
, . .3.3.
.
3.3.

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

,
. . , ,
, .
, , .
. , ,
, -, -
- .
, ,

215

-, .. , 3- , .
, [Anderson et al., 2004; Solari and Willse,
2004]. ,
, . .
.


( )
. ,
. n
, 2n
.
. .
, , . (, ) .
. , .
, 64 , 232
, , 32 ,
232 . .
, . IBMPC 8088
20- (. 3.34,).
1 .

. 3.34.

216 3.

(80286), Intel 16, 4 ( 20


), . 3.34,. ,
.
80386, 8 , , , .3.34,. EISA.
,
32 .
,
, .
:
( ) ( ,
). ,
,
( ). ,
.
:
. ,
, .
.
,
.3.34. , .
IBMPC , , 8
, 16, 32 ,
.
,
. . , , 32 ,
. , .
, ,
. . ,
.
, .


.
, .
5
133.
. . .
.

217

TAD

TML


MREQ

TM

T1
MREQ

TRL

T1 RD

TDS

- 2

TMH

T3
MREQ

TRH

T3 RD

TDH

RD

. 3.35. ();
( )

218 3.


, ,
.3.35. 100, 10 . ,
3 ,
. ,
PCI 33 66, ( ) PCI-X 133 .
:
,
.
,
15 . ,
. T1, T4, .3.35.
, ,

. ,
1 . , MREQ, RD, WAIT .
T1 . T1 .
( ),
.
, . , , .
, ,
T3.

, MREQ RD. , , -,
, . 15 ( ),
T2.
, WAIT T2. ( )
, WAIT.
(2), .
3, ,
, WAIT .
3 . 3 (
) , . , MREQ RD.

. .

219

.3.35, 8
. TAD, , T1
.
TAD4 . , ,

4 1.
, 2 (TDS) 3, , . TAD TDS ,
25 4 2= 19 ,
. 10 ,
T3. 20,
, T4.
, 2 , MREQ.
, MREQ ,

. ,
, 3 .
TM TRL , MREQ RD 3 T1.
MREQ RD 10+ 10 3 2= 15
. 15 .
TMH TRH ,
MREQ RD , . ,
TDH , RD.
, RD;
.
, .
. ,
.
, . ,
, , , .
,
, .

, . ,
3,1 ,
4,0 , .

220 3.

, -,
. , ,
, .3.35, 15, 8.
. , 4.
,
2 .
,
, , , .
,
(.3.36).
. , MREQ,
RD , MSYN (Master SYNchronization).
, ,
. ,
SSYN (Slave SYNchronization).

. 3.36.

SSYN , .
, MREQ,
RD MSYN. MSYN ,
, SSYN,
, .
( ) - (. .3.36).
MSYN ,
SSYN. SSYN, ,
, MREQ, RD MSYN.

221

, MSYN SSYN,
.
. , , 4 :
1. MSYN.
2. SSYN MSYN.
3. MSYN SSYN.
4. SSYN MSYN.
, .
, .
- ( ) ,
, .
,
. ,
, . , . - ,
, .
, .


,
.
-
. ,
.
. : ,
?
, ,
.
.
. .3.37,.
, .
, .
( ),
. , .
.
, . -
( ).
, , . , ,
. ,
. -

222 3.

. 3.37.
(); ()

, ,
. , - . .
,
. .
, .
.
.3.37, 2 ( 4, 8 16 ).
, ,
. .3.37, , 1, 2 4
1, 3 5 2.
,
.
. .3.37, ,
2 4,
4 3. 5 ,
.
,
2
1 2, .

223

,
.
, ,
,
. , .
, . , ,
. ,
.
.
,
.
, , -
. ,
. , .
, -
, .
, , , .

, - ,
, .
. ,
16 .
, .
,
, , , .
,
. .

, (.3.38).
. .
BUSY . . .

. 3.38.

224 3.

.
5.
,
. ,
, IN. IN , .
OUT. IN ,
OUT, IN , , OUT. ,
IN OUT.
, IN ,
OUT . , BUSY OUT, .
, , ,
, .
, , .
.


,
( ) ( ) .
.
.
. - - ( 16
64- ). , .
, ,
(,
T1). ,
,
. .3.39 ,
.3.35, BLOCK, , .
6 12-.
. , ,
,
.
, ,
0, , 1, . , ,
0, 1. ,

225

. 3.39.

. , 0,
1,
, .
,
, , ,
; .

, , .
. - -
, . .
, , , .
,
.
, . IBMPC
Intel8259A. .3.40.
-
IRx (Interrupt Request )
8259A. , . 8259A INT (INTerrupt ),

226 3.

. 3.40. 8259A

.
, 8259A
INTA (INTerrupt Acknowledge ).
8259A ,
. .
.
,
, .
8259A ,
,
RD (ReaD ), WR (WRite ), CS (Chip Select
) A0. ,
, INT 8259A,
. ,
8259A , .
8 -, 8259A
. 8
8 8259A, 64
- . / Intel ICH10 I/O, Core
i7, 8259A. , ICH10
15 1 16 8259A,

8259A. 8259A , . 8259A
.
,

.
.

227


Intel Corei7, TI OMAP4430 Atmel
ATmega168 .

Intel Core i7
Corei7 8088,
IBMPC. Corei7 2008 .
731 ,
3,2 45 . (
). ,
. ,
. , . ,
20100 (
).
Core i7 Nahalem,
Core i7 Sandy
Bridge.
, . ,
. , AMDK
Intel , .
K Kryptonite , ,
Intel.
Corei7 Sandy-Bridge
1,16 . 3,5
32. Core i7 8088
29000 , 8088 , 8088 (
, Corei7 8088).
Corei7 64- . (ISA), 80386, 80486, Pentium, PentiumII, PentiumPro,
Pentium III Pentium 4, ,

IEEE754. , Corei7 ,
.
Corei7 ; ,
. 2 6 (
). , -

228 3.

.
,
. (,
).
(, ),
.
Corei7 Core2 Core2Duo. Corei7
, 4-
. Corei7 4.
Corei7 .
Corei7 32- (L1) 32- .
256- (L2). ,
.
(L3),
4 15 .
,
, Core i7
17 .
Corei7 , ,
, . , , , ,
.

.
, .
8.
Corei7 ,
. DDR3
; PCIExpress -.
Core i7 PCI
Express, QPI (Quick Path Interconnect). QPI ,
, . QPI
, ,
.
Corei7, ,
. , . Corei7
17 1502.

229

Intel ,
.
.
Corei7 LGA
37,5. 1155 ,
286 , 360
. 4040,
1725 . , 20 ,
. Corei7
.3.41.

. 3.41. Corei7

, , , .
, 150,
150 ( ). .
, Corei7 , .
,
, .
, , . ,

230 3.

Intel ( ),
, ( ),
, .
. (, , ), .
- ,
.
. Corei7
, .
Core i7
1155 Corei7 447, ( ) 286, 360; 62
.
(, ), 131
. Corei7
.3.42. 5
; .

. 3.42. Corei7

, .
DDR3- .
, , . Core i7 DDR3, 666
; ,

231

1333 . DDR3 64-,


DDR3 20 .
PCI, Core i7. PCI
Express ,

. Core i7 x16,
16 16 /.
, PCI Express
, , , .
DMI (Direct Media Interface),
Core i7 .
DMI PCI Express, ,
2,5/.
,
-. Core i7
P67 ICH10. P67 SATA, USB, , PCIe -. ICH10
, PCI 8259A. , ICH10
: ,
(DMA).
.
Corei7 , 8088 (
),
APIC (Advanced Programmable Interrupt Controller ). Corei7 ,
, .

,
. , , ,
.
, Corei7
.
. , , ,
, 130 C (266 F).
130 , , ,
.
, Core i7. ,
, , -

232 3.

,
N- . N,
. ,
.
.
YouTube (
exploding CPU). , .

. IEEE 1149.1JTAG.
() .
CK
,
. , , DLL (Delay-Locked Loop)

IEEE 1149.1JTAG ( Joint Test Action Group). ,
,
.
Core i7
, Corei7,
. , , ,
.
, .
Corei7 DDR3
, .
2, (. . 2.4), .
, Corei7 :
1. (ACT) ,
.
2. (READ) (WRITE)

.
3. (PCHRG) .
Corei7 , DDR3 .
,
,
. DDR3
. , DDR3

233

DDR3. . 3.43 , Corei7 3


. ,
.
.

. 3.43. DDR3 Corei7

. 3.43, DDR3
: (CK), (CMD),
(ADDR) (DATA). CK
. CMD , . ACT
, ADDR. READ
ADDR,
DATA.
, PCHRG , , ADDR. ACT
READ
DDR3, READ. ,
PCHRG READ .
READ
. READ 0 1 , 3 4
. 2 1, , 0
2.
Corei7 ,
READ ? -

234 3.


DDR3. ,
. Core i7
, DDR3
,
DDR3. , DDR3 ,
.

Texas Instruments OMAP4430



Texas Instruments (TI) OMAP4430. OMAP4430 ARM,
, , -.
,
( , -)
.
OMAP4430 ARM A9, .
OMAP4430 . 3.44. ARM A9
2. OMAP4430
-: POWERVR SGX540, (ISP, Image Signal Processor)
IVA3.SGX540
3D-
( ).
ISP
(, ). IVA3
, 3D- (, ,
). OMAP4430
,
, -, USB HDMI.
Texas Instruments OMAP.
ARM,
.
OMAP4430 2011.
ARM A9, 1, 45- . OMAP4430 ,
, , .
, .

235

. 3.44. OMAP4430

OMAP4430
. , ISP IVA3
,
ARM A9.
OMAP4430 600 . 1/250
Corei7. OMAP4430 ;
100 . ,
(, , ).
, .
OMAP4430
,
. , .
, ,
, . (power gating) :
. ,
,
IVA3 . ,
IVA3 ,
ARMA9 .

236 3.

( ), ARMA9
. . 4, .
, .
, - ; , . ; ,
. ARMA9
,
, .
OMAP4430 L1
ARM A9; 32- 32-
.
LPDDR2. LPDDR2
DDR2, ,
. ,
(,
).
4,
. (),
32 . 1024 1024
. , ,
, .
, ARM A9,
. 32768
, .
. , ,
,
. , .
19.
,
, ;
.
,
LPDDR2. LPDDR2
OMAP4430 ,
OMAP4430 .
13 . , (ACTIVATE),
. READ WRITE,
13 ( )
32 .

237

.
, - ,
, .
, LPDDR2.

.
4 .
,

. .
OMAP4430 (
Corei7) , .
OMAP4430 547 BGA (.3.45).
BGA (Ball Grid Array) LGA, ,
LGA, .
, .
OMAP4430 28 26,
,
BGA.

. 3.45. OMAP4430

CISC- (, Corei7) RISC-


(, OMAP4430) . ,
ARM A9
; OMAP4430
4 Corei7. Corei7 ,
, 3,5
(3,5), OMAP4430. , OMAP4430 , Corei7,

.

238 3.

Atmel ATmega168
Core i7 OMAP4430 ,
(Corei7
, OMAP4430 ). ,
. .
,
100 .
, , , ,
, , , , ,
( ) .
, ,
, .
1 , ATmega168. ,
, . ,
ATmega168 ,
. .3.46.
, ATmega168 28 (
). :
. ,
. ( -)
,
(. 3.47).
PC6
PD0
PD1
PD2
PD3
PD4
VCC
GND
PB6
PB7
PD5
PD6
PD7
PB0

1
2
3
4
5
6
7
8
9
10
11
12
13
14

28
27
26
25
24
23
22
21
20
19
18
17
16
15

PC5
PC4
PC3
PC2
PC1
PC0
GND
AREF
AVCC
PB5
PB4
PB3
PB2
PB1

. 3.46.
ATmega168

PC6
PD0
PD1
PD2
PD3
PD4
VCC
GND
PB6
PB7
PD5
PD6
PD7
PB0

1
2
3
4
5
6
7
8
9
10
11
12
13
14

28
27
26
25
24
23
22
21
20
19
18
17
16
15

PC5
PC4
PC3
PC2
PC1
PC0
GND
AREF
AVCC
PB5
PB4
PB3
PB2
PB1

. 3.47.
ATmega168

ATmega168 27
-, 8 B D 7 C. -
-,

239

( ). ,
,
-. -
ATmega168 , . ,
. , .
, C . - . ,
,
. C,

. ATmega168 (VCC),
(GND) - (AREF, AVCC).
ATmega168, OMAP4430,

. ATmega168 16 -
(, ). 1 EEPROM , .
EEPROM .
: , EEPROM ,
(12- 24-). ATmega168
1 , .
AVR.
131 , 16 .
8-; , 8- ,
8 . , 8-
. , 16-
( ) ,
.
: ,
- , I2C ( InterIC), -.


.
PCI USB. PCI -, PC.

240 3.

: PCI ,
PCI Express (PCIe). USB -
(, ). USB .
.

PCI
IBMPC .
Windows .
ISA. ,
, ,
.
. 1024 768 3 . 2,25 .
30 , , ,
67,5/. , ,
, , -
DVD- . ( ). ,
135/,
.
PCI
ISA 8,33. ISA ,
16,7/.
EISA 4 . 33,3/. ,
, .
Full HD . 19201080 30 ,
155 / ( 310/,
). , EISA
.
1990 Intel
, EISA. PCI (Peripheral
Component Interconnect ).
Intel PCI ,
- .
Intel PCI Special Interest
Group,
PCI. , PCI
. Intel ( Pentium), PCI. PCI
[Shanley and Anderson, 1999; Solari and Willse, 2004].

241

PCI 32 33
( 30 ), 133/.
1993 PCI2.0, 1995 PCI2.1. PCI2.2 ( ).
PCI, 66,
64 , 528/.
(
). , PCI .
528/ ,
. -, . -, PCI ISA.
Intel
, .3.48. ,

, ISA PCI. 1990-

.

. 3.48. Pentium.
( .
, )


( Intel

242 3.

). PCI , PCI.
ISA PCI ISA,
IDE-. PC, ,
PCI-
ISA- .
, .3.48, ,
, PCI (SCSI-, ..),
ISA.
USB, .
, PCI. , . ,
. 5,
3,3, PCI .
( , 5 PCI 3,3, ).
, ,
.
, . : 32- 64-. 32- 120 ; 64-
120 64 . PCI,
64- , 32-,
. , PCI
33, 66. .
,
, .
1990- ISA
, .
, (
16001200 ),
, , Intel ,
. AGP (Accelerated Graphics
Port ). , AGP 1.0,
264 /, 1.
( PCI)
.
, AGP 3.0 2,1/ (8). AGP3.0
, PCI Express, 16/
.
Corei7 .3.49.
Corei7
. DDR3,

243

. 3.49. Corei7

1333/,
10 / .
PCI Express 16 , 16- PCI Express 8-
PCI Express. 16 -
16 /.
P67 DMI (Direct Media Interface) 20 /
(2/). P67 -. 8 PCI Express SATA. P67
15 USB 2.0, 10G Ethernet .
ICH10 .
P67 DMI. ICH10

244 3.

PCI, 1G Ethernet, USB ports PCI Express SATA.


ICH10 ;
, .
PCI
PCI , PC,
IBMPC. PCI
. ,
. 64-
,
PCI 64- 64- .
.
.
, ,
.
. ,
, . .
, .
,
.
PCI
PCI,
. PCI ,
.3.50.
. PCI-
. (REQ#) , (GNT#)
. (. REQ# REQ PCI.)

. 3.50. PCI

, PCI- ( ) REQ# , GNT#. GNT#,


. ,

245

, PCI.
, , . ,
, .
,
.
, ,
. (
)
.
, -
, GNT#. ,
GNT#,
. ( ) ,
, .
PCI
PCI (.3.4)
(.3.5). ,
.
, .
(, CLK), .
3.4. PCI

CLK

AD

32

PAR

C/BE#

-, , -,
, ,

( )

FRAME#

,
AD C/BE

IRDY#

,
;

(33
66)

246 3.
3.4 ()

IDSEL

DEVSEL# 1

TRDY#

, AD;

STOP#

PERR#

SERR#

REQ#

GNT#

RST#

3.5. PCI

REQ64#

ACK64#

AD

32

32

PAR64

32

C/BE#

4 ,

( )

LOCK

64-

64-

247

SBO#

SDONE

INTx

JTAG

IEEE 1149.1
JTAG

M66EN


(66
33)

PCI .
(32-) ,
(64-). CLK . . PCI CLK,
, .
AD ( 32) ( 32 ).
,
. PAR AD. C/BE# . (
, ..).
4 , , 32- . C/BE#, 1, 2 3 ,
.
FRAME# , . ,
. FRAME#
IRDY#. ,
. IRDY# ,
.
IDSEL , PCI
256 ,
( IDSEL). . (Plug and Play, PnP)
, , .
, . DEVSEL# ,
AD . DEVSEL#
,
, , ,
, .

248 3.

TRDY#.
, , AD, ,
, .
.
, STOP#, ,
- .
, PERR#,
. , .
, . ,
SERR# .
REQ# GNT# . , , ,
. , RST#, , RESET, - . .
, 32 64 . REQ64# ACK 64#
64- , . AD, PAR64
C/BE# 32- .
32 64 . . PCI
, . LOCK
.
,
.
INTx . PCI
,
. JTAG
IEEE 1149.1 JTAG. , M66EN , , .
.
PCI
PCI ( , ).
, .3.51.
, ,
.
T1 AD C/BE#.
FRAME#, .
T2 , T3.
C/BE#, ,
.

249

. 3.51. 32- PCI.


, ,

T3 DEVSEL#.
, .
AD TRDY#,
.
, DEVSEL#,
, TRDY# ,
.
.
( ) .
, T5
. . . AD
, . T7
.

PCI Express
PCI
, - . 3.50

250 3.

, PCI ,
. .
,
-, PCI.
, ,
. ,
PCI (
, , ..), Intel ,
PCI. ,
.
PCI .
PCI 17,510,7 ,
12,53,6 . , .
.
,
, .
PCI .
, ,
, PCI
Express, Intel. ,
PCI; .
PCI ,
. .
, .
PCI Express
PCI Express
.
, ISA/EISA/
PCI, (
Ethernet). : , , -,
. , PCI Express , .
PCI Express .3.52.
, , .
( ).
-, , , , .

. -

251

. 3.52. PCI Express

( ), .
.
PCI Express
PCI. , ,

. . ,
PCI, ,

. PCI Express , . , , .
, , ,
PCI. . , , PCI Express,
.
. , PCI
. ,
50 , .
, , , , . , PCI

252 3.

Express , , . ,
PCI-, . ,
PCI Express PCI.
PCI Express
, PCI Express . , .
, ,

. .
, , , , , .. . ,
, ,
. . , ,
, . ,
,
. PCI Express
.
PCI Express .3.53, .

. 3.53. PCI Express (); ( )

.
. .
() .
, 2, 4, 8, 16
32 . , , (lanes).
.
2,5/
, , ,
10/.
ISA, EISA PCI, PCI Express . ,

253

, . , , , . , 1 +3, 0 0.
, , ?

. 8/10-
. , 1
10- . 1024 10- ,

. 8/10-
, 2,5/,
2/.
.
, ,
CRC (Cyclic Redundancy
Check ). CRC-
.
, .
, .
. ,
PCI, .
,
, .

, .
, . , ,
.
. ,
,
DMA, , ( ). ,
, . , , ,
. (
) ,
.
, , ,
, ,
.. , , ,
.

254 3.

:
(
);
- ( );
( ..);
( , ..).
- ,
. , (PnP).
.
, PCI Express PCI
.
PCI Express . ,
PCI, , PCI Express, - . ,
PCI Express ,

, ,
PCI Express. , .
, PCI Express, .3.53,.
, , , .
, , CRC-. ,
,
. ,
.


. PCI Express , ,
, .
PCI Express, , .
PCI Express .
[Mayhewand Krishnan, 2003; Solari and Congdon, 2005]. 2007 PCIe2.0.
500/ 32 ,
16/. 2011 PCIe3.0, 8/10-
128/130-, 8
, PCIe 2.0.

255

USB
PCI PCI Express , PCI - (, )
. -
,
ISA- PCI-. ,
.
, - ISA PCI.
,
.
, , . .
, ISA- PCI- ( ).
(PnP) ,
. .
1993 (Compaq, DEC, IBM, Intel,
Microsoft, NEC Nothern Telecom) , ,
.
.
USB (Universal Serial Bus ),
.
USB [Anderson, 1997; Tan 1997].
, :

;
,
-;
,
;
- ;
127
;
(,
, );

;
;
-
.
USB . (, , , , -

256 3.

..).
(USB1.0) 1,5/. 1.1 12 /,
, .
2.0 480/c,
, -
. USB3.0
5/; , .
USB (root hub),
(. .3.49). (
) , - ,
. , USB ,
. ,
.
:
, (+5) . 0
, 1 ,
.
- .
, ,
.
, ,
(1127)
. ,
,
ISA PCI. 0, .
. ,
.
USB -.
16 (, ).
. -
.
(0,05 )
, . , .
, ( ). .3.54
.

257

. 3.54. USB

0 2 ,
SOF (Start of Frame ).
. 1 (, ). 3
, - (, ).
USB 4 : ,
, .
, .
(, ),
. ,
.
(, )
, . ,
, USB .
, , , 50 .
. . : ,
, .
.
SOF, IN OUT .3.54 . SOF (Start of Frame
) , .
, SOF .
IN . , . IN ,
, , ( ).

258 3.

OUT , .
, SETUP ( ),
.
. ( 64 ),
. (DATA)
.3.54. 8- , 8- (PID), 16- CRC-
. : ACK (
), NAC ( CRC-) STALL
( , ,).
.3.54. , .
0 2 SOF, ,
. 1 , SOF IN,
-,
DATA . ACK ,
.
NACK, (,
). 3 1,
.
1998 USB , , USB,
USB2.0. USB 1.1
, 480/.
, , . USB1.1
UHCI OHCI. UHCI (Universal Host
Controller Interface -)
Intel, (
Microsoft). OHCI (Open
Host Controller Interface -),
( Intel). USB2.0 ,
EHCI (Enhanced Host Controller
Interface -).
USB 480 /,
IEEE1394 (FireWire),
400 / 800 /. Intel USB 2.0 USB 3.0 (. ),
1394 ,
, . USB
, 1394 .
, . , .
USB 2.0 USB 3.0. USB3.0

259

5 /, , ,
. USB3.0 USB,
USB 2.0. , USB 2.0 USB3.0 .

, -.
.
, TI OMAP4430.
, . -.
.

-
, . UART, USART, CRT,
PIO. UART (Universal Asynchronous Receiver Transmitter
) -,

.
UART : 50 19200/; 5
8 ; 1, 1,5 2 ; ,
. USART (Universal Synchronous
Asynchronous Receiver Transmitter -
) ,
, UART.
UART
, - PIO.
PIO
PIO (Parallel Input/Output -) Intel 8255A (.3.55).
24 -
(, , , , ).
0 1
, . ,
PIO, ,
, . PIO .

260 3.

. 3.55. 8255A

PIO 3- , , 8-
(0) (1).
- . 8-
. ,
8- , 8- ,
. ,
.
PIO. ,
. , , 8255A
,
, .

.
PIO . 3.55 ,
24 8255A , , ,
, .
,
A, B C,
.
. 24- PIO ,
.


,
-.
16- , ,
EPROM 28 ,
28 PIO.
.
, EEPROM .

261

PIO :
- . PIO -,
, , -, .
- (memory-mapped I/O). 4
. - . -
, .
EPROM 2 ,
2, PIO 4 .
64K , ,
. .3.56. EPROM 2, 32 34, PIO 4 , 65532 65535. ,
,
. PIO -,
( -).

. 3.56. EPROM, PIO 64

EPROM
16- 00000xxxxxxxxxxx ( ).
, , 0, 2, EPROM. , EPROM
5- ,
00000.
:
, A11
A15. 0 ,
0. CS.
. 3.57, a; .
. 10000xxxxxxxxxxx, ( ). PIO , 4- 11111111111111xx.
, CS
, ,

262 3.

. 3.57. (); ( )

. - ,
.
,
PIO, . ,
EPROM ( EPROM) A15 0.

263

, CS A15,
.3.58,.
8000H . , 10xxxxxxxxxxxxxx,
. , , 11, PIO.
- .
, .3.58,, , . 0001000000000000,
0001100000000000 0010000000000000 .
EPROM. ,
, , ( ),
,
.
(. .3.12).
, ,
8, 8 .. ,
8 88 , . 8 28,
,
8. ( ,
- .)


, , . ,
, -, - . ,
.
, , , , .
(FPGA) .
,
, .
. .
.
. ,
,
.

264 3.

,
. , .
: , , PROM, EPROM, EEPROM, -.
: ,
. , , ,
.
.
( )
. , . .
.
Corei7 . , PCI USB.
PCIe ,
. ARM ,
ARM ,
. Atmel ATmega168
, , .
, , ,
-.
- .
, .


1. , .
? .
2. : , ,
- . ,
( ), ,
, . ,
.
? (
, .)
1) .
2) -.
3) .
4) - .
5) .

265

6) - .
7) .
8) , .
3. , ,
. , .
, . ,
. ?
4. , X = (X Y )
(XY).
5. 4 16
. ? n ?
6. 4 16
. ?
7. , , -.
8. , .3.11,
, 1 ,
1.
9. , .3.11, . , ,
, 0, , , , 1,
(, 0000= = 0;
0010= = 1; 0111= = 0; 1101=
= 0). : D. VCC, , D D.
10. ,
4 2 . 1.
,
1.
11. ,

.
12. ?

266 3.

13. 4- .
16- .
, 4- ? ?
14. n n , i,
Ci, i 1. 0,
C0 0.
T, i iT
. n
. , . : Ci
() Ai 1 Bi 1, Ci 1. , Ci 0
i 1, .
15. .3.18
1, ,
() ?
16. , .3.19, 8-
. ?
, , . , ,
.
17. 16- 16 ,
10.
1,
?
18. , 8- (., , .3.19) 1. ,
.
.
19. S R SR-,
-?
20. .3.25 , . ,
, .
21. 43, .3.28, 22 .
, 2568?
22. .

, D-,
Q Q. 4
( ).
.
.

267

23. , , , , .
.
2n
, n.
24. 32-
1M1. ( ), ?
25.
.3.35. ,
20 10, .
, T3 ,
MREQ?
26. .3.35. ,
100, TAD 4. 10?
27. .3.35, , TML
3. ,
? ,
MREQ ? , .
28. , .3.39 ,
.3.35.
( )? ,
8, 32 . ?
29. .3.36. TA1
TA2, MREQ TMREQ1 TMREQ2 ..
, .
30.
.
, PC, Ethernet?
31. ?
? -
?
32. PCI?
33. 32-
16 . ,
? .
34. . ?
35. 32- , 200, 4 , 32- .
?

268 3.

36. 64- , 200, 4 , 64- .


?
37. 32- A2A31 ,
. ,
, 4, 8, 12 ..
( 4), ,
. . , ?
.
38. , . ?
39. , -
1 2 .
10 . 20%
- , 60%
- , ?
40. , (1280960) 30/. ,
: -
, .
41. , .3.52, ?
42. PCI Express
10/. 16x? ?
?
43. :
, .
10, 20 (
). .
2048 512.
5 .
, 32-
?
44. ,
USB, 1023 . , ,
?
45. .3.58, . , -,
PIO, , A13?

269

46. , mn,
-. (
) j k . j, k, m
n .
,
. j ,
- -. k , - -.
.
2j .
, (
) ,
.
.
47. , , .
( ),
, .
.
.

4.

.
2 ( ), .1.2. ,
, .

, (, , RISC). (, Corei7)
;
. , ,
.

, .



, , , .
. .
Java.
, IJVM (Integer Java Virtual Machine Java ).
, IJVM.
IJVM . 1, .
IJVM ,
.
( ),
, IJVM-.
Oracle JVM,
,
. Oracle JVM C
,
.
,
3, ,

271

IJVM. , ,
( ).
,
. . .
, , ,
. 2.3.
,
. .
,
. , .
( ), .
.
IJVM- . , , .
. (,
, - ).
, . , ,
,
, , .
, -, (, IJVM).
, , ,
. , .


, (
- ), . .4.1.
IJVM-,
. 32- ,
(, PC, SP, MDR). , ,
( ). ,
,
.
B.
C. C
. A , , .
, .3.17 .3.18.
. .4.1
6

272 4.

. 4.1. ,

. F0 F1 , ENA ENB A B , INVA


INC ,
. , 64
- .
.4.1.
IJVM, ( JVM). -

273

.
(+) , () ,
A A.
4.1.
F0

F1

ENA

ENB

INVA

INC

A+ B

A+ B+ 1

A+ 1

B+ 1

B A

B 1

AB

A B

, .4.1, :
(A) (B). H.
B,
, , .
, .
H ,
( B) .
, ENA ,
0. B 0, .
( ) H.
,
. . SLL8 (Shift Left
Logical ) 1 , 8 . SRA1 (Shift Right Arithmetic
) 1 ,
.

274 4.

.
, , SP B,
, INC SP,
1 ( .4.1).
,
? , . , B
. ,
C.
, ,
C .
, B.

. .

.4.2 , .
.
, .3.19,.
, . w. ,
B. x.
. y
. z
,
. -

. 4.2.

275

, -
C
. , B,
. MPC
MIR, . .
,
, .
B C ,
( ). ,
, , ( ) ,
B, .
,
; ; C .
, ,
.
.
1 .
, .
.
1. (w).
2. B (x).
3. (y).
4. C (z).
.
,
,
C, . .

w+ x .
w + x+ y.
, , , , , C.
,

, w + x+ y + z
.

:
(32-) (8-). : MAR (Memory Address Register ) MDR
(Memory Data Register ),

276 4.

.4.1. 8- PC,
1 8 MBR (Memory Buffer Register
). ,
.
, ,
.4.1, . ,
B. MAR B,
. H ,

.
,
( ) C. MBR
C,
( , ). ,
,
( .4.1).
MAR , , 0, 1, 2 ..
. PC ,
, 0, 1, 2 .. .
2 PC , 2, 8
MBR. 2 MAR ,
8 11 ( 2), MDR.
? ,
MAR PC . , .
, MAR MDR
, PC MBR
, .
, ,
, MAR.
. MAR , ?
MAR , 32
32 ( 0 31).
0 2, 3 ..
,
232, 4. MAR 1, 4; MAR
2, 8 .. MAR
.4.3.
, , 8- ,
8- MBR.
B : .

277

. 4.3. MAR

, 32- , B, MBR
8- 24- .
16-
( ) .
8- MBR 32-
128 +127 32-
. ( ) MBR 24 B.
, .
, 24 0,
1 ,
MBR: 0 1.
32- ( )
8- MBR, ,
( MBR .4.1) .
8- MBR
32- B.

, .4.1, 29 . :
9 C ;
9 B ;
8 ;
2 , ,
MAR/MDR ( );
1 , ,
PC/MBR ( ).
29
. B,
,

278 4.

C (). ,
,
MAR . MBR
MDR , ,
. ,
k,
k+ 1 ( k+ 2 ).
, ,
.4.2.
MAR PC, 1. ,
, MBR /
MDR .
, MAR
. ,
, MDR , .
. . ,
, .
, , , - ( ) 100%.
,
, .
MBR MDR
, ,
. ,
, . :
MBR MDR
, . ,
, (
). , .

.
C ,
B
( , ). ,
, B. 9 ,
B ( MBR
). , B
4 16 , 7

279

( , ,
, ,
, , ,
).
9+ 4+ 8+ 2+ 1= 24
, , 24 . 24
. ,
. , , 24 : NEXT_ADDRESS
( ) JAM.
. .4.4 .
6 , 36 :
Addr ;
JAM , ;
ALU ;
C , C;
Mem ;
B B ( ,
).

. 4.4. Mic-1

,
, , .4.5.
.
.

Mic-1
, -

280 4.

. 4.5. Mic-1

. ,
,
.

:
;
, .
4.5 , Mic-1.
, . , ,
. :

281

(), ,
(), .
. ,
, . ,
, MBR
MDR. , .
512 ; 36- ,
.4.4. ,
512 .
, ,
, ( ), .
2.1 , , ,
. ( )
. .
,
.
, . MPC (MicroProgram
Counter ). , ,
, .
MIR (MicroInstruction Register ).
, , .
MIR, .4.5, , .4.4. Addr J ( , JAM) . .
ALU 8 ,
. C C. M
.
, 4 , ,
B.
, 9
. , 4 9 . , . , ,
, .
, ,
.
, .4.5, . ( .4.2) MIR -

282 4.

, MPC.
MIR w, (. .4.2).
MIR,
. B, ,
. . w+ x .
y N Z ,
. N Z 1-
. , , C
, ,
. ,
. 3.
, z, ,
C, .
(. .4.2). 4 N Z.
, ,
, MPC . ,
.
, , , . MIR.
MPC 9- NEXT_ADDRESS ( ).
, JAM. 000,
, NEXT_ADDRESS
, MPC .
JAM 1,
. JAMN 1, N
MPC. JAMZ 1, Z MPC.
1, .
, N Z. ,
( ) B ,
.
N Z MPC, ,
.
.4.5 , ,
. :
F = (( JAMZ Z ) ( JAMN N )) NEXT_ADDRESS [8]
, MPC
:
1. NEXT_ADDRESS.
2. NEXT_ADDRESS ,
.

283

. NEXT_ADDRESS
1, JAMN JAMZ.
, JAM 0,
9- NEXT_ADDRESS. JAMN
JAMZ 1,
( 0x , ): NEXT_ADDRESS
NEXT_ADDRESS, 0x100 (, NEXT_ADDRESS 0xFF). 4.6 .
0x75 NEXT_ADDRESS= 0x92,
JAMZ 1. , Z, .
Z 0, 0x92. Z
1, 0x192.

. 4.6. JAMZ, 1,

JAM JMPC. , 8 MBR


8 NEXT_
ADDRESS . MPC.
.4.5 O ,
MBR NEXT_ADDRESS, JMPC 1, NEXT_
ADDRESS MPC, JMPC 0. JMPC 1,
8 NEXT_ADDRESS 0. 0 1,
NEXT_ADDRESS 0x000 0x100. 0x000, 0x100, .
MBR NEXT_ADDRESS MPC
. , , MBR,
256 . MBR ,
JMPC .
, .
, , .
,

284 4.

, , ,
N Z. .4.2.
1, , , MPC, MIR. 2
MIR , B . 3 . 4
C, . C, N Z, MBR
MDR ,
( ).
MBR , MPC. -
,
MBR MDR. MPC ( )
, .
, MPC ,
MBR, N Z, . ,
, MPC .
, . , B,
, C , ,
MPC.
.4.5. MPC , 9
. .
.

, MIR, .
MPC. MPC
, , . MPC ,
:
. MPC ,
.

IJVM
, (ISA),
IJVM (. .4.5).
, . IJVM, .


(), .

IJVM 285

, .
: ?

. ,
. 5.
, ,
,
.
. ,
. - , , LV,
.
.4.7,. A a1, a2 a3,
, , LV. , SP, A.
LV 100, 4 ,
SP 108.
LV. LV SP ( )
.

. 4.7. : A();
A B(); B
C(); C B , A
D()

, , A
, B. 4
B (b1, b2, b3, b4)? : ,
A, .4.7,. ,
LV B.
B LV. B C, LV SP
C, .4.7,.
C , B ,
(. .4.7, ), LV
B. B ,
(. .4.7,). LV
, SP .

286 4.

, A D, 5 . .4.7,. D B C. .
, .
,
.
. , B A :
a1 = a2 + a3.
, a2 ,
.4.8,. SP ,
(, 4), .
a3, .4.8,. (
.)

. 4.8.

, , , ,
.4.8,.
a1, .4.8,.
.
, f x2+ f(x),
(x2) . x2,
.
,
, .
, JVM, IJVM .
5.

IJVM
IJVM.
, 4294967296
(4), 1073741824 ,
4. , Java
, , , . IJVM-
.
:

IJVM 287

. , IJVM-,
, ,
.
. CPP (Constant
Pool Pointer ),
.
. . , ,
.
( ) . , .

. , . LV (Local Variable ).
.
. , Java. ,
.4.9.
. , . , CPP LV,
,
.
. , , . ,
. (Program
Counter, PC). , .

. 4.9. IJVM

288 4.

. CPP, LV SP
, , . , LV, LV+ 1 LV+ 2
, LV, LV+ 4 LV+ 8 ,
(16) .
PC, , ,
, .
PC , Mic-1
PC.
. PC ,
. SP , .

IJVM-
IJVM- .4.2.
(, ).
.
.
.
4.2. IJVM-. byte, const varnum 1.
disp, index offset 2
Hex

0x10

BIPUSH byte

0x59

DUP

0xA7

GOTO offset

0x60

IADD

0x7E

IAND

;
()

0x99

IFEQ offset

0x9B

IFLT offset

0x9F

IF_ICMPEQ offset

; ,

0x84

IINC varnum const

0x15

ILOAD varnum

0xB6

INVOKEVIRTUAL disp

0x80

IOR

;
( )

IJVM 289

Hex

0xAC

IRETURN

(
)

0x36

ISTORE varnum

0x64

ISUB

0x13

LDC_W index

0x00

NOP

0x57

POP

0x5F

SWAP

0xC4

WIDE

;
16-

.
(LDC_W), (ILOAD) (BIPUSH).
(ISTORE).
( IADD ISUB)
(IAND IOR). , . 4 :
(GOTO), (IFEQ, IFLT
IF_ICMPEQ). PC ,
.
16 . .
(SWAP),
(DUP) (POP).
,
. , JVM , IJVM .
. ,
WIDE
.
, (INVOKEVIRTUAL)
, (IRETURN). - . , , Java,
,
. Java,

. ( - , .
Java - , C Pascal.)

290 4.

, JVM, , , CALL, ,
.
.
. .4.10,
OBJREF.
( 1,
2 3). INVOKEVIRTUAL.

. 4.10. INVOKEVIRTUAL();
()

INVOKEVIRTUAL , .
, . 4 . 2
16- ,
( ).
OBJREF 0. 16-
SP OBJREF. , LV

IJVM 291

OBJREF, . ,
LV, - .
2 16-
,
. , ,
,
. , , .
, (. .4.10).
, , ( ).
. , LV OBJREF. OBJREF
, PC.
(+ ) , LV.
, PC,
, LV. . SP
LV, .
, SP . ,
SP , . ,
.
, INVOKEVIRTUAL PC .
IRETURN INVOKEVIRTUAL (.4.11).
, , , , , -, OBJREF ; -, ,
, OBJREF.
, IRETURN PC
LV. ( , LV). ,
OBJREF, INVOKEVIRTUAL ,
PC. , ,
PC LV . ,
, , OBJREF, SP
. ,
INVOKEVIRTUAL.
-.
. , Java,
, JVM -.
, - . (
JVM .)

292 4.

. 4.11. IRETURN();
()

IJVM
, Java IJVM. 4.1
Java. Java
IJVM,
4.2. 115 , (//)
. . Java ,
4.3. ( Java
.) i
1, j 2, k 3.
4.1. Java
i=j+k;
if(I==3)
k=0;
else
j=j1;

IJVM 293
4.2. IJVM Java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

ILOAD j
ILOAD k
IADD
ISTORE i
ILOAD i
BIPUSH 3
IF_ICMPEQ L1
ILOAD j
BIPUSH 1
ISUB
ISTORE j
GOTO L2
L1: BIPUSH 0
ISTORE k
L2:

// i=j+k

// if(i==3)
// j=j1

// k=0

4.3. IJVM
0x15
0x15
0x60
0x36
0x15
0x10
0x9F
0x15
0x10
0x64
0x36
0xA7
0x10
0x36

0x02
0x03
0x01
0x01
0x03
0x00 0x0D
0x02
0x01
0x02
0x00 0x07
0x00
0x03

. j k ,
, i. i 3
. , L1,
k 0. ,
IF_ICMPEQ. L2, else then.
, 4.2,
.4.12. , 0. ILOAD j ( 1 ). 1 ,
. ILOAD , 2.
IADD ,
j+ k.
i, .
5 (ILOAD) if. i .
3 ( 6).
(7). 8 else.
12, L2.

294 4.

. 4.12. ,
4.2


- . . , ,
, . , ,
.


,
, 36 . ,
. ,
, ,
, . ,
, .
,
.
.
,
, .
,
.
, .
, . , .
.
: ,
,
.
,
. ,

295

SP . , , 122
. :
ReadRegister=SP, ALU=INC, WSP, Read, NEXT_ADDRESS=122

WSP SP. ,
.
:
SP = SP + 1; rd

MAL (Micro Assembly


Language ). - mal
, ,
. MAL
.
, .
B . A +1, 0,
1 H. , , Java. ,
SP MDR, :
MDR = SP

, - ,
, , :
MDR = H + SP

, H
SP MDR.
( , ),
:
MDR = SP + H

36- , , ,
H .
;
:
DEST
DEST
DEST
DEST
DEST
DEST
DEST
DEST
DEST
DEST
DEST
DEST
DEST
DEST
DEST
DEST

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

H
SOURCE
H
SOURCE
H + SOURCE
H + SOURCE + 1
H + 1
SOURCE + 1
SOURCE H
SOURCE 1
H
H SOURCE
H SOURCE
0
1
1

296 4.

SOURCE MDR, PC, MBR, MBRU, SP,


LV, CPP, TOS OPC (MBRU MBR ). (
B). DEST
: MAR, MDR, PC, SP, LV, CPP, TOS, OPC H; ,
C. , .
, ,
, .4.5, :
MDR = SP + MDR

, (
1)
H. , , :
H = H MDR

,
H. , , .

. , 1 SP SP MDR, :
SP = MDR = SP + 1


4 rd wr.
1- fetch.
. , , .
, , Mic-1
. 4- MAR MDR.
rd wr . 1-
PC MBR. fetch.
.

. :
MAR = SP; rd
MDR = H

MDR . MDR.
, .
, . ,
, , . ,
(

297

)
NEXT_ADDRESS,
.
,
. :
goto

,
. ,

, :
goto Main1

,
, goto. NEXT_ADDRESS. goto ,
, ,
. ,
goto, ,
, goto .
. , JAMN
JAMZ N Z . , , .
, .
:
TOS = TOS

, ( Z TOS).
MAL,
N Z, . :
Z = TOS

TOS ,
Z ( N), .
Z N , 0 C (. .4.4).
, ,
. , ,
N Z. , , . (, ,
IBM PC 4,77.)
JAMZ,
:
if(Z) goto L1; else goto L2

, 8
, .
, L2 256
, .

298 4.

:
Z = TOS; if(Z) goto L1; else goto L2

MAL , TOS , ,
Z. Z
MPC ,
L2, L1.
MPC , .
, , JMPC:
goto (MBR OR )

,
NEXT_ADDRESS JMPC, MBR
MPC NEXT_
ADDRESS. value 0, :
goto (MBR)

, 8 MBR MPC (. .4.5), . , MBR,


.
.

IJVM
Mic-1
, .
.4.3 ,
Mic-1 IJVM. 112 . .
, , . , .
4.3. Mic-1

Main1

PC = PC + 1; fetch;
goto(MBR)

MBR ;
;

nop1

goto Main1

iadd1

MAR = SP = SP 1; rd ,

iadd2

H = TOS

H =

iadd3

MDR = TOS = MDR +


H; wr; goto Main1

299

isub1

MAR = SP = SP 1; rd ,

isub2

H = TOS

isub3

MDR = TOS = MDR ;


H; wr; goto Main1

iand1

MAR = SP = SP 1; rd ,

iand2

H = TOS

iand3

MDR = TOS = MDR ;


H; wr; goto Main1

ior1

MAR = SP = SP 1; rd ,

ior2

H = TOS

ior3

MDR = TOS = MDR


; H; wr; goto Main1

dup1

MAR = SP = SP + 1

SP 1 MAR

dup2

MDR = TOS; wr; goto


Main1

pop1

MAR = SP = SP 1; rd ,

pop2

H =

H =

H =

,
TOS

pop3

TOS = MDR; goto


Main1

TOS

swap1

MAR = SP = SP 1; rd MAR
SP1;

swap2

MAR = SP

MAR

swap3

H = MDR; wr

TOS H;

swap4

MDR = TOS

TOS MDR

swap5

MAR = SP 1; wr

MAR SP1;

swap6

TOS = H; goto Main1

TOS

bipush1

SP = MAR = SP + 1

MBR = ,

300 4.
4.3 ()

bipush2

PC = PC + 1; fetch

PC 1;

bipush3

MDR = TOS = MBR;


wr; goto Main1

iload1

H = LV

MBR ; LV H

iload2

MAR = MBRU + H; rd

MAR = ,

iload3

MAR = SP = SP +1

SP
;

iload4

PC = PC + 1; fetch; wr

PC 1;
;

iload5

TOS = MDR; goto


Main1

TOS

istore1

H = LV

MBR ; LV H

istore2

MAR = MBRU + H

MAR = ,

istore3

MDR = TOS; wr

TOS
MDR;

istore4

SP= MAR = SP 1; rd

istore5

PC = PC + 1; fetch

PC 1;

istore6

TOS = MDR; goto


Main1

TOS

wide1

PC = PC + 1; fetch

wide2

goto(MBR 0x100)

wide_iload1

PC = PC + 1; fetch

MBR ;

wide_iload2

H = MBRU << 8

H = ,
8

wide_iload3

H=MBRU H

H = 16-

wide_iload4

MAR = LV + H; rd; goto MAR = , iload3


wide_istore1

PC = PC + 1; fetch

MBR ;

301

wide_istore2

H = MBRU << 8

H = ,
8

wide_istore3

H = MBRU H

H = 16-

wide_istore4

MAR = LV + H; rd; goto MAR = , istore3


ldc_w1

PC = PC + 1;fetch

MBR ;

ldc_w2

H = MBRU << 8

H = ,
8

ldc_w3

H = MBRU H

H = 16-

ldc_w4

MAR = H + CPP; rd;


goto iload3

MAR =

iinc1

H = LV

MBR ; LV H

iinc2

MAR = MBRU+H; rd

LV
MAR;

iinc3

PC = PC + 1; fetch

iinc4

H = MDR

iinc5

PC = PC + 1; fetch

iinc6

MDR = MBR + H; wr;


goto Main1

MDR;

goto1

OPC = PC 1

goto2

PC = PC + 1; fetch

MBR = ;

goto3

H = MBR << 8

8 H

goto4

H = MBRU H

H =16-

goto5

PC = OPC + H; fetch

OPC

goto6

goto Main1

iflt1

MAR = SP = SP 1; rd

iflt2

OPC = TOS

TOS OPC

iflt3

TOS = MDR

TOS

iflt4

N = OPC; if(N) goto T;


else goto F

302 4.
4.3 ()

ifeq1

MAR = SP = SP 1; rd

ifeq2

OPC = TOS

TOS OPC

ifeq3

TOS = MDR

TOS

ifeq4

Z = OPC; if(Z) goto T;


else goto F

if_icmpeq1

MAR = SP = SP 1; rd

if_icmpeq2

MAR = SP = SP 1

MAR

if_icmpeq3

H = MDR; rd

if_icmpeq4

OPC = TOS

TOS OPC

if_icmpeq5

TOS = MDR

TOS

if_icmpeq6

Z = OPC H; if(Z)
goto T; else goto F

, T; ,
F

OPC = PC 1; fetch;
goto goto2

, goto1;

PC = PC + 1

F2

PC = PC + 1; fetch

PC

F3

goto Main1

invokevirtual1

PC = PC + 1; fetch

MBR = ;
PC 1;

invokevirtual2

H = MBRU << 8

8
H

invokevirtual3

H = MBRU H

H = CPP

invokevirtual4

MAR = CPP+H; rd

invokevirtual5

OPC = PC + 1

PC OPC

invokevirtual6

PC = MDR; fetch

PC ;

invokevirtual7

PC = PC + 1; fetch

invokevirtual8

H = MBRU << 8

8
H

invokevirtual9

H = MBRU H

H =

303

invokevirtual10 PC = PC + 1; fetch

invokevirtual11 TOS = SP H

TOS = OBJREF1

invokevirtual12 TOS = MAR = TOS + 1 TOS = OBJREF ( LV)


invokevirtual13 PC = PC + 1; fetch

invokevirtual14 H = MBRU << 8

8
H

invokevirtual15 H = MBRU H

H =

invokevirtual16 MDR = SP + H + 1; wr

OBJREF

invokevirtual17 MAR = SP = MDR

SP MAR
, PC

invokevirtual18 MDR = OPC; wr

PC

invokevirtual19 MAR = SP = SP + 1

SP ,
LV

invokevirtual20 MDR = LV; wr

LV PC

invokevirtual21 PC = PC + 1; fetch

invokevirtual22 LV = TOS; goto Main1

LV

ireturn1

SP MAR

MAR = SP = LV; rd

ireturn2

ireturn3

LV = MAR = MDR; rd

LV ; PC

ireturn4

MAR = LV + 1

MAR
LV

ireturn5

PC = MDR; rd; fetch

PC;

ireturn6

MAR = SP

MAR TOS

ireturn7

LV = MDR

LV

ireturn8

MDR = TOS; wr; goto


Main1

304 4.

, .4.1, . CPP (Constant Pool Pointer


), LV (Local Variable ) SP (Stack Pointer
) ,
, PC (Program
Counter ) ,
. MBR (Memory Buffer Register
) 1- , , . TOS OPC . .
.
.
TOS (Top Of Stack )
, SP. ,
, ,
.
TOS, ,
. , POP , ,
TOS.
OPC . . ,
, ,
PC , . .
, , .4.3, , ,
( IJVM-).
Main1, ( ),
PC ,
. , MBR.
, , PC
,
MBR.
,
.
Mic-1,
. ,
, MBR.
, -, ,
, -, ,
, .
, , .
, ,
.

305

, .4.2 , , POP,
0x57, , DUP,
0x59. ( MAL , POP 0x57? , - .)
, , POP,
, ,
DUP. , , ,
, , .
,
, .
, , , MBR
0x60, IADD (. .4.2).
, , :
1. PC ,
.
2. MBR. IJVM-,
( IADD,
).
3. , MBR
Main1. , . . , ,
, .
,
.
, - ,
, .
MBR 0 (
NOP), nop1,
0. ,
, , MBR.
, , .4.3, , Main1
0 ( nop1). ,
NEXT_ADDRESS. ,
(, POP 0x57),
, .

306 4.

IADD. iadd1.
:
1. TOS ,
.
2. TOS ,
.
3. , ,
TOS.
,
MAR. , . ,
, SP.
, SP MAR, SP
1 .
(iadd1).
. , MPC
NEXT_ADDRESS iadd1. iadd2.
iadd2 . ,
, TOS H,
, .
(iadd3) MDR ,
. H,
MDR TOS. ,
, .
goto Main1 MPC,

.
IJVM-, MBR, 0x64 (ISUB),
. Main1
0x64 (isub1). isub2,
isub3, Main1. , isub3 H
MDR, .
IAND IADD ISUB,
( ),
. IOR.
DUP, POP SWAP, . DUP .
TOS, SP 1.
SP .
TOS. POP :
SP 1, .

TOS. , SWAP

307

, . TOS , ()
. .
BIPUSH ,
, .4.13.
. , MBR
Main1, 32 ( ) MDR. SP
1 MAR, .
TOS. ,
PC
1 , Main1
.

. 4.13. BIPUSH

ILOAD.
(.4.14,), ( ),
,
, . 1 ,
28= 256 , 256 . ILOAD (
), ( ).
, , MBR
( ), LV.
MBR LV B, LV
H ( iload1), MBR.
MAR, ( iload2).

. 4.14. ILOAD (); WIDE ILOAD


()

MBR , BIPUSH,
. ,
( BIPUSH, 8-
). MBR B
, . BIPUSH (
8- ) MBR
24 B. ILOAD (
8- ) 24 B

308 4.

. ,
(. .4.5). MBR ( bipush3), MBRU
( iload2).
( iload3),
SP 1 .
MAR ( ).
PC 1
( iload4). , MDR
TOS, ( iload5).
ISTORE ILOAD ( ,
LV ).
, ILOAD (. .4.14,),
0x15, 0x36. ( TOS), .
,
, , (
, ).
ILOAD ISTORE 256 . ,
,
. , IJVM
, JVM WIDE (
), ILOAD
ISTORE. , ILOAD
ISTORE ;
8-, 16- , .4.14,.
WIDE .
wide1, WIDE.
, , MBR,
wide1 ,
.
, , WIDE.
WIDE ILOAD ILOAD , WIDE ISTORE ISTORE ..,
,
Main1.
wide1
0x100 , MPC.
WIDE LOAD 0x115 ( 0x15), WIDE ISTORE
0x136 ( 0x36) .. , WIDE , 256 ( 0x100)
, . ILOAD WIDE ILOAD .4.15.
WIDE ILOAD ILOAD ,
. -

309

. 4.15. ILOAD WIDE ILOAD.


,
8 H. , MBRU (24
). (
, H
0), , .
H.
, ILOAD.
( iload3 iload5) ILOAD, wide_iload4 iload3. ,
PC 1 ,
. ILOAD
; WIDE_ILOAD
.
WIDE_ISTORE.
( wide_istore1 wide_istore4) , ISTORE ,
wide_istore4 istore3.
LDC_W. ILOAD . -, 16-
( ILOAD), -,
CPP, LV, ,
. (
LDC, IJVM,

310 4.

,
3 2.)
IINC , ISTORE, .
, .4.16.

. 4.16. IINC

,
. ,
( )
. , 8-
128 +127. JVM
, 2 .
GOTO. PC , IJVM-
, 16- ( ) GOTO.
, , PC
, ,
2 .
, .4.17,. , Main1.
MBR, PC . .4.17,
goto1. PC
1, MBR.
(.4.17,) PC, , OPC. ,
, PC GOTO.
OPC.
goto2 ,
, .4.17, ( goto3).
8 H,
goto4 (.4.17,).
, , H,
MBR, OPC. goto5
16-
, PC. , goto4
MBR MBRU,
. 16-
( ) . ,
Main1 , MBR
, . , goto6, ,
MBR.

311

. 4.17. :
Main1(); goto1( ); goto2(); goto3( ); goto4()

, goto, 16- 32768 +32767. ,


. , IJVM ( JVM).
, , , JVM
. , , ,
,
:
. .
.
( ), ,
else then 32,
50 Java.
: IFLT, IFEQ IF_ICMPEQ.

, 0 0 . IF_ICMPEQ
, .

TOS.

312 4.

. , TOS , ,
. IFLT. ,
, TOS, IFLT , TOS. iflt1.
iflt2 OPC,
TOS,
. iflt3 ,
MDR, TOS. , iflt4
( OPC) , N. ,
T, F.
, ,
GOTO, goto2. , (F, F2 F3),
(), Main1
.
ifeq2 ifeq3 , N Z. , F T , .
IF_ICMPEQ IFLT, . H
if_icmpeq3, .
OPC, TOS.
, if_icmpeq6 ifeq4.
INVOKEVIRTUAL IRETURN. IJVM-
IJVM, . INVOKEVIRTUAL
22
IJVM.
.4.10. 16-
.
. ,
4 , 16- .
( OBJREF . .4.10),
( ). 8- , 16-
.
, , PC
. ,
, PC ,
Main1 .
IRETURN .
, ,

313

.
SP, LV PC
, .4.11.


( ) .
: , , , , , .

.
, ,
, , .


.

,
. ,
:
1. , .
2. ,
.
3. , .
,
, , ( ) .
,
.
, ,
. . , PC
( , ,
),
PC , , , .
, . ,
PC ,
, , , .
, , , , PC
1. , .

314 4.

(8- PC MBR),
.
, .
, .

2- , H (, PC n ).
16 , , 16
, 32
.

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

315

.
.
,
. , ,
. ,
,
.
. .4.5.
, ,
, ,
4 . , .
. ,
, ( B) . ,
. ,
C .
, ,
, , .
,
. 5 ,
.
,
.
, .


Mic-1
,
. , ,
, . Mic-1 : 10 , (. .3.18), 32 , , ,
. 5000 ,
(), ().
, IJVM ,
. .
,
( ),
.

Mic-1 ,
IJVM-. . -
. , Main1

316 4.

MBR.
(
), .
. .
. , Main1.
( ),
(
). Mic-1
, .
.4.4
POP. , POP. , 4 :
POP .
4.4. POP

pop1

MAR = SP = SP 1; rd

pop2

,
TOS

pop3

TOS = MDR; goto Main1 TOS

Main1

PC = PC + 1; fetch;
goto(MBR)

MBR ;
;

.4.5 ,
pop2 . , ,
3 .
, , , IADD .
250 ( 4)
333 ( 3).
4.5. POP

pop1

MAR = SP = SP 1; rd

Main1.
pop

PC = PC + 1; fetch

MBR ;

pop3

TOS = MDR; goto(MBR) TOS;

317

POP , , , .
, ,
, .
, - , Main1 .
. ,
:

.
3-
?
, A B; , .
( )
. . ,
, ILOAD
(.4.6).
4.6. ILOAD

iload1

H = LV

MBR ; LV H

iload2

MAR = MBRU + H; rd

MAR = ,

iload3

MAR = SP = SP + 1

SP ;

iload4

PC = PC + 1; fetch; wr

PC 1;
;

iload5

TOS = MDR; goto Main1 TOS

Main1

PC = PC + 1; fetch;
goto(MBR)

MBR ;
;

, iload1 LV H.
, H MBRU iload2.

, H. 3- , .4.7.
ILOAD,
. .
:
2- 3- .

318 4.
4.7. ILOAD
3-

Iload1

MAR = MBRU + LV; rd

MAR = ,

Iload2

MAR = SP = SP + 1

SP ;

Iload3

PC = PC + 1; fetch; wr

PC 1;
;

Iload4

TOS = MDR

TOS

Iload5

PC = PC + 1; fetch;
goto(MBR)

MBR ;


,
. -
:
. , :
PC 1;
PC ;
;
;
, .
( ),
, .
, . PC ,
. ,
, , .
- ,
.
,
. ,
. , , . , ,
TOS MDR MDR TOS,
.
Mic-1 ,
. ,
(Instruction Fetch Unit, IFU), PC , . IFU ,
, . .

319

8- 16-
, , .
:
IFU , ,
, ,
.
IFU 8- 16-
, .
,
.
.4.18.
8- MBR MBR: 8- MBR1 16- MBR2. IFU
, . ,
MBR, Mic-1,
, ,
MBR1. Mic-1, B: MBR1 MBR1U.
32 , .

. 4.18. Mic-1

MBR2 , 2 .
B: MBR2 MBR2U, , 32 .
. 4- , 4-
,
, .

320 4.

MBR1 MBR2.
MBR1 , MBR2
2 ( ), 16- (. .4.14, ). MBR2
, IJVM-
.
, MBR1,
1 . MBR2 2 . MBR1 MBR2
.
, ,
. , MBR ,
.

(Finite State Machine, FSM), .4.19.
( ) (
).
, .
, , .4.18.
, ( 0 6
).

MBR1: MBR1
MBR2: MBR2
: 4

. 4.19.

.
.
MBR1. , , ( 1).
2 MBR2.
, 2 (, 2 0 -

321

5 3).
MBR1 MBR2. 0, 1 2, , (,
).
4.
,
, - ,
(, MBR2,
1 ,
). ,
,
. , PC
. .
.
,
IMAR , . ,
PC
. C,
PC PC
IMAR. PC
,
.
PC ,
.
, INVOKEVIRTUAL IRETURN.
PC
, PC .
? IFU , ,
MBR1 MBR2 ( )
. PC ,
1 2 , . , PC .
MBR .
, ,
. PC 1
2. IMAR 1 ( ). MAR, IMAR
: 0 IMAR 2 ..
.
, PC
, , , PC,
. , .
. , :

.

322 4.


Mic-2

. -, ,
. -,
PC. -, IFU
, 16- , -

. 4.20. Mic-2

323

16- 32- H.
.4.20 Mic-2
Mic-1, , .4.18.
.4.8.
4.8. Mic-2

nop1

goto (MBR)

iadd1

MAR = SP = SP 1; rd

iadd2

H = TOS

H =

iadd3

MDR = TOS = MDR + H;


wr; goto (MBR1)

isub1

MAR = SP = SP 1; rd

isub2

H = TOS

H =

isub3

MDR = TOS = MDR H; TOS


wr; goto (MBR1)
TOS 1

iand1

MAR = SP = SP 1; rd

iand2

H = TOS

H =

iand3

MDR = TOS = MDR H; wr; goto (MBR1)


TOS 1 TOS ( )

ior1

MAR = SP = SP 1; rd

ior2

H = TOS

H =

ior3

MDR = TOS = MDR H; wr; goto (MBR1)


TOS 1 TOS ( )

dup1

MAR = SP = SP + 1

SP 1 MAR

dup2

MDR = TOS; wr; goto


(MBR1)

pop1

MAR = SP = SP 1; rd

pop2

pop3

TOS = MDR; goto (MBR1) TOS

swap1

MAR = SP 1; rd

;
MAR SP

324 4.
4.8 ()

swap2

MAR = SP

swap3

H = MDR; wr

TOS;

swap4

MDR = TOS

TOS
MDR

swap5

MAR = SP 1; wr

TOS

swap6

TOS = H; goto (MBR1)

TOS

bipush1

SP = MAR = SP + 1

MAR

bipush2

MDR = TOS = MBR1; wr;


goto (MBR1)

TOS

iload1

MAR = LV + MBR1U; rd

LV
MAR;

iload2

MAR = SP = SP + 1

SP 1;
SP MAR

iload3

TOS = MDR; wr; goto


(MBR1)

TOS

istore1

MAR = LV + MBR1U

MAR
LV+

istore2

MDR = TOS; wr

TOS

istore3

MAR = SP = SP 1; rd

SP 1;
TOS

istore4

istore5

TOS = MDR; goto (MBR1) TOS

wide1

goto (MBR1 0x100)

0x100

wide_iload1

MAR = LV + MBR2U; rd;


goto iload2

iload1,
2-

wide_istore1

MAR = LV + MBR2U;
goto istore2

istore1,
2-

ldc_w1

MAR = CPP + MBR2U;


rd; goto iload2

wide_iload1, CPP

iinc1

MAR = LV + MBR1U; rd

MAR
LV+ ;

325

iinc2

H = MBR1

iinc3

MDR = MDR + H; wr;


goto (MBR1)

goto1

H = PC 1

PC H

goto2

PC = H + MBR2

PC

goto3

goto4

goto (MBR1)

iflt1

MAR = SP = SP 1; rd

iflt2

OPC = TOS

TOS OPC

iflt3

TOS = MDR

TOS

iflt4

N = OPC; if(N) goto T; else N


goto F

ifeq1

MAR = SP = SP 1; rd

ifeq2

OPC = TOS

TOS OPC
TOS

ifeq3

TOS = MDR

ifeq4

Z = OPC; if(Z) goto T; else Z


goto F

if_icmpeq1

MAR = SP = SP 1; rd

if_icmpeq2

MAR = SP = SP 1

MAR

if_icmpeq3

H = MDR; rd

if_icmpeq4

OPC = TOS

TOS OPC

if_icmpeq5

TOS = MDR

TOS

if_icmpeq6

Z = H OPC; if(Z) goto


T; else goto F

, T; ,
F

H = PC 1; goto goto2

, goto1

H = MBR2

,
MBR2

F2

goto (MBR1)

invokevirtual1

MAR = CPP + MBR2U; rd


MAR

invokevirtual2

OPC = PC

PC
OPC

326 4.
4.8 ()

invokevirtual3

PC = MDR

PC

invokevirtual4

TOS = SP MBR2U

TOS = OBJREF 1

invokevirtual5

TOS = MAR = H = TOS + 1 TOS = OBJREF

invokevirtual6

MDR = SP + MBR2U + 1;
wr

OBJREF

invokevirtual7

MAR = SP = MDR

SP MAR
,
PC

invokevirtual8

MDR = OPC; wr

PC

invokevirtual9

MAR = SP = SP + 1

SP 1; SP ,
LV

invokevirtual10 MDR = LV; wr

LV

invokevirtual11 LV = TOS; goto (MBR1)

LV

ireturn1

SP MAR

MAR = SP = LV; rd

ireturn2

ireturn3

LV = MAR = MDR; rd

LV MAR
;
PC

ireturn4

MAR = LV + 1

MAR LV; LV

ireturn5

PC = MDR; rd

PC

ireturn6

MAR = SP

ireturn7

LV = MDR

LV

ireturn8

MDR = TOS; wr; goto


(MBR1)

, Mic-2, IADD.
,
Main1 ,
PC .
, iadd3
MBR1, -

327

MBR1 MBR2. ,
. 2, . .
. IADD
.
Mic-2 , . LDC_W 9 3 , ,
, . , SWAP 8 , 6.
, ILOAD ( 6, 3), IADD ( 4, 3)
IF_ICMPEQ ( 13, 10 , ; 10, 8
, ). , , ,
, .

Mic-3
, Mic-2 Mic-1. ,
,
. , Mic-2 . ,
.
?
.
,
. , , ,
, ( ,
). .
.
Mic-2
. , ,
, .
,
.
.
, , . .4.2
. :
1. ,
A B.
2. , .
3. , .

328 4.

.4.21 3-
(), . .
,
.
, Mic-3.

. 4.21. Mic-3

329

? 3 :
A B, ,
C, - C . , ? (: .)
:
1. ,
.
2. .
, .
,
, . ( , ,
.)
,
-
- , ,
, . , ,
.
, . Mic-2
.
, ,
.
, Mic-3.
- . A, B C , . .4.9
Mic-2 ( SWAP).
4.9. Mic-2 SWAP

swap1

MAR = SP 1; rd

; MAR SP

swap2

MAR = SP

swap3

H = MDR; wr

TOS;

swap4

MDR = TOS

TOS MDR

swap5

MAR = SP 1; wr TOS

swap6

TOS = H; goto
(MBR1)

TOS

Mic-3. ,
: A

330 4.

B, C, . .
SWAP Mic-3 .4.10. 1
swap1, SP B. , A, 1 B,
ENA ( A) (. .4.1).
, . 2
. 3 MAR
, , .
, .
MDR 4. MDR
.
4.10. SWAP Mic-3
Swap1

Swap2

MAR = SP 1; MAR =
rd
SP
1

B = SP

C = B 1

B = SP

MAR = C; rd

C=B

MDR = Mem

MAR = C

Swap3

Swap4

H=
MDR =
MDR; wr TOS

B = MDR

C=B

H = C; wr C = B

Mem =
MDR

Swap5

Swap6

MAR = SP 1; TOS = H;
wr
goto (MBR1)

B = TOS
B = SP

MDR = C C = B 1

B=H

MAR = C; wr

C=B

10

Mem = MDR

TOS = C

11

goto (MBR1)

2. swap2
. 2 SP B, 3 , ,
MAR 4. . ,
,
.
, Mic-3 ,
Mic-2. , .
, 3 .
swap3, MDR
, MDR 5. , ,
, -

331

, RAW- (Read After


Write ). .
, .
swap3 , MDR ,
. .
,
, :
swap6 H ,
swap3. swap5, .
Mic-3 , Mic-2, . Mic-3
T, SWAP Mic-3 11T, Mic-2 6 3T , 18T.
, - .
, . .4.22
, .4.21.
, 1,
2 .. (, ). 1 1 ,
1. 2 , 1,
A B,
2, .
3 1 , A B
2, 3. , 4
4 .
1, 2, A B 3, 4.
5 , ,
4:
. 4 : ,
, .
, .2.3,,
(). , 4 ,
.
.4.22 ( ), ( ). 1 1
. 2 A
B. 3 . , 4
. , 4 ,
, .
.
, ,

332 4.

. 4.22.

, .
, ,
. ( 1 )
. ,
, . .
, .

Mic-4
, .

333

, , swap6,
, ,
.
.
( ) Mic-4. .4.23, , . Mic-3,
(IFU),
MBR.

. 4.23. Mic-4


. , IJVM-. () :
IJVM- .
IJVM- ,
, ,

334 4.

. 1 (, POP), ,
. 2 ,
, ,
.
WIDE, ;
, WIDE ILOAD WIDE_ILOAD.
, , , .
,
. , IJVM .
, , , wide_iload2 iload2, Mic-2, .
, .
(. .4.4),
NEXT_ADDRESS JAM ,
A. :
. ( ).
,
. .
JAM . ,
- ,
(, iflt4), .

. .
, , .
, .
.
,
. ,
IJVM-.
, IJVM-
. MIR,
. , : . A B , , C
, .
, 4
MIR .4.23. ( .4.2 w) MIR3 MIR4, MIR2

335

MIR3, MIR1 MIR2, MIR1 . MIR ,


. A B MIR1 , A B,
MIR1 .
MIR2;
A B. . C .
MIR4
, MAR
( MDR ).
Mic-4 .
IJVM- ,
N. , . . ,
. , .
, IJVM-, , ,
, .
,
, .
, ,
goto, [Dijkstra, 1968a].
Mic-1 , , Mic-4.
Mic-1 ,
. Mic-4 .
.4.24.
.4.23. Mic-4 , IJVM-,

.
, . ,
,
IJVM- ,
.

. 4.24. Mic-4

336 4.

MIR , , , MIR1. MIR ,


. MIR
, , .
,
, .
, ,
(CISC). ,
Corei7 Mic-4,
.


,
.
( ), .
,

. , , ,
, .
,
.
, , .
,
, .
, , ,
, . ,
80386 80486, Pentium
(, Core i7)
, .

. , ,
, ,
. , ,
.
,

.
80- RISC-, .
(IntelIA-64) 5.
.

337

, , .
-, ,
, .

-

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

( ),
( , ).
, .
. , ,
Mic-3, ,
, .
, , Mic-3, .

, .
-.
- 2, ,
. -, .
-.
( -). -
, -,
. Mic-1
: . ,
.
. - -
. ,
- . .4.25
-.

338 4.

(L1-I) (L1-D)
16 64. - (L2),
,
. - . - . 512 1. - (L3) , ,
,
, . ,
- - , - - .

. 4.25. -

,
-. ,
,
. , - ,
. ,
. , , , , .
,
- -. ,
.
- .
,

339

. (
4 64). , 0,
32 , 0 0 31, 1 32 63 ..
- .
, - ,
-. ( -),
, . -
( -), ,
-
. ,
-
, - .
-
- - .
- .4.26,.
- 2048 . ()
.
32 ( ), - 64.
- :
,
. , .

. 4.26. - (); 32- ( )

340 4.

16- ,

, .
.
32 .
-
. , , -.

4, .4.26,:
, .
, - , -.
, .
, ,
, . -,
32- , 0.
,
11 -
2048 . ,
-. , , . -.
- -
. -
, . - () ,
. -. 32-
-,
, . - , ,
.
, . ,
, -. ,
-, , ( ). - ,
, .

-. , - 64
. ,
64 (65536 ) , ,
- ( ). , X,
, X+ 65536 (
),
-. , -

341

. - , ,
,
, .
- , , , ,
1. ,

. , ,
,
. ,
.
-
,
. ,
-, .4.26,, 0
65536, , -
. , ,
- . - n n-
-. 4- - .4.27.

. 4.27. 4- -

-
, - , , n
1

- ,

. ,
. . . .

342 4.

-, , .
. ,
2- 4- - , .
-
.
-, ?
,
(Least Recenly Used, LRU).
, . , , LRU
, ,
. - , ,
, ,
.
2048- , 2048 .
,
2048 -. ,
- . ,
. ,
, 2048 .
2048 , LRU
. (,
.) , -
-, , .
.
, - . , -, ,
, -.
-.
?
,
LRU. .
. ,
, ,
. ,
,
, , .
: ,
- , -? ?
. ,

343

, -.
(write allocation). , , , -
, .
,
.

. [Sanchez and Kozyrakis, 2011; Gaur et. al, 2011].


. ,
.4.23, ;
.
,
, , .
, .
. 4.4. i 0 (,
). ,
k, .
4.4.
if(i==0)
k=1;
else
k=2;

4.5.
, , , 4.5,
. i .
Else ( else), i 0.
1 k.
.
Next. 2 k.
4.5. 4.4

Then:
Else:
Next:

CMP i, 0
BNE Else
MOV k, 1
BR Next
MOV k, 2

;
;
;
;
;

i 0
Else,
1 k
Next
2 k

, .
, , BNE, (,

344 4.

, ,
CMP).
,
.
, ,
BR Next 4.5, .
, , .
( , )?
. .4.23, ,
, . ,
, , , . ,
, ,
. (, UltraSPARCIII) ,
,
. (delay slot).
Corei7 ( , 4.5)
, .
- , , ,
NOP.
, .
. -, , -, ,
, . , , .
, 20%
, .
,
. , , ,
, .
, , , .
.
(, ). ,
. ,
, ,
, . , .
,
. . ,
. , ,

345

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

. ,
, ,
.

, , . ,
[Chen et al., 2003; Falcon et al., 2004; Jimenez, 2003; Parikh et al., 2004].
( ) , ,
. ,
. .4.28,.
. , ,
, ,
. ,
.
, .
.
-.
32- , ,
00. 2n
(). n+ 2
. n-
, , , ,
. -,
n+ 2 , (
). , .
, , .
/.
, , 4096 ,
0, 16384, 32768 . . ;

346 4.

. 4.28. 1- ();
2- ( );
()

. : 2-, 4- n- .
-, n- .
.
. , , ,
, ,
. , ,
.
, .
,
, . -

347

(.4.28, ): ,
, .

(.4.29).
00 , . , 01,
. ,
, 11, . ,
, ( ).
2 , 4, 8 .

. 4.29. 2-

, . .4.19
.
,
, ,
.
.
, .
, ( ),
( ,
). , ,
.
, .4.29,
, ,
. , ,
.4.28,. , , ,

348 4.

516, 4000,
4000 ( , ).
,
k , .
k- , , k-
, ,
. , .

, ,
, .
, . ,
,
.
, . :
for (I = 0; i < 1000000; i++) { ... }

, ,
.
, .
( ), , UltraSPARCIII,
( ),
. ,
, . ,
, . ,
, .
,
[Fisher and Freudenberger, 1992]. , ,
, . ,
; ,
, , .




, .2.5. ,
(IFU),
. , , .

349


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

() . , ,
, . , .
, , , , , ,
. .
8 , R0 R7.
:
, Mic-4. ,
n, n+ 1.
, ,
n+ 2.
, ,
n+ 3. ,
. 4 6 .
.4.11.
, ,
. ( ). , .
, , , , k+ 1
k, k+ 1
, k.
16 .
, .
. , , ,
, , .
(scoreboard), CDC 6600.
,

350 4.

, .
15, 4- . ,
, , 1. ,
1.
. ,
. 16 .4.11
.

, , . , ,
.
.4.11 1,
R0 R1 R3.
, ,
, R0 R1 , R3 .
R3 ,
1. ,
4. , ,
,
. 0.
,
,
1. R0 R2,
R4. , ,
:
1. - , (RAW).
2. , (WAR).
3. , (WAW).
(RAW-
), , , .
. , . WAR- (Write After Read ) ,
. WAW- (Write After
Write ) WAR-.
, - (, ).

3
3

1
1

18

17

16

15

R1=R4+R4

1
1

14

R3=R3R1

1
2

1
1

2
2

1
1

13

12

11

10

R1=R0 R2

4
5
4

R7=R1R2

1
2
3

1
2

1
1

1
1

1
1

1
1

R5=R0+R1
R6=R1+R4

1
2

2
1

3
4

R3=R0R1
R4=R0+R2

1
2

1
1

1
1

1
1

1
1

1
1

1
1

1
1

1
1

4.11.

352 4.

,
. 2 R0,
,
, 2 . 3
2.
4, R4. , , R4
(. 3 ). RAW-,
, R4
. .
, .
, , 5,
. ,
, .
, 3. 2,
( ), 3. R4 ( 4). ?
-
. ? ,
R4 ?
. , .
, .
, , - , ,
, [Moudgill and Vassiliadis, 1996]. ,
.
. 4
, 5 4,
5. , -
, , ,
.
6 6 ,
R1, R1 . 9. 8 , 15 - , .
.4.11 ,
.
: .
. .4.12
,
.

3
4

5
6

1
1

2
2
2
2
2

2
3
2

1
1

1
1
1
1

2
1

4
4
4
3
2

3
3
3

2
2

1
1

4
5
8

3
3
3
2
1

3
4
3

3
3

1
2

1
3

R3=R3S1
S2=R4+R4

5
6

R7=R1R2
S1=R0 R2

1
2

R5=R0+R1
R6=R1+R4

R3=R0R1
R4=R0+R2

7
8

1
2

1
1
1

3
2
2

1
1
1
1

1
1
1

1
1
1

1
1

1
1

1
1

1
1

1
1
1
1

1
1
1

1
1

1
1
1

1
1
1
1
1

1
1
1

1
1
1
1
1

1
1
3
3
3

4.12.

354 4.

3. 4 , 5,
.
. , 5 , 4.
.
, ,
. , , , ,
( ). , ,
,
.
68 .4.11. ,
6 R1
7. , ,
8 R1.
R1 6. ,
R1 ,
,
, .
.4.12
(register renaming). R1 6 ( 3) 7 ( 4) S1.
6 5.
,
. WAR- WAW.
8 . R1
S2, ,
R1, 6.
, R1,
S2 . , , ,
, .
, 8 .
( )
. ,
. , R0,
0 . R0 ,
R0 .
, .
.4.12. ,
.
: , .

355


, .
.
.
,
. (, if while),
.
.

, .4.30. - evensum oddsum (4.6).
, , .
4.6.
evesum=0;
oddsum=0;
i=0;
while (I<limit) {
k=i*i*i;
if(((i/2)*2)==i)
evensum=evensum+k;
else
oddsum=oddsum+k;
i=i+1;
}

. 4.30. ,
4.6

356 4.

, ,
.
, ,
. , .
LOAD,
. .
.4.30. , ,
evensum oddsum, .
LOAD k,
, ,
. ,
, LOAD ,
- ,
. , ,
, .
, , ,
.

,
.
.
, , , , ,
. 4.6 .4.30.
, k (
if), . , ,
, ,
. , ,

.
,
. , ? LOAD, - (, 256 ) ,
, . LOAD
, , , .
, , ,
, .
, ,
. (
, 6, -

357

LOAD .
,
.)

. SPECULATIVE-LOAD,
-, ,
.
, , ,
. ,
, .
:
if (x > 0) z = y/x;

x, y z . ,
,
( ) if. , x 0,
0. ,
.
, , , .
,
. ,
(poison bit).
, ,
. ,
( ).
, .


, ,
. , , ,
. , ,
, Corei7, OMAP4430 ATmega168.

Core i7
, Corei7 CISC- , 8-, 16- 32-
, 32- 64-
. 8 ,
. 117 . ,
, .

358 4.

, Corei7
RISC- . , , , . ,
Intel ,
. , Corei7 .
Sandy Bridge
Corei7, Sandy Bridge, , P4 P6.
Corei7 .4.31.

. 4.31. Corei7

Corei7 : ,
, . ,
.
Corei7
(L2), 3 (L3).
3 ,

. L2 Corei7 256;
8- - 64- .
L3 1 20. Intel,
. L3

359

12- 64- .
,
DDR3.
(
),
L1 , .
, . , /
.
(, 0x1000...0x1020...0x1040...),
, , , . ,
.
.4.31 , L1.
,
RISC . L1 ( ). L1 32, 8- -
64- . L1 , ,
.
CISC- RISC.
,
Intel L0 ( ). ,
, .
, ,
. , Intel
( ,
), Intel ,
. 80 %
.

. ,
,
. Corei7 . ,
.
, , .

, .

360 4.


, . ,

. ,
. ,
- ,
.
, ,
. , , ,
, (, ..).
, WAR- WAW-
.

, Corei7 ,
ISA-
.
.
,
. , .
.
Sandy Bridge Core i7
.4.32 Sandy Bridge,
. , . x86 .
, 1,5K .
6 .
, .
.
,
. , , , ,
. ,
.
, . , , -,
, -, ,
. .

361

. 4.32. Corei7

if
. , .

, BTB. BTB
. (,
). (, C++
switch)
BTB .
.
(
) , 168
(ReOrder Buffer, ROB).
, . , . , . ,
, .
, ,
; ,
.

362 4.

. 154 , 64
, 36 .
. ,
; , , . , , WAR- WAW.
160 , ,
.
RAW-
( ), ROB. ,
,
.

:
1. 1 .
2. 2 / .
3. 3, .
4. .
5. 1.
6. 2.

, Corei7 3 18 ; ,
.
,
,
.
. 1 , . 2
. 3 , .
.
, ,
,
.

128 . , . , ; ,
.
, (EAX, EBX, ECX, EDX
..),
, .

363

Sandy Bridge AVX (Advanced Vector


Extensions), 128- ,
( ,
). ISA
ISA- SSE SSE2.
256- 128- ? 128-
256- .
Sandy Bridge. 32-
, .
, .
, .
, 8- - 64.
; , .
.
,
(8 Sandy Bridge).
, ;
.
, ;
, , .
,
.
,

, . ( , )
.
, ; , ,
.
, , -

. 36 . ,
, .
(store-to-load forwarding). ,
.

364 4.

,
.
, , Corei7 ,
Pentium RISC-
. Pentium
, ( ) , , .
,
- .

Omap4430
OMAP4430 ARM CortexA9. Cortex A9 ,
ARM ( 7).
ARM Ltd;
. ARM , ,
( Texas Instruments).
Cortex A9 32- 32- 32- . , , 32-. Core i7 Cortex A9 RISC-.
,
CISC- . . ,
, .

Cortex A9
CortexA9 .4.33.
, Sandy Bridge,
Corei7,
. Corei7
. , . ,
, ;
- Cortex A9 (L2) 1 ;
Corei7,
(L3) 20 . ,
CISC-, .
.4.33 4-
32 32- .

365

. 4.33. Cortex A9
OMAP4430

ARM 4 , 8000
, Corei7.

. -
. 4000 ;
. ,
,
( , ),
( ).
,

.
, , . Corei7,
WAR-,
.
,
(, ).
.4.33,
.
.
, ISA, .
CortexA9
, . ARM VFP
SIMD, NEON.

366 4.

/ . .
32 , 4- L1 32- .
, (
).
,
, Corei7.
, .

,
.
L1 ,
L2. Cortex A9 L2 L1,
.
OMAP 4430
. : . 32-
LPDDR2. .
LPDDR2 26- 8 ,
32- .
LPDDR2 2 . OMAP4430 ,
4 .
32- 32- . Cortex A9
(.6) 4. ,
(Translation Lookaside Buffers, TLB).
, .
Cortex A9 OMAP4430
CortexA9 11 ;
.4.34. .
. Fe1 (Fetch 1 1).
.
, ,
,
, .
, Fe2
.
Fe3 ( ) .

367

. 4.34. Cortex A9 OMAP4430

De1 (Decode 1) De2


. ,
( ) ( ).
Re (Rename), WAR WAW . ,

.
.

368 4.

, .

.
Iss (Instruction Issue),
. ,
.
( ),
. Corei7,
CortexA9 , . .
.
Ex (Execute).
,
. ( L1),
. Ex :
1. 1 .
2. 2 .
3. .
4. SIMD (, VFP NEON).
5. .
Ex,
/ .
, Fe1 .
,
WB (WriteBack),
. ,
,
. ,
, , .

Corei7. , WB
L1.
Cortex A9 , Corei7.

ATmega168
Atmel ATmega168
.4.35. Corei7
OMAP4430. , , , .
ATmega168 , .
, ,
.

369

. 4.35. Atmel ATmega168

ATmega168 8- . , ,
-. .
32 8- ,
.
(, , , , ), .
, .
, .

.
ATmega168 .
1 8- .
AVR
8- ; 16- , 64 . EEPROM 1
, ,
.

370 4.

,
64 , .
AVR
(RAMPX, RAMPY RAMPZ), 8 . 16-
24- ,
16 .
: 64 ,
.
1964 IBM System 360 Model 30,
64 ( ). $250000, . ATmega168 $1 .
Boeing, ,
250000 50 .
, , .
, ATmega168 , (SPI) , . 8-
-, ATmega168 24
, , .. ATmega168
.
ATmega168
, , .
: . , .
, ,
.
, . ,
.
ATmega168 ,
, .4.35,
, . ATmega168 ( ),
, -, .
, ,
, .

i7, OMAP4430 ATmega168


,
, .
Corei7 CISC-,

371

Intel ,
. OMAP4430 RISC . ATmega168 8-
.
, .
, Corei7 OMAP4430
. , , .
. ,
- .
, . Mic-3 Mic-4, ,

, , . .4.22
.
.
Corei7 OMAP4430 ,
ISA- . Core i7
CISC-, 3- ,
. .4.32 . OMAP4430
,
. ISA RISC,
.
, Mic-4,
. Mic-4 Core i7.
, RISC-.
, , .
. Mic-4
,
. Corei7 , , - .
Mic-4 OMAP4430 ,
OMAP4430 RISC- ( 3- ).
, . ,
, .
Corei7 OMAP430, ATmega168 .
RISC, CISC,
.
, . ,
. ATmega168
Mic-1.

372 4.


. , , ,
, .

.
.
,
. , .
, ,
. , ( ). .
IJVM 1- , ,
(, ).
Mic-1.
,
,
.
:
2- 3- ,
, ,
.. Mic-1
,
. Mic-4, , 7- .
,
-. -
-
. -
( , ),
.
, Core
i7, OMAP4430 ATmega168, , . Cori7
ISA- , ,
RISC- ,
,
. OMAP4430, ,
, :
,
. ATmega168 .

373


1. ?
2. .4.5 B 4- , C
. ?
3. .4.5 . .
4. JMPC, MBR
NEXT_ADDRESS, . ,
JMPC, NEXT_ADDRESS
0x1FF?
5. , 4.1 if
:
k = 5;

,
?
6. IJVM
Java:
i = k + n + 5;

7. Java ,
IJVM:
ILOAD j
ILOAD k
ISUB
BIPUSH 6
ISUB
DUP
IADD
ISTORE i

8. , L2 256
:
if (Z) goto L1; else goto L2

L1 , , 0x40, L2
0x140? , .
9. if_cmpeq3 Mic-1
MDR H, TOS. , :
if_cmpeq3

Z=MDRTOS; rd

?
10. Mic-1,
2,5, Java-:
i = j + k;

374 4.

11. Mic-2,
2,5. , , Mic-2,
Mic-1 100?
12. Mic-1 , JVM- POPTWO.
.
13. JVM 1- 0 3,
ILOAD. IJVM,
?
14. ISHR ( ) JVM, IJVM.
().
.
0 31 , ( 27 ).
, .
ISHR 122 (0x7A).
1) ?
2) , IJVM.
15. ISHL ( ) JVM,
IJVM.
(). . 0 31 ,
( 2 ).
, .
ISHL 120 (0x78).
1) ?
2) , IJVM.
16. JVM- INVOKEVIRTUAL , . ?
17. JVM- DLOAD Mic-2. 1- , ,
. .
18. .
. , 4 2 ,
. (0, 0), ,
. (1, 0), , A
. (0, 0) (1, 0) A.
(0, 1), , B ,

375

(0, 1) B.
, .
19. . ,
, ?
, ?
20. , , .4.29.
.
21. , .4.18,
6 . 5- ? 4-?
22. .
. -
, , 12 ? , ?
, ?
23. Mic-2 if_icmpeq6
T, Z 1.
T , goto1. goto1
?
24. Mic-4 IJVM- , . ,
IJVM . IJVM- , ,
Mic-1. ?
25. ?
?
26. -. , 60 %
- - ,
35% - , 5% -. 5, 15 60 ,
-
, , (, - ,
- - ).
?
27. - , ,
. ?
?
28. .4.27 4- - 3- -.
, ,
3 , .

376 4.

, 4- -. ? .
29. . ?
30. . , 20% ?
.
31. ,
20. 4 ,
90%.
,
?
32. , , .4.11, 16 8.
6, R8 .
, 6?
33. . - WAW-,
? ?
34. Mic-1 , LV
, .
35. 1- -
. .
.

5.

(ISA).
.1.2,
.
.
, ( )
.
:
. ,
,
, C, C++, Java , .
. ,
,
, .
, , ,
;
.
. , , . .5.1 ,
.

. 5.1.

378 5.


, ,
,
. - , (,
),
. , - (,
, ),
,
. , ,
.
. . , , : ? :
? :
? ,
. ,
.

, ,
.
.
, .
, , - ,
.
,
, .., ,
.
, .
,
.
.
.

25%. ,

.
, (,

379

) .
, .
? . -, , ,
.
,
.. ,
, . ,
,
,
.
-,
, . , . ,
,

. ,
,
( ), (
).



,
. , .
, ,
.


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

380 5.

, , ..

.
, , ,
.., , . ,
; , .
, , ,
, , , . ,
,
, . ,
,
.
, ,
. , ARM v7 ( 7 ARM ISA) ,
ARM Ltd. ,

.
ARM ,
ARM,
. ,
, ARM (
). , , , ,
.., , .
,
, , , .
, , , , , . ,
, , ,
, :

.
:

.
, -
; , . ,
.

381

, ARM v7 ,
,
ARM .
IA-32
( x86) Intel , Intel- .
, ,
. 1990- Intel IA-32.
- ,
, , Intel
.
Intel - Intel
(http://developer.intel.com). Intel
Corei7 4161 ; ,
Corei7 .
,
, , .
.
.
. (, ,
-).
.


, .
8, 1 60 (. .2.1).
8 ( ). 8- , ASCII- 7,
( ) .
, Unicode UTF-8 , 8.
4- (32-) 8-
(64-) , . ,
. , 4- 0, 4, 8
.., 1 2. 8
0, 8 16, 4 6. 8-
.5.2.
,
. , Corei7,
8 DDR3,
64- . , Corei7
, ,
8.

382 5.

. 5.2. 8 : ();
( ). ,


. Corei7 , , 8088
1, ,
8- . Corei7 4- 7,
, 0 7, 8
15. 4 16,
, , 4-
. , .

, .
,
, . : ,
8088 ?
: .
,
0 - , 232 264.
, 8 8
.

383

, , .
-, 32-
232 232 . -,
, , ,
. ,
,
.
,
, - .
,
, : . -
, -
.
. ,
LOAD, STORE,
. , 4, .
, , ,
. ,
,
.
. ,
, , .
,
( ,
).
,
, ,
SYNC, , .
, , ,

.
,
(, , RAW- WAR-),
. (
, ), .
, , , - .. , ,
.

384 5.

, . ,
, .
, (, TOS MAR
.4.1), ,
, , . , ,
, .
: .
, ,
.
.
,
( ). RISC-
() 32 ,
.

. , R1,
R25. .
. , Corei7 EDX,
, ,
, (
).
,
. ,
, .
R1, , R1 ,
,
R1 .
- , , , ,
.
, ,
, . , , -,
. , .

385

, . PSW (Program State Word


), . , .
.
:
N (Negative);
Z 0 (Zero);
V (oVerflow);
(Carry out);
A 3 (Auxiliary carry );
P (Parity).
, . , CMP
.
, 0, Z.
BEQ (Branch Equal ) Z , .
.
.
(, ), ( ), ,
.
,
(, , ).

, ,
. .
LOAD STORE,
, MOVE,
. ,
.
4 (. .4.2.), .

Core i7
: IA-32
Intel ( Corei7), ARM v7 ( OMAP4430) 8- AVR,
ATmega168.
.
,
. Corei7.

386 5.

Corei7 .
1, .
, 8086 8088 ( ), 8080 8- , 70-
. 8080, ,
8008, 4004 (4- , ).
8086 8088
16- ( 8088 8- ).
, 80286, 16-.
,
, 16384 64- ,
230- .
80386 32- ,
Intel. (80486, Pentium, PentiumPro, PentiumII,
PentiumIII, Pentium4, Celeron, Xeon, PentiumM, Centrino, Core 2 duo, Corei7
..) 32- ,
IA-32, .

80386 x86 MMX, SSE SSE2.
. 64- x86 ( x86-64),
64 . Intel,
, AMD.
Corei7 3 ,
8088. ,
8088, , Corei7 8088.
.
Intel ,
,
( , ,
, ..).
8086,
, 8088,
. 8088,
, 8088,
, , .
Windows MS-DOS,
8086
Windows DOS-.
, Corei7
Corei7, 8088. 4
, (PSW). 0 -

387


. .
3 . ,
- .
12 .
Corei7 . 16384
, 0 232 1.
( UNIX Windows)
,
232,
. . 32 .
( ).
Corei7 .5.3.
EAX, EBX, ECX EDX 32-. ,

. 5.3. Corei7

388 5.

. EAX ; EBX ( ); ECX


; EDX
EAX 64- .
16 8
168- ,
16- 8- . 8088 80286
8- 16- , 32- 80386
E (Extended ).
,
. ESI EDI
: ESI , EDI .
EBP
, LV
IJVM. . ,
ESP .
CS GS .
, 8088,
16- 220 . ,
Corei7 32- , . EIP
(Extended Instruction Pointer )
. EFLAGS .


OMAP4430I
ARM 1985 Acorn
Computers. , 80-
[Patterson, 1985; Patterson and Sequin, 1982]. ARM
( ARM2) 32- 26- . OMAP4430 ARM Cortex A9,
7 ARM,
. OMAP4430,
, ARM Cortex A9, .
OMAP4430
232. ( ); ,
.
, (little-endian) ,
(big-endian) .
, ,
, , ,
, . 32-
ARM ,

389

ARM (, )
232 . -, -
.
( ) ARM ARM 8
64- .
,
. , ,
. - , , 32- 4 ,
.
ARM ,
, .

( R15), ,
R15. ,
, ,
.
ARM : 16 32- 32 32-
( VFP).
R0R15, . .5.1.
5.1. ARM 7

R0R3

A1A4

R4R11 V1V8

R12

IP

( 32-
)

R13

SP

R14

LR

( )

R15

PC

32-;
.
, .5.1, ,
. , ,
,
ARM. ,

. ,

390 5.

, , ,
,
.
Vx , ,
, .
Ax , . , .
. IP
ARM (BL),
232 . ,
, IP. SP
, . LR
. PC
;
. ARM , PSR (Program Status Register)
. ,
, .
ARM ( VFP) 32 32-
. 32
, 16 64-
. ; ARM
.
ARM . , , , LOAD () STORE (),
.

( ),
( ).

ATmega168
ATmega168.
Corei7 ( ) OMAP4430 (
, ), ATmega168
( )
, .
ATmega168 .

391

ATmega168
. 8051 , .
. 16 1
. ,
,
.
, .
,
.
(ATmega48) 4 -
512 . -,
.
,
. ATmega88
: 8 1 .
ATmega168
.
; ,
. - .
, (
), ,
(
, -
). ,
.
- ,
.
: ,
. pple TiVo
, .
ATmega168 32 8- .
5- , . R0 R31.
ATmega168 :
. 0 R0 0.
R0, 0,
R0. 1 R1 ..,
R31. . 5.4.
32 , 3295, 64 ,
-,
.
4 8 , ATmega168
, .5.4.
( ): , ,

392 5.

. 5.4. ATmega168

, , , .
, , .
I /
. I 0, .
.
, , .
. I, .
SP ,
PUSH POP ( Java 4). - 80. 9-
1024 ,
.


.
, , , .
- .
. .

. ,
, -

393

. ,
, . , ,
,
, (
). , ,
.
, .
,
(
). 32- , 232 ( 4 ).
32- , 64 . ,
,
, .
, , . , .


: .
.
: 8, 16, 32 64 . (, , ),
(, ), .
, .
.
, .
, .
: ,
32- 0 2321 . , ,
2311, .
(, 3,5) . . 32, 64,
128 .
.
.
( COBOL)
. ,
COBOL,

394 5.

, (- ).
,
. 3.
. ,
2000 - COBOL, ,
(8 ),
16- 8- ,
(256), -
(100). !


,
,
.
, , .
. ,
. ASCII Unicode.
7- 16- .
2.
, . .
.
, , .
, . : .
: 0 , 1 ( ). ,
, ,
. :
0 , .
,
, 32- 32 . ,
. ,
,
. n ,
n .
, . . Mic-x
SP, PC, LV CPP .
( ILOAD)
.

395

,
. .

Core i7
Corei7 , ,
- IEEE
754 (.5.2). 8/16- ,
32- , , . , 64- ,
64- .
,
4 , .
5.2. Corei7

16

32

64

(64-)

(64-)

Corei7 8- ASCII-: .
, , ,
.
.

OMAP4430
OMAP4430 (.5.3). 8-, 16- 32- . OMAP4430
, Corei7. OMAP4430
32- 32- .
(, : LDRSB).
32- .
.
. , 32 64 , IEEE 754 ( 32- 64- ). -
. .

.

396 5.
5.3. OMAP4430

16

32

64

ATmega168
ATmega168 .
, 8 .
, , 8- (.5.4).
5.4. ATmega168

16

32

64

ATmega168 16- . 16- X,YZ


8-
R26/R27, R28/R29 R30/R31 . X, Y Z , 1.


,
, , . , (
), .
.5.5 . .
, , .
,
. , ,
. , , ,
, . .5.6
.

397

. 5.5. : ();
(); (); ( )

. 5.6.


,
. .
, 40 .
, , ( ,
) .
, .
, ( 20 ) . ,
,
( IJVM), ,
( OMAP4430). , ,
,
:
20 ?
20 ?
,
20 , .
.

398 5.

, . ,
, ,
, .
. ,
n 16- ,
, n 32-.
, , , , , .
,
. ,
.
,
: ( , ).
.
, .
.
,
-.
- t /, r , -
t/r . , ,
, . , ,
( ), . , .

, . - ,
.

. , 2n
, n .
, ,
. ,
, .
. 8- ,
232 . 8, 16, 24 32 .
, ,
, ,

399

8- , , 32- .
232 0, 1, 2, 3,, 4294967295.
230 0, 1, 2, 3,, 1073741823.
, , 32- ,
, ,
. , , . 8- ,
, ,
.
32- ,
230 , 30 ,
8- 32
. , .

. , 32-
16 - 4.
,
, , . ,
(, Burroughs B1700). ,
(, CDC Cyber 60-
).
, ,
- , . , ,
, , . ,
Corei7 8 , - 64 .


, .
, .
n+ k k n .
2k 2n . n+ k k 1
n+ 1 . ,
, , .
k+ 1 n 1 ,
, .

.
.

400 5.

.
, 16 , 4 ,
.5.7. , 16
( , 4- ),
. 4- , 16 .

. 5.7. 4-
4-

15 , 14 ,
31 16 ,
0 14 , 15
- (.5.8).
, 15 8 15, 12 15.
0 3 4 7, , . 14 1111 0000
1101 8 11. 1111 1110 1111 8 11 . , 4 15.
32 . 31,
111111111111 , 0
15, 16 .
, :
4- , 8-, 12-, 16-.

.
, .
. ,
, ,
- . ,
,
.
,
, ,
. , ,
.
(, Intel432),
.

401

. 5.8. 15 ,
14 , 31 16 .
xxxx, yyyy zzzz 4-

. JVM, , ,
.

402 5.

Core i7
Corei7 .
, (
.5.9). - ,
. -
. ,
, . ,
, ,
.

. 5.9. Corei7

Intel 1 ,
. ,
, .
WIDE IJVM. ,
- Intel ,
, 0xFF, ,
.
Core i7
. , ,
, , ,
( ) .
, , , ,
, . ,
.

403

,
, , . 8 2- MOD
3- REG R/M. 3
, 11
. 2- ,
4
.
EAX, EBX, ECX, EDX, ESI, EDI, EBP, ESP,
, . , SIB (Scale,
Index, Base , , ), . ,
,
.
, 1, 2 4
(), 1, 2 4 , ( ).

OMAP4430
OMAP4430 16- 32-
, . . . ,
, . 16-
32- .
,
( ), 8 .
ARM ARM
Thumb.
3-, 8-, 12-, 16-
24- . LOAD ( 8- )
.
.
32- ARM . 5.10. , (,
LONG MULTIPLY SWAP). SWAP ,
SWAP , , MUL .
Thumb .
21 , . (
,
RISC-?) ,
, .

404 5.

. 5.10. 32- ARM

26 27 , ,
. , 26 27 , 25
( ), ( MULTIPLY BRANCH EXCHANGE),
. 25 1,
, 0 4095.
.
16 , .
32-, 32-
. MOVT 16 32- , ,
16 . .
32- ( 28 31)
4- . , . , ( )
. ARM
(PSR),
(, , ..).
, .

,
. :
24 . 3-
. , .
, 225.

405

, ARM
,
( ) .
, 16- 32- .

ATmega168
ATmega168 (.5.11).
. 1
, ,
. , ADD
.

. 5.11. ATmega168 AVR

2 16 , 16
5- . , ,
1. , ,

. , .
3 8-
. 16- , ( ),
R16R31 ( ).

406 5.

, ,
(SUBCI, SUBI, ORI ANDI).
4 6- . , ,
/.
5 6 .
12- , PC . 22 , AVR 32 .

,
- . , , .


,
. . ,
.


, - , ,
. ,
; ,
. R1 4 .5.12.

. 5.12. 4 1


. . -, . -,
. .


.
. ,
:
. ,

407

. ,
, . ,
. ,
, , .


, . ( ),
.
, (, ), .
. (, ARM OMAP4420) .
, ( LDR)
( STR).

.



, , , . ,
. ,
, . ,
, , , .
,
, ,
1024- R1 . - , R2, , , R3, . 1024
4 . A,
A+ 4096. ,
, 5.1.
5.1.

LOOP:

MOV
MOV
MOV
ADD
ADD
CMP
BLT

R1,#0
R2,#A
R3,#A+4096
R1,(R2)
R2,#4
R2,R3
LOOP

;
;
;
;
;
;
;

R1, 0
R2 = A
R3 = A
R2
R2 (4 )

R2 < R3,

408 5.

.

() (,
#). R2 A,
A. #.
R3 .
, -
. .
, . BLT ,
8- , BLT. ,
. ,
Corei7,
,
Corei7 (MASM) 8088.
. A
R1, :
ADD R1, A

4. ,
:
ADD R1, A + 4

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


. IJVM,
LV.
.
IJVM
(LV) ,
.4.14,. :
. , ,

409

. AB
1024 . AiBi ,
1024 , ,
, .
A , B ,
, ,
(. 5.1). , ,
, , 5.2.
5.2. ,
1024
MOV R1,#0
MOV R2,#0
MOV R3,#4096
LOOP:

MOV R4,A(R2)
AND R4,B(R2)
OR R1,R4
ADD R2,#4
CMP R2,R3
BLT LOOP

;
;
;
;
;

R1,
0
R2 = , i
A[i] B[i]
R3 =

; R4 = A[i]
; R4 = A[i] B[i]
; i = i + 4
; ?
; R2 < R3,

4 :
R1 ;
R2 i, ;
R3 4096 ( i);
R4 .
.
LOOP Ai R4.
. (R2) ( A) , .
,
. ,
,
:
MOV R4,A(R2)

R4 , A , R2 . A ,
, 124300, ,
.5.13.

. 5.13. MOVR4,A(R2)

R2 0 (
), A0
124300. R4. -

410 5.

R2 4, A1
124304 ..
, ,
, .
,
, ,
.


, (
). .
, . .
A R5, B R6.
LOOP:
LOOP:

MOV R4,(R2+R5)
AND R4,(R2+R6)

, . 8-
, .
32 , ,
. 8- 16- .


,
. . 4,
, IADD, . .

(x+ y), (xy+).
. ,
. (1958), .

. -,
. -,
. -, , . , , a b + c, , (a b)+ c,
a (b+ c), ,
.
? ? .

411


. ,
. (E.W.Dijkstra). ,
, +, , *, /,
. ,
.
.5.14 - , . . ().
,
. , , . ,
,
, .

. 5.14. ,

.5.15 ,
. ( ) .
:
1. .
2. , ,
.
3. , , , ,
( , ).
4. . , ,
, .
5. . .
.

412 5.

. 5.15.

,
( , , ), ,
. ,
4. , ,
, .
. .
,
. .5.5
.
5.5.

A + B C

ABC+

A B + C

ABC+

A B + C D

ABCD+

(A + B)/(C D)

A B + C D /

A B/C

ABC/

((A + B) C + D)/(E + F + G)

AB+CD+EF+G+/


. n ,
, .
: . ,
. , .
5.6 IJVM :
(8 + 2 5)/(1 + 3 2 4)

413

:
8 2 5 + 1 3 2 + 4 /
IMUL IDIV.
( ). ,
( ).
, IDIV : , , .
, IJVM- :
,
.
, , ,
.
5.6.

825+132+4 /

BIPUSH 8

25+132+4 /

BIPUSH 2

8, 2

5+132+4 /

BIPUSH 5

8, 2, 5

+132+4 /

IMUL

8, 10

+132+4 /

IADD

18

132+4 /

BIPUSH 1

18, 1

32+4 /

BIPUSH 3

18, 1, 3

2+4 /

BIPUSH 2

18, 1, 3, 2

+4 /

IMUL

18, 1, 6

10

+4 /

IADD

18, 7

11

4 /

BIPUSH 4

18, 7, 4

12

ISUB

18, 3

13

IDIV


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

414 5.

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


.
.
,
. ,
, (FP), (SP)
(PC).
32-
(.5.16). 256 . 1 ()
(). .

. 5.16.

8-
. ,
,
. , 23,
2 , , 13- . LOAD STORE

.

415

(, ), 3 .
, () ,
.., 24 . , ,
32.
LOAD STORE, 3 .
(, LOAD STORE
R0), .
,
(.5.17). , ,
.
,
,
, . PDP-11
VAX, ,
- .

. 5.17.

8- , 12
. 3
, 5 4 . 3
, , ,
,
, , ,
. ,
, , .
, . PDP-11 VAX
.

32- , .
,
, 96
3 ( ).
RISC- 96 ,
, , , 4 ( ).

416 5.

, .5.17, .
32- ,
i j 16 ,
:
i = j;

, 16,
32- . 8- 4- ,
, , .
,
.

Core i7
Corei7
16- 32-. 16- , 32-.
, , , , . ,

. .
.5.10, . MOD
R/M.
REG. .5.7 32 2-
MOD 3- R/M. , 0,
, EAX.
5.7. 32- Corei7
(M[x] x)
MOD

R/M 00

01

10

000

M[EAX]

M[EAX + 8] M[EAX + 32] EAX AL

001

M[ECX]

M[ECX + 8] M[ECX + 32] ECX CL

010

M[EDX]

M[EDX + 8] M[EDX + 32] EDX DL

011

M[EBX]

M[EBX + 8] M[EBX + 32] EBX BL

100

SIB

SIB 8

101

M[EBP + 8] M[EBP + 32] EBP CH

110

M[ESI]

M[ESI + 8]

M[ESI + 32]

ESI DH

111

M[EDI]

M[EDI + 8]

M[EDI + 32]

EDI BH

SIB 32

11

ESP AH

01 10 , 8- 32- , -

417

. 8- ,
32- . , ADD R/M= 011,
MOD= 01 , 6, EBX 6
.
EBX .
MOD= 11 .
, .
, . ,
EBP ESP.
MODE SIB (.
.5.9). SIB .
SIB
1, 2, 4 8 ( SCALE),
, , 8- 32- , MOD.
, .
, SIB, . Java-:
for (i=0; i<n; i++) a[i]=0;

a 4- , .
EBP ,
, .5.18.
i EAX. a[i]
SIB,
4EAX, EBP 8. a[i] .

. 5.18. a[i]

? . ,

. , , ,
-
.

418 5.

. - ,
, , . ,
8088 - , , 20
, . , - , - .

OMAP4430
OMAP4430
, , . 5 ,
.
12- . ,

.
: (LOAD)
(STORE). . ,
.
13- . PC 13- . ,
,
.

ATmega168
ATmega168 .
. ,
. , . 8-
.
.
, ,
. 16- 7 (,
0 127). AVR 32- ,
16- , 64 .
, .
8 ,
16- .
64 . :
X, Y Z, R26/R27, R28/R29 R30/R31 .
, X, 8- R26 R27, .

419


Corei7, OMAP4430 ATmega168 . 5.8. ,
.
5.8.

Corei7

OMAP4430

ATmega168 AVR


. , , ( ATmega168),
. :
, .
,
.
,
. , , .
( , )
, .
,
,
.
, .
, ,
, , ,

.


, ,
, .
, , , ,

420 5.

, ,
, .
, , .


.
, . . ,
- - , ,
,
-. , 2000
- , ,
, 2000.
,
.
,
. : .
,
B, A, :
A = B


. , , . ( )
( ), 4
.
4, . LOAD , STORE
, MOVE
,
.
- ,
.
.
.
( )
.
(
), . , , , .
,

421

,
, ,
.


.

. ,
. , , .
.
16 , 16
.
, ; , -.
.
32 , 8- . ,
, . ,
, 8 , 24
( ).
, , , , .
.
A:
10110111 10111100 11011011 10001011

B ():
00000000 11111111 00000000 00000000

A B:
00000000 10111100 00000000 00000000

16 ,
.
.
. 8 32- , 24 ,
8 ,
.
A:
10110111 10111100 11011011 10001011

B ():
11111111 11111111 11111111 00000000

A B:
10110111 10111100 11011011 00000000

422 5.

:
00000000 00000000 00000000 01010111

(AB)C:
10110111 10111100 11011011 01010111

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

, .
: ,
.
, IEEE754.
.


.
, , ,
.
.
. ,
, , , . , ,
, .
:
A:
00000000 00000000 00000000 01110011

A 2 :
00000000 00000000 00000000 00011100

A 2 :
11000000 00000000 00000000 00011100

.
n- k ,
, n k .
. ,
, ,
(0 1) , .

423

, , . 2 :
A:
1111111 11111111 11111111 11110000

A :
0011111 11111111 11111111 11111100

A :
1111111 11111111 11111111 11111100

2. k ,
, 2k.
k , , 2k.

. 18n, n .
18n = 16n + 2n. 16n n
4 . 2n , n 1 .
18n. ,
, ,
, . ,
,
.

. , , 1 .
1 3. 1
7:
1 :
11111111 11111111 11111111 11111110

1 1 (3):
11111111 11111111 11111111 11111100

1 2 (7):
11111111 11111111 11111111 11111000


2.
.
1 .
6 1, , 1/64 0:
1 :
11111111 11111111 11111111 11111111

1, 6 , 1:
11111111 11111111 11111111 11111111

424 5.

, ,
, .
2.
. ,
,
; ,
.
, :

.
,
. ,
.
. CLR
, ( 0).
.
ADD INC.
NEG. X
0 X, ,
NEG.
NEG NOT. NEG ( ,
0). NOT . , , , . (
NEG
, 1.)
,
, .
, .
,
.


.
x. , ,
. x,
.

, -

425

.
,
. , ( ).
.
(LABEL), 1 (
), , LABEL,
0 ( ),
, .
, ;
, , 1
, .

, .
, 1, (,
). .
( ).

. 1 ,
0 , , 1.
, ,
, 0.
, , .
,
, , ,
. Z .4.1
: ,
.
, , . , :
,
. ,
, . ,
- , .
, .
,
, ,
.. Corei7,
OMAP4430 ATmega168 AVR.
.
, .

426 5.

, , .
, , .
.
, ,
. 3-
. :
: 000, 001, 010, 011, 100, 101, 110, 111.
: 100, 101, 110, 111, 000, 001, 010, 011.
0 7,
4 +3
( ). : : 011
100? , .
.


,
. ,
. C , . Java
. ,
,
. , -
- ,
, .
: ,
.
. , ,
.
, .
, ,
. ,
. ,
, .
( , ,
, .) , A
B, B C, C A (, , ),
.
CDC 6600

427

1960- . 6600 FORTRAN, , . ,


.
.
. ,
.
. .
;
,
.
IJVM (..4.9).


, .
, -
. , . .
, .
,
, .
, , . 5.3. ( Java,
goto.)
5.3.
L1:

i = 1;
;
.
.
.
;
i = i + 1;
if (i<n) goto L1;

, n0.
, . . n , n , .
, , ( )
. n 0,
, .

428 5.

5.4 ,
n0. , ,
,
.
5.4.
L1:

i = 1;
if(i>n) goto L2;
;
.
.
.
;
i = i + 1;
goto L1;

L2:

,
:
for (i = 0; i<n; i++) { }

n, ,
n0, , 5.4.
, n > 0 (, ,
n), , 5.3. - FORTRAN ,
.
( 5.3). 1977 , FORTRAN ,
,
. C Java
.

-
,
-.
-:
- ;
- ;
- .
.
- . ,
, ( ). .
-.
-

429

. .
1- , .5.19. :
. : .
. - ,
4
, . -, IN OUT. -

.

. 5.19.

.
, . 6, . ( ). -

, 7 1. , ,
. .
. ,
, ,
. ,
, . ,
.
, ,
. ,
, .
- Java (5.5). :

430 5.

, , , ( ). , .
,
. in out
, . ,
, .
128 ( 7 ) 7,
.
5.5. -
public static void output_buffer(int buf[], int count) {
//
int status, i, ready;
for (i = 0; i<count; i++) {
do {
status = in(display_status_reg); //
//
ready = (status >> 7) & 0x01;
//
//
} while (ready == 1);
out(display_buffer_reg, buf[i]);
}

- ,
,
. .
(, , ), (
). - ,
,
-.
, ,
-,
.
.5.19. , ,
-.
, .

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

431

-
-, . , -
.
-, - .
.5.20.
(), .

. 5.20.

4 . .
, . .
- -, . ,
.
32 100 (,
4), 32, 100 4
, (, 1) , .5.20. , ,
, 100 , ,
. ,
4 -,
.
1 1.
,
-.

432 5.

0, .

, - ,
. .
2, 3 , .
, - ,
, ,
, .
(
, - ) .
, ,
, , ()
.

Core i7
: Corei7, OMAP4430 ARM ATmega168 AVR.
, , ,
. Corei7
. .
Corei7 32- , , 8088. .5.9
,
:
SRC ;
DST ;
# , ;
LV .
5.9.
Corei7


MOV DST, SRC

SRC DST

PUSH SRC

SRC

POP DST

DST

XCHG DS1, DS2

DS1 DS2

LEA DST, SRC

SRC DST

CMOV DST, SRC

433


ADD DST, SRC

SRC DST

SUB DST, SRC

SRC DST

MUL SRC

EAX SRC ( )

IMUL SRC

EAX SRC ( )

DIV SRC

EDX:EAX SRC ( )

IDV SRC

EDX:EAX SRC ( )

ADC DST, SRC

SRC DST

SBB DST, SRC

DST SRC

INC DST

( 1) DST

DEC DST

( 1) DST

NEG DST

DST ( DST 0)

-
DAA

DAS

AAA

ASCII-

AAS

ASCII-

AAM

ASCII-

AAD

ASCII-


AND DST, SRC

SRC DST

OR DST, SRC

SRC DST

XOR DST, SRC

SRC DST

NOT DST

DST 1


SAL/SAR DST, #

DST / #

SHL/SHR DST, #

DST / #

ROL/ROR DST, #

DST / #

RCL/RR DST, #

DST #


TST SRC1, SRC2

CMP SRC1, SRC2

SRC1 SRC2


JMP ADDR

Jxx ADDR

434 5.
5.9 ()

CALL ADDR

RET

IRET

LOOPxx

INT ADDR

INTO


LODS

STOS

MOVS

CMPS

SCAS


STC

EFLAGS

CLC

EFLAGS

CMC

EFLAGS

STD

EFLAGS

CLD

EFLAGS

STI

EFLAGS

CLI

EFLAGS

PUSHFD

EFLAGS

POPFD

EFLAGS

LAHF

AH EFLAGS

SAHF

AH EFLAGS


SWAP DST

DST

CWQ

EAX EDX:EAX

CWDE

16- AX EAX

ENTER SIZE, LV

LEAVE

, ENTER

NOP

HLT

IN AL, PORT

OUT PORT, AL

WAIT

435

, , ,
(, 8- ). ,
Corei7.
Corei7 ,
. , ADD
, INC 1.
. ,
, ,
. .
(SRC) , (DST) . , , , ;
, .
: 8-, 16- 32- . / .
.5.9 32- .
. , :
, . . 64-
: EAX ( )
EDX ( ).
- .
4- . ( 0 9). 1010 1111
. , 16-
0 9999. ,
, . - .
COBOL.

.
,
. EFLAGS. Jxx
,
( EFLAGS).
Corei7 , , ,
. REP (repetition ),
,
(, ECX, 1
, 0). ,

436 5.

(, ..)
. .
,
. , , .
Corei7 . (REP) . ,
( WIDE IJVM). , REP
, , , ECX
0. REPZ REPNZ
, Z 1 0 . LOCK ,
. , 16- 32- .
,
. , Corei7 , , ,
( 8088).
. ,
.

OMAP4430
ARM ,
, .5.10,
:
S1 -;
S2IMM ( );
S3 - ( );
DST -;
DST1 - (1 2);
DST2 - (1 2);
ADDR ;
IMM ;
REGLIST ;
PSR ;
cc .
5.10. OMAP4430


LDRSB DST, ADDR

(8 )

LDRB DST, ADDR

(8 )

LDRSH DST, ADDR

(8 )

437

LDRH DST, ADDR

(16 )

LDR DST, ADDR

(32 )

LDM S1, REGLIST


STRB DST, ADDR

(8 )

STRH DST, ADDR

(16 )

STR DST, ADDR

(32 )

STM SRC, REGLIST


ADD DST, S1, S2IMM

ADD DST, S1, S2IMM

SUB DST, S1, S2IMM

SUB DST, S1, S2IMM

RSB DST, S1, S2IMM

RSC DST, S1, S2IMM

MUL DST, S1, S2

MLA DST, S1, S2, S3

UMULL D1, D2, S1, S2


SMULL D1, D2, S1, S2
UMLAL D1, D2, S1, S2
SMULL D1, D2, S1, S2
CMP S1, S2IMM

PSR


LSL DST, S1, S2IMM

LSR DST, S1, S2IMM

ASR DST, S1, S2IMM

ROR DSR, S1, S2IMM


TST DST, S1, S2IMM

TEQ DST, S1, S2IMM

AND DST, S1, S2IMM

EOR DST, S1, S2IMM

ORR DST, S1, S2IMM

BIC DST, S1, S2IMM

438 5.
5.10 ()


Bcc IMM

PC+IMM

BLcc IMM

PC+IMM

BLcc S1


MOV DST, S1

MOVT DST, IMM

IMM

MVN DST, S1

MRS DST, PSR

PSR

MSR PSR, S1

PSR

SWP DST, S1, ADDR

SWPb DST, S1, ADDR

SWI IMM

, (, -,
), , , . . ,
OMAP4430 RISC-.
LDR STR .
1, 2 4 . (32-)
32, , .
.

. CISC , RISC-
,
, . A ... B ... C, A , B ,
C A B, C . ,
,
, .
, S , ADDS.
. ,
.

. 32- .
.

439

. CISC-
,
. .
.
AND (), EOR ( ), ORR (), TST, TEQ BIC.
,

, .
RISC- .
.
Bcc ,
. BLcc , (R14).
. RISC-,
.
MOV,
(R15).
. BLcc . 5.10 24- PC.
,
32 . BLcc
.
(, C++)
, 32 .
,
. MOVT - 32-
. MOVT 16
31, , . MRS MSR
(PSR). SWP . , 8. ,
SWI ,
.

ATmega168
ATmega168 . .5.11. ,
, .
MOV .
. 16- (SP).
,
.
64 , 32-.

440 5.

X, Y Z, 8-
16-.
5.11. ATmega168

ADD DST,SRC

DST DST + SRC

ADC DST,SRC

DST DST + SRC + C

ADIW DST,IMM

DST+1:DST DST+1:DST +
IMM

SUB DST,SRC

DST DST - SRC

SUBI DST,IMM

DST DST - IMM

SBC DST,SRC

DST DST - SRC - C

SBCI DST,IMM

DST DST - IMM C

SBIW DST,IMM

DST+1:DST DST+1:DST IMM

AND DST,SRC

DST DST AND SRC

ANDI DST,IMM


DST DST AND IMM

OR DST,SRC

DST DST OR SRC

ORI DST,IMM

DST DST OR IMM

EOR DST,SRC

DST DST XOR SRC

COM DST

DST 0xFF - DST

NEG DST

DST 0x00 - DST

SBR DST,IMM

DST DST OR IMM

CBR DST,IMM

DST DST AND (0xFF - IMM)

ING DST

DST DST + 1

DEC DST

DST DST - 1

TST DST

DST DST AND DST

CLR DST

DST DST XOR DST

SER DST

DST 0xFF

MUL DST,SRC

R1:R0 DST * SRC

MULS DST,SRC

R1:R0 DST * SRC

MULSU DST,SRC

R1:R0 DST * SRC

RJMP IMM

PC PC + IMM + 1

PC

441

IJMP

PC Z (R30:R31)

JMP IMM

PC IMM

RCALL IMM

STACK PC+2, PC PC +
IMM + 1

ICALL

STACK PC+2, PC Z
(R30:R31)

CALL

STACK PC+2, PC IMM

RET

PC STACK

CP DST,SRC

DST SRC

CPC DST,SRC

DST SRC C

CPI DST,IMM

DST IMM

BRcc IMM

if cc(true) PC PC + IMM + 1

MOV DST,SRC

DST SRC

MOVW DST,SRC

DST+1:DST SRC+1:SRC

LDI DST,IMM

DST IMM

LDS DST,IMM

DST MEM[IMM]

LD DST,XYZ

DST MEM[XYZ]

LDD
DST,XYZ+IMM

DST MEM[XYZ+IMM]

STS IMM,SRC

MEM[IMM] SRC

ST XYZ,SRC

MEM[XYZ] SRC

STD
XYZ+IMM,SRC

MEM[XYZ+IMM] SRC

PUSH REGLIST

STACK REGLIST

POP REGLIST

REGLIST STACK

LSL DST

DST DST LSL 1

LSR DST

DST DST LSR 1

ROL DST

DST DST ROL 1

ROR DST

DST DST ROR 1

ASR DST

DST DST ASR 1


1

442 5.


. Corei7
32- CISC-.
,
.
OMAP4430 32- RISC-
/, ,
. ATmega168 ,
.
. Corei7
:
;
;
.

. Corei7 . -
, ,
3- -. Intel
Corei7 ,
. , 4,
.
OMAP4430. 32- .
, 3- ;
.
, . .
OMAP4430, .
ATmega168
, , .
32 8-
, .
,
. , , .



.
.

443

, .
. .
.
.


.
,
.
, .
. ,
,
, .5.21,. ,

.
,
.5.21,.
.

. 5.21. ():
(); ( )

, , .

goto [1968a]. ,
goto , , goto , while.
,

444 5.

2, ,
if, while .

.
, , ,
, ,
, .
,
.
, .
, , ,
.
,
, .
, , .
,
. .
64 .
. .
,
, .
, , . , , 64, . (
, , .
, 64 ,
.) .5.22 ,
(n) 5.

. 5.22.

445

n 1 3, n 1 1 2, 1 3, n 1 2 3.
.5.23.

. 5.23.

n i j:
towers (n, i, j)

446 5.

.
, n. , : i j. n 1,

.
5.6. :
towers (3, 1, 3)

:
towers (2, 1, 2)
towers (1, 1, 3)
towers (2, 2, 3)

,
.
5.6.
public void towers (int n, int i, int j) {
int k;
if (n == 1)
System.out.println(" c " + i + "" + j);
else {
k=6-i-j;
towers(n-1, i, k);
towers (1, i, j);
towers (n-1, k, j);
}
}

, , IJVM,
.
.
, .
, , IJVM.
(Stack Pointer, SP),
, (Frame Pointer, FP), , , IJVM,
. .5.24
32- . towers
n, i j, CALL,
, 1012.
FP (1000) 1016,
. 32-
(k) 4 1020.
.5.24, .
, ,
FP ( ),
SP FP , , SP , , FP . FP ( IJVM LV

447

. 5.24. 5.6

448 5.

).
-, , ,
, .5.24. .5.24
.4.10, . .
.
, , ,
, .
, .
.
, . ENTER LEAVE
Corei7 ,
. ,
, ,
.
. , .
, ,

towers (3, 1, 3)

.5.24, .
, n , , n= 3, k
towers (2, 1, 2)

. 5.24,.
(
). n= 1 ,
k
towers (1, 1, 3)

.5.24,.
. ,
. .
, FP SP (.5.24,). :
towers (1, 1, 2)

(.5.24,).
. .
,
, .5.24,, .
, , , ,
towers (3, 1, 3)

449

. A,
B (.5.25).

. 5.25.

B - , A.
, ,
A, B (,
A ,
). , A B ( ), B A ( ).
, A B, B ; B
A A , ,

450 5.

B. A ,
B, B ,
, A.
A B ,
B , A
.
A B.
A B, ,
( , ) ,
, . B
, . B , ,

.
, (A B)
, .5.26. B A B ,

. 5.26. ,
,

451

B. A B, B ( ), ,
A. ,
, .

. , .
.
,
.
CALL RETURN , , , ,
,
, .
, ,
.
,
, ,
. , , . ,
.


,
, , .
. ,

, , . ,
- ,
.
( ),
- ,
. , .
, ,
.
.
1- , , . ,
,
, .

.
, .

452 5.


. ,
,
- . , ,
,
,
.
, , : ,
, , , , -,
, 0.

, , - . . , , .
, ,
(Interrupt Service
Routine, ISR), ,
.
. , .
, ( ,
) .
, , .
, , (
, ,
).
, ,
.
, , :
.
, , ptr, ,
count , . , , ,
(, ,
.5.19). -,
- .

453

.
. ( ).
:
1. .
2. ,
.
3. , , ,
( , ). 1.
4.
.
5.
.
6. ,
. , , 4 ,
n 4n.
,
. (, ).
:
7.
, .
.
8.
, , . , .
9. , .
10. -, .
11. ptr count . 1,
, 1, , 1 . count 0,
, . ,
ptr, .
1

: .
. ,
,
, , .
, , , .
. . .

454 5.

12. ,
, .
13. .
14. ,
, .
, .
.
,
, ,
, .
, , .
-, , . -,
, , .
,
- .
. ( ) .
, . , , 9600
, 1042 .
, , .
-,
,
, .
,
. n ,
n.
n,
,

.
.
, ,
.
. -: ,
RS232 2, 4 5 . (t= 0,
t ) . t= 10 .
(ISR) , .5.27.
t= 15 RS232. RS232
(5), (2), -

455

. 5.27. .

. , ISR , ,
RS232.
, t= 20,
. (4) ,
(5),
, .
t= 25 ISR RS232,
, RS232,
, ISR 2. 2,
, 4 ,
ISR . . , t= 40
,
, .
8088 Intel () : .

, . .
- ,
256 ,
. 8- .
. .

456 5.


,
, . Intel (,
8259A). (, n)
.
, . ,
. ,
- .
,
.


, ,
.
). 5.6
Java.
- Java, Corei7
OMAP4430 Java, C.
Java- println C:
printf(" %d %d\n", i, j)

printf (
%d, ,
). ,
:
.
C Corei7 OMAP4430,
- Java , C . .


Core i7
5.7 C
Corei7. EBP .
, n (N,
)
EBP+ 8, i j EBP+ 12 EBP+16 . k EBP+ 20.

457
5.7. Corei7
.686
.MODEL FLAT
PUBLIC _towers
EXTERN _printf:NEAR
.CODE
_towers: PUSH EBP
MOV EBP, ESP

L1:

Done:
.DATA
format
END

; Core i7
; 'towers'
; printf

;
;
;
CMP[EBP+8],1
;
JNE L1
;
MOV EAX, [EBP+16]
;
PUSH EAX
;
MOV EAX, [EBP+12]
;
PUSH EAX
;
PUSH OFFSET FLAT:format ;
CALL _printf
;
ADD ESP, 12
;
JMP Done
;
MOV EAX,6
;
SUB EAX, [EBP+12]
;
SUB EAX, [EBP+16]
;
MOV [EBP+20], EAX
;
PUSH EAX
;
MOV EAX, [EBP+12]
;
PUSH EAX
;
MOV EAX, [EBP+8]
;
DEC EAX
;
PUSH EAX
;
CALL _towers
;
ADD ESP, 12
;
MOV EAX, [EBP+16]
;
PUSH EAX
;
MOV EAX, [EBP+12]
;
PUSH EAX
;
PUSH 1
;
CALL _towers
;
ADD ESP, 12
;
MOV EAX, [EBP+12]
;
PUSH EAX
;
MOV EAX, [EBP+20]
;
PUSH EAX
;
MOV EAX, [EBP+8]
;
DEC EAX
;
PUSH EAX
;
CALL _towers
;
ADD ESP, 12
;
LEAVE
;
RET 0
;

EBP ( )

ESP
if(n==1)
, n 1
printf("", i, j);
i, j

( C)
OFFSET FLAT
printf

k=6ij
EAX=6i
EAX=6ij
k=EAX
towers(n1, i, k)
EAX=i
i
EAX=n
EAX=n1
n1
towers(n1, i, 6ij)

towers (1, i, j)
j
EAX=i
i
1
towers(1, i, j)

towers(n1, 6ij, i)
i
EAX=k
k
EAX = n
EAX=n1
n1
towers(n1, 6ij, i)


DB " %d %d\n" ;

. ESP EBP. n 1,

458 5.

n> 1, else. then


: , i j, .
, C.
.
printf ,
, ,
.
ESP 12,
. ,
ESP .
else L1.
6 i j, k.
i j,
6 i j. k
.
, . .
. . .
,
.


OMAP4430
OMAP4430 (5.8).
OMAP4430 , ,
. ,
cpp ( C).
, OMAP4430
( , ).
5.8. OMAP4430
#define
#define
#define
#define
#define
#define

Param0
Param1
Param2
FormatPtr

r0
r1
r2
r0
kr7
r5

n_minus_1
.text
towers: push {r3, r4, r5, r6, r7, lr}
movr4, Param1
movr6, Param2
cmp Param0, #1
bne else
movw FormatPtr,#:lower16:format
movt FormatPtr,#:upper16:format
bl printf
pop {r3, r4, r5, r6, r7, pc}

@
@
@
@
@
@
@

(n==1)?
, else


print move

IA-64 Itanium 2 459


else:

main:

rsb k, r1, #6
subs k, k, r2
add n minus 1, r0, #-1
movr0, n_minus_1
movr2, k
bl towers
movr0, #1
movr1, r4
movr2, r6
bl towers
movr0, n_minus_1
movr1, k
movr2, r6
bl towers
pop {r3, r4, r5, r6, r7, pc}
.global main
push {lr}
movParam0, #3
movParam1, #1
movParam2, Param0
bl towers
pop {pc}

@ k=6 i j
@ compute (n-1)
@
@ call towers(n1, i, k)

@ call towers(1, k, j)

@ call towers(n1, k, j)
@
@
@

@ call towers(3, 1, 3)
@ ,
@
format: .ascii "Move a disk from %d to %d\n\0"

OMAP4430 Corei7.
n, n> 1, else. OMAP4430
.
OMAP4430
printf, , , 32-
. : MOVW
MOVT.
,
PUSH POP .

LR, PC.

IA-64 Itanium 2
2000 Intel , ,
IA-32 .
, ( ,
). ,
, IA-32.

460 5.

IA-32 .
Intel. , .
, EMT-64,
Pentium 64- 64- . , , , .
Pentium.
, Intel
Hewlett Packard, IA-64. 64- ,
32- .
IA-32. IA-64
, , .
, IA-64, Itanium,
, , . ,
IA-64 Itanium2.

IA-32
IA-62 Itanium2, , , ,
IA-32 Intel
. , IA-32

. CISC-
, . RISC, ,
, .
IA-32 RISC-,
( ),
. .
IA-32 ,
. /
, ,
,
. , , IA-32
. .
IA-32 .
, -
( , , ESI EDI)
, ,
. .

IA-64 Itanium 2 461

- , WAR-,
- , . -
(
). -
. IA-32
, , ,
.
. .
,
. ,
. ,
,
. ,
. .
,
. .
, ,
. , 32-
IA-32
4, . , EMT-64,
.
IA-32
. , , .
,
.
Intel .
Corei7
CISC- RISC-, , ,
, ,
, .
Intel : IA-32 (IA-64). EMT-64
, .

IA-64

IA-64 , . Corei7
, , -

462 5.

,
. IA-64
. , . ,
Corei7 , 8 ,
128,
- , .
IA-64,
, ,
. ,
,
. , , EPIC (Explicitly Parallel Instruction
Computing ).
EPIC RISC-.
IA-64 .
, , .
,
Itanium2.


Itanium2 . 264 .
1, 2, 4, 8, 16 10 ( 80- IEEE745).
, .
,
; ,
.
.
, .


. -
.
, ,
IA-64.

. Itanium2 128 64-
. 32 , 96 ,
RISC- (, UltraSPARC). UltraSPARC
. 32 () , .

IA-64 Itanium 2 463

,
,
. . , ,
, ,
.

, . ,
,
.
Itanium2 128 ,
IEEE745 .

, .
, Itanium2 64 1- , 8 128 ,
, .
Itanium2 .5.28.

. 5.28. Itanium2


Corei7
.
,
. IA-64 Itanium2 .
.
,
,

464 5.

, RAW- WAW-
(WAR- ). , ,
, ,
.
,
, , .
. ,
.
. ; ,
.
.
128- (bundles), .5.29. 41- 5- .

.

. 5.29. IA-64

100 . .5.29
.
ADD, .
(, ).
(, ADD SUB). . .
,
, ( ). , ,
, .. ,

IA-64 Itanium 2 465

216
3216
0, 1 2. 5 ,
. ,
,
. ,
.


IA-64
. , .
, ,
if. IA64
, (predication),
[August et al., 1998; Hwu, 1998].
.
,
, .
: ? , , ,
, .
.
, , .
, , ( 5.95.11), (
). 5.9 if.
5.10 : ,
. 5.11
, CMOVZ,
. , R1 .
, R3 R2,
.
5.9. if
if (R1==0)
R2 = R3;

5.10. 5.9
CMP R1,0
BNE L1
MOV R2, R3
L1:

5.11.
CMOVZ R2,R3,R1

466 5.

, , , , ,
, - .
CMOVN.
. if
then else.
,
- 0, , -
, . , then
CMOVN,
else CMOVZ.
, , CNOVN CMOVZ,
.
.
,
,
( - ). then else 5.125.14.
5.12. if
if(R1 == 0) {
R2 = R3;
R4 = R5;
} else {
R6 = R7;
R8 = R9;
}

5.13. 5.12

L1:

CMP R1,0
BNE L1
MOV R2,R3
MOV R4,R5
BR L2
MOV R6,R7
MOV R8,R9

L2:

5.14.
CMOVZ
CMOVZ
CMOVN
CMOVN

R2,R3,R1
R4,R5,R1
R6,R7,R1
R8,R9,R1

( IA-32), IA-64 . ,
.
6- , , 64 1- . , if
,
1, , 0, .
. ,

IA-64 Itanium 2 467

,
then else, ,
, .
.
5.155.17 ,
. CMPEQ
P4 1, , 0, . ,
, P5. if then
, - (
). , ,
.
5.15. if
if(R1 == R2)
R3 = R4 + R5;
Else
R6 = R4 R5

5.16. 5.15

L1:

CMP R1,R2
BNE L1
MOV R3,R4
ADD R3,R5
BR L2
MOV R6,R4
SUB R6,R5

L2:

5.17.
CMPEQ R1,R2,P4
<P4> ADD R3,R4,R5
<P5> SUB R6,R4,R5

IA-64
,
, .
- .
.
IA-64 . , ,
, ,
. , .
, .
[Dulong, 1998].


IA-64, , . LOAD ,
, ,
, , .

468 5.

, 4. ,
.
LOAD
. , , , .
, , CHECK. , CHECK
, NOP, .
, .
, , IA-64
. -,
RISC-,
/. IA-32.
-, IA-64 .
, , , . ,
, .
.
-,
if, ,
. ,
, ,
, .
Itanium ,
. , Itanium
? : ,
( ) . , 10 Itanium,
. Intel Itanium,
.
, ,
IA-64. Itanium
IA-32. , Intel
? 8, IA-32 ,
.
Itanium2 [McNairy and Soltis, 2003; Rusu et al., 2004].



, CISC-

469

. ,
MOVE, ADD BEQ.
, 4 8 .
8 32 , .
(, Corei7)
, (, OMAP4430) . , ,
.
1, 2 3 , : , ,
, ..
.
.
, (
), , , ,
-.
, , ,

. 200. CISC- .
: , , . ,
(, ).
- ,
.
.
(, ).
- , , - ,
.
.
, ,
, .
, IA-64 EPIC,
. ,
. IA-64
Corei7, , .

.

470 5.


1.
3. ,
, 0 0 ..
?
2.
, k-
2k 2k . ,
k = 32 4 4 ;
8 . ,
?
3. ,
32- :
yy 15 12- 4-
;
yy 650 12- 4- ;
yy 80 .
4. 16- 6-
. , . n ,
?
5. ,
12- (
3 ):
yy 4 ;
yy 255 ;
yy 16 .
6. -.
:
yy 20 40;
yy 30 50;
yy 40 60;
yy 50 70;
- ?
LOAD
LOAD
LOAD
LOAD
LOAD
LOAD

IMMEDIATE 20
DIRECT 20
INDIRECT 20
IMMEDIATE 30
DIRECT 30
INDIRECT 30

471

7. , ,
:
X = (A + B C )/(D E F )
.
yy : PUSH M, POP M, ADD, SUB, MUL, DIV;
yy : LOAD M, STORE M, ADD M, SUB M, MUL M, DIV M;
yy : MOV (X= Y ), ADD (X= X+ Y ), SUB (X= X Y ),
MUL (X= XY ), DIV (X= X/Y );
yy : MOV (X= Y ), ADD (X= Y+ Z ), SUB (X= Y Z ),
MUL (X= YZ ), DIV (X= Y/Z ).
M 16- , X, Y Z 16-
, 4- . ,
-, 16 ,
. SUB X,Y Y X, SUB X,Y,Z
Z Y X. 8 ,
4 , X ?
8. ,
6- 64 ,
.
9. ,
?
10. :
1) A + B + C + D - E;
2) (A + B)(C + D) + E;
3) (AB)+(CD) + E;
4) (A B)(((C DE)/F )/G )H.
11.
?
1) A B + C + A B C + +;
2) A B C A B C ;
3) A B C+ A B C + .
12. :
1) A B + C + D ;
2) A B / C D / +;
3) A B C D E + /;
4) A B C D E F / + G H / +.

472 5.

13. , .
14. :
1) (A B) C;
2) (A B) (A C );
3) (A B) (C D).
15.
IJVM-, :
(5 2 + 7) (4/2 + 1).
16. ,
.5.17?
17. .5.17 1 2
23. 3 . ,
3?
18.
X A B.
A, B X,
?
19. .
20. Corei7 ,
3 . ?
21. 3 ,
. ,
( )?
22. :
if (k==0) ...
if (a>b) ...
if (k<5) ...

, .
?
23. , 16- 1001010111000011
:
1) 4 ;
2) 4 ;
3) 4 ;
4) 4 ;
5) 4 .
24. , CLR, ?

473

25. (A B) C :
yy A = 1101000010101101;
yy B = 1111111100001111;
yy C = 0000000000100000.
26. , A B,
. :
.
27. ,

, .

?
28. (
, ).
Java-
Corei7 IJVM. ,
. , i j
.
.
i =3;
i = j;
i = j 1;

29. for.
while.
30. , ( ,
). , ( 64 )?
.
31. - ?
?
32.
. 64 512 .
16 . 16 .
500 .
. -
?
33. DMA, . 5.20,
- . ,
DMA
, . 3.33.
34. ,
?

474 5.

35. IA-64
(64). ? , ? ,
?
36. .
. ? ,
?
- , ?
37. , , . -
, ,
. ,
250 ,
, . 1K,
?
38. .5.25 .
?
39. ASCII-.
40.
.
41. , .
n!, n!= n(n 1)!, 0!= 1.
n!.
42. ,

. ( , ,
, .)

6.

,
,
. , .
.
, , ,
. ,
, , ,
. .6.1.

. 6.1.

, ( , ),
.
.
, , .
.
, . , .
. , , ,
, ADD.
, .

. . .
. ,

476 6.

, . -. , -,
. ( ,
). , .
(,
, , - ..). ,
: Corei7 (Windows7) OMAP4430 (Linux).
ATmega168 ,
.



. IBM-650, ( 50- ), 2000 . 60 ALGOL
1024 .
PDP-1,
4096 18- .
, .
,
.
(, ).
, , .
, . ,
. . ,
,

-
.
,
, .
1961 ()
,
[Fotheringham, 1961]. ,
, , ,
, . ,
60- . 70-

477

.
, Corei7 OMAP4430,
. .


.
16- 4096 . , ,
65536 ( 16-, 216= 65536).
,
.
0, 1, 2, ..., 65535,
.
.
, 4096, 4096.
( 4095 , ).
,
- .
.
4096 , , 0 4095. , ,
4096
0, 4097 1,
8191 4095 .. ,
(.6.2).

. 6.2. 4096 8191


0 4095

, 4 (
) 0 4095 4096
. : , -

478 6.

8192 12287?
,
, . :
1. .
2. 8192 12287 .
3. 8192 12287 .
4. : 8192 12287 0 4095.
5. , .
, , ,
.
, . ,
, ,
, ,
. , ,
. ,

(, , , ).
,
, .
,
. ,
. ,
.
, .
,
, . ( ),
. ,
, ( ).
.
, ,
.
, -
, , . , ,
MUL (), . , ,

479

. , ,
.
, .



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

, 512 64,
4. .
,
.
. .6.2
.
.

. 6.3. 64
16 4 (); 32
8 4 ( )

480 6.

.6.3,
64 4.
, (, , ).
, .6.3,
,
.
16 .
64 ,
, 0 65532
(, 4). ,
.
.6.3, , 4K. 32K, : 1)
( ,
, ) 2)
.
, 32-
. , , ,
.
.
(Memory Management Unit, MMU).

. 32- 15- ,
32- 15- .
, , .6.4.
32- , 20- 12-
(
4).
. .6.4 3, 3.
, . 220
8 ,
.
. 1. ,
.

( 6) 3 15-
. 3 ,
8 . 12
( ) 12

481

. 6.4.

. 15- .
.6.5
. 0
1. 1 0.
2 . 3 2. 4 .
5 6 ..

482 6.

. 6.5. 16 ,
8


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

, . ,
.
,

483

, , , .
. , , ,

.
..

(demand paging). ( ):
, .
, .
,
, .
, .
,
100 , .

, .
,
.
.
. ,
. t ,
k . [Denning, 1968]
.
, , , ,
. ( , ,
).


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

484 6.

,
, . :
, ,
, , , .
, , ,
, .
,
, ,
, . LRU (Least Recently Used
).
, . .
, ,
9 ,
. 7, 0 7.
8, .
LRU 0,
. 0 , 8 (
18). , . 6.6.

. 6.6. , LRU

8
, 0.
, 0
. LRU
1 ( 0 28).
1, . 1
2 ..
, LRU ( ).
,
.

485

FIFO (First-in First-out , ). FIFO ,


, ,
.
. .
, ,
, . .
,
, .
,
, ,
. , , (thrashing). , , .
,
, , .
,
, .
, (
, , ),
, .
, ,
.
,
, . 1 ,
, (
). ,
.


, ,
. , ,
. ,
26000
4096 , 6 ,
64096= 24576 , 26000 24576 =
= 1424 . 4096,
2672 . , 7 , ,
.
(
).

486 6.

n , n/2 . ,
,
.
. ,
,
. , .
,
. 10 (
), .
100/, 8 1
70 .
. , ,
( ),
. A 1000010000,
8- (A[1,1], A[2,1], A[3,1] ..).
1 (A[1,1], A[1,2], A[1,3] ..) 80000 . ,
, 10000 ,
79992 . 8, 80.
1 10 . 32 8
,
1 . . 4
.

, 0 - .

. ,
, ;
:
;
;
;
;
, .

487

.
.
, .6.7.
, ,
. ,
, ,
. , , ,
- , ,
.

. 6.7.
,

, .

, ,
.
, .
0 - .
( ). ,
.
, - ,
, - .
,

.
( ), , . , , ,

488 6.

. ,
.
.6.8.

. 6.8.

, , . ,
, ,
.
,
, .
,
0, , , . ,
n 0
(n,0).
n , (
), ,
.
, . ,

. , , , . ,
.

. ,
( ), ,
.
,
,
.
.

489

(, , ), ,
-. ,
,
.
, ..
.
, () .
(
- ).
, , .
.6.1.
6.1.

- .
.
, ,
.
.
, ,

, .


:
. . ,
, . ,
(
, ). -
:
.

490 6.

: , . .6.9,
, 5 . , , 1 , 7,
, .
, .6.9,. 7 2
() . 4
5 (.6.9,), 3 6 (.6.9,).
, , . (
, ,
). (checkerboarding).

. 6.9. (, , , );
()

, , 3,
(. .6.9,).
10, , 3, 3 , .
.
:
0,
(, ). . ,
(
),
. .6.8, ,

491

. ,
. ,
.
, , .
. (best fit) , .
,
.

,
. , , ,
[Knuth, 1997].
.
, ,
, ( ),
. , ,
. (
)
, .
. , , , ,
. .6.8, 5,
, 4,
,
11.
,
: .
.
.
. ,
. ,
. , ,
, .
, .
MULTICS (Multiplexed Information and Computing Service
) ,
.
Bell Labs General
Electric [Corbat and Vyssotsky, 1965; Organick, 1972]. MULTICS
: . -

492 6.

,
.
(.6.10). ,
.

16 .
MULTICS ,
1965 30 2000 ,
MULTICS. 35 . ,
, Intel,
386, .
MULTICS www.multicians.org.

. 6.10. MULTICS-

Core i7
Corei7 , ,
. : LDT (Local Descriptor
Table ) GDT (Global Descriptor Table ). ,
.
( , , ..),
,
.
5, , Corei7
.

493

CS , DS .. 16- (.6.11).

. 6.11. Corei7

,
( , , ). 13
,
8 (213) .
. . 0
. , ,
, 0,
.
, ,
. 8 .
, (.6.12).

. 6.12. Corei7.

, . 2 .
, 0
13- 8. , (

494 6.

), . , 72 9
,
GDT+ 72.
, (, )
. , ,
, . ( 0) (P=0),
. ;
, .
,
. , . 32- ,
20 , . G (Granularity ) 0,
LIMIT ( ) ( 1).
G 1, LIMIT ,
. Corei7
4, 20 232.
, , Corei7 32- BASE ( )
, (.6.13).
BASE ,
80286, BASE
24 .
32- .

. 6.13. -

( ), . ,
,
.
,
, .

495

,
, .
, 32- 32-
4- ,

.
, 1024 32- .
. , 1024 32- .
. .6.14.

. 6.14.

.6.14, , : DIR, PAGE


OFF. DIR . PAGE .
, OFF
.
32 , 20 .
, ,
, .
1024
4 ,
4 . 4
( ). ,
, , .

496 6.

, Corei7

DIR-PAGE . , .6.14,
, .
BASE
. , BASE, , ,
. BASE ( ),
80286, .
, 32-
, . ,
BASE LIMIT.
, , ,
.
Corei7 . ( )
Corei7; Corei7 64-
.
, . Corei7 4
, 0 , 3
(.6.15). 2- (Program Status Word,
PSW) ,

. 6.15. Corei7

497

. , ,
.
,
. . .
, ,
.
CALL .
, (call gate)
. ,
.
.
.6.15. 0 ,
-, .. 1
.
, . 2 , .
, . 3
,
. Corei7, ,
MULTICS.
.
, ,
, .
TYPE .6.11 , .

OMAP4430
OMAP4430 32- , 32- , 32- . ,
ARM 232 (4 ) .
: 4 , 64 , 1
16 . .6.16.

. 6.16. OMAP4430

498 6.

OMAP4430 Corei7.
4- . 6.17 .
12 .
. ,
8 ,
.
, .
OMAP4430 . 1 16
, .
, .
64- .
4- 4- ,
64
16 . , , 64,
4? ,
, 64 TLB,
.
,
. .6.17, ,
. 200 %
,
, .
OMAP4430 -

. 6.17. ,
OMAP4430: (); TSB()

499

(Translation Lookaside Buffer, TLB)


.
4 220 ,
. , .
TLB ,
. . TLB 128
. TLB
.
, ASID (Address Space Identifier),
,
TLB . ,
,
, 32- (, ).
.6.17,.
, TLB- (
-), .
, ,
,
TLB. ,
. TLB
, TLB
. .
,
200 %
.
Corei7 OMAP4430.
Corei7 ,
. OMAP4430
. Corei7, OMAP4430 TLB-
TLB . (,
SPARC MIPS) .
TLB,
TLB, .


,
, .
.
.

500 6.

, ,
.
.
-. -, - ,
. , , .
, - .
- , . -
(: 64 8). ,
, - . ,
,
.


,
.

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

. ,
,
.
(. 6.18)
, . , .
,
. ,
. ,
,
, -.

501

. 6.18.
.
-


, ,
.

.
-. ,

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

502 6.

Core i7
Corei7
VMX (Virtual Machine eXtensions) ,
,
. VMX EPT (Extended
Page Table), . EPT


, TLB-
. ,
.
- ( , -,
) , VMCS (Virtual-Machine Control Structure).
,
-.
- ,
- .

-
,
. ,
, .

, .
,
. - , . . -,
, -
, , -
,
. -,
- ,
. -
, ,
, , . :
;
;
- ( ) ,
;
;
;
;

- 503

;
;
.


.
.

-
. ,
-. -
(, ), .
(,
), .
, , , .
.
-.
.
. - ,
, . ,
.
,
.
.
, , :
, ;
, ;
.
.
. (, 2000 1000).
, ,
. read
, read
. ,
. ,
,
. ,
.
(
), ( Linux).

504 6.


.
, . ,
,
: , ,
, , .
,
, , .
, ,
.6.19. ,
, . ,
, .

. 6.19. , :
19(); 19( )


. write
.

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

- 505

,
( ). .6.20
,
12 . .6.18, .
-.
.6.18, . ( , ).

. 6.20. :
(); ( )


.
.
, , .
n - , -
. ,
.
,
. , ,
.
(
UNIX), ,
. , ,
.

506 6.

, .
.

.
.
. , 64- 64 , . , 4, 52 19, 4
52, 52 19, 19
, (, 0 1).
MS-DOS, Windows95 Windows98.
Windows (2000, XP, Vista 7) ,
, UNIX.
, , , , . ,
, . j
, k,
. ,
,
. ,
,
.
,
.
,
(, -),
, . 1200, 700, 2000 900
-, 0, 1200, 1900 3900 ( ).
, .
,
, , .
- ,
.
(
), .
(free list). .6.21,
6.20,.
(
), . 6.21,. ,
, .

- 507

. 6.21. :
(); ( )

. : , .
, . , ( ) .
. ,
.
, .
. -,
, .
10, 8 ( ), 1 ( 0,125 ), 8 8 1,
8 .
. ,
,
.
: , .
, ,
. , MS-DOS
(512 ),
16- . 64 ,
16-
: . Windows95 ,
32- . Windows98 .

508 6.

, . ,
.
,
. ,
. ,
. , .
, MS-DOS Windows95 2-
32,
100 32668 .
.
,
.


.
, ,
.
(, ).
, ,
(on-line). , (off-line) (, -, USB-
SD).
.
-.
, , .

. .6.22 .
, ,
:
;
;
;
.

. , ,
, .
, . , .

.

509

. 6.22.



( ).
, . , . .
.

, 1/
, . . ,
, , , , 1, , 1, . ,
, ()
.
.
, 1000 1c , , 0,001,
.
8.

- , .
, .
,

510 6.

. , .
.6.23 ,
,
, .
, ,
.
, .
.

. 6.23. ();

( )


- .
, ,
, .
, , .

. .

, , .
() () .

, . :
, ,
, . ,
.

511


.
. .
, 1 2,
.
1 (producer), 2
(consumer).
. .
. , , ,
.
, ,
. , ,
. ,
.

. in out : in
(
), out , .
in= out, , .6.24,. .6.24, , . .6.24,
,
. .6.24, . .
(), out
(, in= 52, out= 53), . ;
, in= out,
.

. 6.24.

6.1
Java. : m, producer consumer. m

512 6.

, in out, ,
100 ( buffer[0] buffer[99]).
6.1.
public class m {
final public static int BUF_SIZE = 100;
// 0 99
final public static long MAX_PRIME = 100000000000L; //
public static int in = 0, out = 0;
//
public static long buffer[ ] = new long[BUF_SIZE]; //
public static producer p;
//
public static consumer c;
//
public static void main(String args[ ]){
//
p = new producer );
//
c = new consumer );
//
p.start();
//
c.start();
//
}
// in out
public static int next(int k) { if (k < BUF_SIZE - 1) return(k + 1);
else return(O); }
}
class producer extends Thread {
public void run() {
long prime = 2;
while (prime < m.MAX__PRIME) {
prime = next_prime(prime);
if (m.next(m.in) == m.out) suspend();
m. buffer[m. in] = prime;
m.in = m.next(m.in);
if (m.next(m.out) == m.in) m.c.resume();
}

//
//
//
//
//
//
//
//

P1
P2
P3
P4
P5

}
private long next_prime(long prime){ ... }

// ,
//

}
class consumer extends Thread {
public void run() {
long emirp = 2;

//
//
//

while (emirp < m.MAX_PRIME) {


if (m.in == m.out) suspend();
// C1
emirp = m.buffer[m.out];
// C2
m.out = m.next(m.out);
// C3
if (m.out == m.next(m.next(m.in))) m.p.resume(); // C4
System.out.println(emirp);
// C5
}
}
}


(threads). producer consumer, -

513

p c .
Thread. run
. start ,
Thread, .
. , Java-
. .
, , . ,
.
( ), Java
, .
next in out,
, . next 98 ,
. 99, , ,
0.
- ,
. ,
Java Thread suspend ()
resume ( ). 6.1.
. (P1).
m.MAX_PRIME. m ,
MAX_PRIME, m.
in, out, buffer next.
(P2) , in out.
(, in= 62 out= 63), , , suspend. ,
(P3), in (P4).
P5 , in , out (, in= 17, out= 16), , in out in
. , ,
( ) .
resume,
(P5). .
. ,
(C1). , ,
. ,
(C2) out (C3).
out in (C4), ,
out in. in= out 1, , ,
resume. (C5), .

514 6.

, (.6.25). ,
, , ,
, . ,
21, in= 22, out= 21 (.6.25,).
P1 , C5 20. , C1 C2.
out. in, out 22.
, C1, in out , (.6.25, ).

. 6.25. ,

, in out,
, . P3 in P4.
in= 23, out= 22. P5 , in
out, , . ,
, ,
resume, .6.25,.
,
resume . .
. in out ,
. in= 22 out= 22, .
.
, in= 24, out= 22. , ( ),
( ). . ,

515

.
.
, ,
in out, , , , ,
in=out+ 1 , (
), resume, ,
. , ,
out in out.
. , Java Sun Thread,
suspend resume,
. ,
, ,
, UNIX
Windows7.


, , .
.
,
. ,
, . .
. n . ,
n 1 , .
[1968b] . -
,
, . , up down, .
up , down
.
down , 0,
, .
0, down .
, up. ,
, .
up , 0 . , , .
down, 0
. .
0, up .
,
. :

516 6.

,
, , down
. .6.2
up down.
6.2.

=0

>0

up

=+1 (
down ,
)

=+1

down

,
=1

up

,
Java, , ,
- Java,
. , ,
, up down, up down,
.
6.2 ,
. m : available, 100 ( ), filled, 0.
P1, C1.
down filled .
, down available , 99. P5
up filled,
filled 1. ,
down. filled 0,
.
6.2.
public class m {
final public static int BUF_SIZE = 100;
final public static long MAX_PRIME=100000000000L;
public static int in = 0, out = 0;
public static long buffer[ ] = new long[BUF_SIZE];
public static producer p;
public static consumer c;
public static int filled = 0, available = 100;
public static void main(String args[ ]) {
p = new producer();
c = new consumer();
p.start();
c.start();
}

//
//
//
//
//

//
//
//
//
//
//
//

0 99




517
// in out
public static int next(int k) {if (k < BUF_SIZE - 1) return(k+1);
else return(O);}
}
class producer extends Thread {
//
native void up(int s); native void down(int s); //
public void run() {
//
long prime = 2;
//
while (prime < m.MAX_PRIME) {
prime = next_prime(prime);
down(m.available);
m.buffer[m.in] = prime;
m.in = m.next(m.in);
up(m.filled);
}

//
//
//
//
//

P1
P2
P3
P4
P5

}
// ,
private long next_prime(long prime){ ...}
}
class consumer extends Thread {
//
native void up(int s); native void down(int s); //
public void run() {
//
long emirp = 2;
//
while (emirp < m.MAX_PRIME) {
down(m.filled);
emirp = m.buffer[m.out];
m.out = m.next(m.out);
up(m. available);
System.out.println(emirp);
}

//
//
//
//
//

C1
C2
C3
C4
C5

}
}

in= 22, out= 21, P1, -

C5. C1,
down filled, 1, 0.
up available,
available 100. C1. ,
down,
P2, P3 P4.
filled= 0. up, down. , , ( up). ,
1, .
. .

518 6.

. ,
,
. , .
if 6.1 .
.
, up down. ,

.
up down, ,
. ,
. .

. ,
down . up ,
down
. 0,
.
. 20
, 10 (). . () .
, 7. 0 7
( 0 7).
up, .
down ,
.
.
( down);
. . ,
, ( up).
( down) .
, . (
up), .


Corei7 OMAP4430
, c . Corei7 Windows, OMAP4430 UNIX.
UNIX, Windows. UNIX

519

Windows7,
.

UNIX
Windows XP
(UNIX
Windows 7). ,
.
UNIX
UNIX Bell Labs
70- . (Ken Thompson)
- PDP-7.
PDP-11, C. (Dennis
Ritchie). 1974 UNIX [Ritchie and Thompson, 1974].
[Ritchie,
1984; Thompson, 1984].
Bell Labs UNIX. Bell Labs, AT&T,

, UNIX
.
PDP-11 , ,
PDP-11, , .
UNIX, , .
, UNIX, . ,
UNIX.
- VAX, , 14 255 ,
TCP/IP,
( , Berkeley UNIX).
, AT&T
UNIX, 1982
SystemIII, 1984 SystemV. 80-
UNIX: Berkeley UNIX SystemV.


UNIX.
UNIX, ,
UNIX ( MS-DOS ). IEEE
(Institute of Electrical and Electronic Engineers -

520 6.

) POSIX (Portable Operating System


Interface ),
IEEEP1003. .
POSIX ,
UNIX. , P1003.1, ;
, P1003.2, .. P1003.1
60 ,
. ,
.. UNIX ,
P1003.1,
, , SystemV Berkeley
UNIX. POSIX 200 .
1987 ()
UNIX, MINIX
[Tanenbaum, 1987]. ,
MINIX , (Linus Torvalds).
MINIX , , Linux .
, ARM,
Linux. MINIX, Linux POSIX,
, UNIX , Linux
( ).
.6.3 Solaris.

. Linux POSIX P1003.1, . ,
POSIX- Linux .
6.3. UNIX

, , ,

, ,

, , ;

;
;

; ;

521

Berkeley UNIX,
SystemV.
. 4-
. UNIX
,
. , TCP/IP.
UNIX , ,
UNIX.
UNIX -
, .
, .6.26, .
,
.
.
, , , ,
..
- (stream). -

. -,
,
. .

. 6.26. UNIX

. , , ,
. (block
cache),
, . -

522 6.

.
Berkeley [McKusick et al., 1984]
[Rosenblum and Ousterhout, 1991; Seltzer et al., 1993].
UNIX .
,
(InterProcess Communication, IPC) , .
. ,
, () . , . UNIX
,
(,
).
UNIX ; . UNIX
, 24 25 80 ASCII-.
, .
, UNIX ,
.
, , UNIX , XWindows. XWindows
(Graphical
User Interface, GUI), Motif.
, XWindows Motif
.
Windows 7
IBMPC, 1981 , 16-
, .
MS-DOS1.0. 8- ,
. 24-
MS-DOS2.0. (),
UNIX. 1984
IBM PC/AT MSDOS-3.0,
36. MS-DOS
,
.
Apple Macintosh, Microsoft , Windows.
Windows, Windows3.x, ,
MS-DOS. ,
.

523

1995 Windows95,
MS-DOS, MS-DOS
MS-DOS7.0. Windows95 MS-DOS7.0
, , .
Windows95 32- .
16- (
32-) -
MS-DOS . ( MS-DOS
8+ 3 ) ( 65536) .
Windows98, 1998 , 16- MS-DOS
( 7.1) . Windows98 Windows95, MS-DOS
Windows, , ,
. ,
, - , .
, Microsoft
. Windows98 Windows Millenium Edition (ME),
.
Microsoft 32- . Windows New Technology ( Windows),
WindowsNT1. ,
, Intel (
PowerPC),
. WindowsNT
. WindowsNT,
Windows2000, ,
. Windows2000 WindowsXP,
( ). 2007
Windows Windows Vista. , (, ).
Vista -
1

, WindowsNT,
16- OS/2 IBM Microsoft
32- OS/2. ,
i386, 1989 ,
, Microsoft, OS/2v.3.0, WindowsNT,
, -, IBM, -, ,
. .
. .

524 6.

. Windows 7,
Windows Vista.
Windows7
.
Windows 7 .
, , .
; ,
. , .
, Windows7
, , .6.27. ,
.

. C, C++, -
.

. 6.27. Windows 7

.
,
, .
-, , , -, ,
. , Windows7
,
.
:
NTOS Windows, -

525

, . .
.
Windows7:
, , ,
.
, , - .
, .
UNIX Microsoft .
Windows (, XP, Vista Windows 7)
, Win32 API (Application Programming Interface
). ,
,
. Win32
Windows 7, ; . Windows
64- , Microsoft
Win32 Win64, 32-
.
Win32 API UNIX. UNIX
:
. Win32 ,
. , Win32 ,
(, ).
Win32 API
(, , , ..). , , ,
() (handle).
.
.
(
UNIX ). ,
,
. ,
, ,
.
Windows7 -
,
( API). ,
- ,
.

526 6.


UNIX Windows7.
.
UNIX
UNIX . : ,
, .6.28. ,
. . ,
( ).
. ,
Linux, OMAP4430.

. 6.28. UNIX

, ,
. , . UNIX,
,
, .
UNIX ( ) Berkeley UNIX,
SystemV ( Linux) ,
.
.
, 12
144, 144 .
, - .
, , . fd (file
descriptor). .

paddr = mmap(virtual_address, length, protection, flags, fd, file_offset)

length , file_offset , , virtual_address.

527

flags , ,
paddr.
.
protection , ,
( ). unmap.

. .
, , ,
. .
, .
- , ,
. , (copy on write), ,
,
.
, .
Windows 7
Windows 7
. 32- Windows7 32 , 4 . 2 ;
2 () .
Windows7,
(3 1 ).

(4 Corei7). 64- Windows7
,
8 .
: (free), (reserved) (committed).
,
. ,
, .
, .
,
. ,
, .
.
, ,
. , (, ,
). 64 64 ,

528 6.

(
0 1).
, , . ,
( ,
).
. ,
.
; .
Windows 7, SystemV, . ,
.
,
, ,
. , ,
(-
). ,
.
Windows 7
, .


, .
. ,
, , ,
, ,
.
Win32 API , . .6.4. ,
, ,
.
6.4. API
WindowsXP
API

VirtualAlloc

VirtualFree

VirtualProtect

(//)

VirtualQuery

VirtualLock

(
)

VirtualUnlock

529

API

CreateFileMapping ( )

MapViewOfFile

UnmapViewOfFile

OpenFileMapping

. 30
. ,
. ,
. Windows7
API ( .6.4),
,
( ).
4 API
. , CreateFileMapping.
, .
. , , . ,
.
API .
. , API .
,
. ,

, ( ). Windows 7 malloc UNIX, Windows XP,
UNIX, .

-

, - .
UNIX, WindowsXP -.
UNIX Windows 7
, , Windows 7
UNIX.
- UNIX
UNIX , ,
, .

530 6.

8-
1 0 2641 .
,
ASCII , .
,
. read write , , .
,
, .
,
.
, , -. - .
,
-
-. ,
, .
UNIX .6.5.
creat ( e )
. , open
. unlink (,
).
6.5. UNIX

creat(name, mode)

; mode

unlink(name)

(, )

open(name, mode)

close(fd)

read(fd, buffer, count)

buffer count

write(fd, buffer, count) buffer count


lseek(fd, offset, w)

, offset w

stat(name, buffer)

chmod(name, mode)

fcntl(fd, cmd,)

(,
)

open ,
. mode , ( ,
1

8- , 5-, 7-, 8-. ,


8 . . . .

531

..). , . .
- read write,
( ,
), .
lseek ,
.
stat (, , ..), chmod (, , , -
), , fcntl ,
.
6.3 , -. , .
, data
newf. infd
outfd . ,
, .
. open creat
, .
6.3.
UNIX. C,
Java

/* . */
infd = open("data", 0);
outfd = creat("newf", ProtectionBits);
/* . */
do {
count = read(infd, buffer, bytes);
if (count > 0) write(outfd, buffer, count);
} while (count > 0);
/* .*/
close(infd);
close(outfd);

read : , .
. count. count
, bytes, .
write .
, . ,
.
UNIX
( 20). 0, 1 2
, .
, ,
-

532 6.

. UNIX
.
.
.
,
. UNIX , ,
bin ( ), dev (
-), lib ( ) usr ( , .6.29). usr ast jim. ast (data foo.c)
bin, 4 (game1, game2, ...).
.
,
(/). , game2
: /usr/ast/bin/game2. ,
, .

. .
( ).
. /usr/ast ,
game3, bin/game3.
, link. /usr/ast/bin/game3 /usr/jim/jotto
. ,
. open creat
, .
UNIX
.6.6. mkdir , rmdir
. . , ,
. chdir .
6.6. UNIX

mkdir(name, mode)

rmdir(name)

Opendir(name)

readdir(dirpointer)

Closedir(dirpointer)
chdir(dirname)

dirname

link(name1, name2)

( name2,
name1)

unlink(name)

( name)

533

. 6.29. UNIX

link , . , /usr/jim/jotto :
link("/usr/ast/bin/game3", "/usr/jim/jotto")


, . unlink

534 6.

. , .
, . ,
.
game3 /usr/jim/jotto:
unlink("/usr/ast/bin/game3")

link unlink
.
( ,
) , ,
. RWX (Read, Write, eXecute , , ). ,
,
, . ,
RWXR-X--X , , - (,
, ),
, .
, , (), .
, .

, .
, UNIX.
[Vahalia, 1996].
( , ) 64 , (i-node). ,
, , ...
,
, , .
. ,
UNIX
.
:
. ,
foo.c,
:
open("foo.c", 0)

,
.
,
. ,
/usr/ast/data,
usr. usr, (
UNIX ). ast -

535

/usr/ast.
/usr/ast,
data , , i-node /usr/ast/data.
,
.
, ( ), :
, RWX ( 9 ) ;
( );
;
;
;
;
, ;
, ;
, .
, ,
-.
.
32- , . , 1000000 1.
1000001.
.
10 . 1024 , 10240 . 11
,
. 1024- 32- 256
. 10240+ 256 1024=
= 272384 . 12, 256 . 272384+ 256 256 1024 = 67381248 .
,
13. , 256 . ,
, , 16843018. ,
17247250432. 32- 64-, 4,
, .
. , . ,
.
-
,
. , ,

536 6.

. , ,
. ,
, .
. read, , .
, , -. open
. , .
read write ,
. 10
( );
. lseek
-.
link unlink. link .
i-node
. , . unlink
. 0,
, .
- Windows 7
Windows XP , NTFS (NT File System NT) FAT (File Allocation
Table ).
Windows XP. MS-DOS,
Windows95/98 ( ). FAT USB-
, NTFS.
NTFS 255 .
Unicode, ,
,
. , Unicode Windows7;
, Windows 2000, ,

,
. NTFS
( foo FOO).
, Win32 API
, ,
Win32.
UNIX, , 264 1. ,
32, 64 ,
. Win32 API
UNIX,

537

.
, .
UNIX ,
, . Win32 API
.6.7.
6.7. Win32 API -
API

UNIX

CreateFile

open

DeleteFile

unlink

CloseHandle

close

ReadFile

read

WriteFile

write

SetFilePointer

lseek

SetFileAttributes stat

LockFile

Fcntl

UnlockFile

Fcntl

. CreateFile
.
, API open.
API, . ,
CreateFile :
;
, , (, );
, ,
;
, ,
;
, , ,
;
, , ..;
, .
API UNIX.
, - Windows7 ,
.
,
.

538 6.

API, ,
6.3. (
) 6.4.
, CopyFile,
.
6.4.
API Windows7. C,
Java

/* . */
inhandle = CreateFile("data", GENERIC_READ, 0, NULL,
OPEN_EXISTING, 0, NULL);
outhandle = CreateFileC'newF, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
/* . */
do {
s = ReadFile(inhandle, buffer, BUF_SIZE, &count, NULL);
if (s > 0 && count > 0) WriteFile(outhandle, buffer, count, &ocnt, NULL);
} while (s > 0 && count > 0);
/* . */
CloseHandle(inhandle);
CloseHandle(outhandle);

Windows7 ,
UNIX.
, ( MS-DOS). , . WindowsXP UNIX .
UNIX
, . WindowsXP
, (, C:\windows\system\foo.dll). ,
Windows2000,
UNIX.
.6.8 (
UNIX). ,
.
6.8. Win32 API
API

UNIX

CreateDirectiry

mkdir

RemoveDirectory

rmdir

FindFirstFile

opendir

FindNextFile

readdir

MoveFile

SetCurrentDirectory chdir

539

Windows XP , UNIX. API , ,


. , .
(Security ID, SID), , , .

. , , .
(security descriptor) ,
.
,
(Access Control List, ACL). -
. , ,
, ,
, , XYZ
.
- , , ,
.

. , -.

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

Windows 7. , ,
UNIX. ,
. .
. 512
64, .
. 64- .
(Master File Table, MFT),
.
(i-node) UNIX. . ,
.
.6.30. , ( ,

540 6.

, , ..).
(1
, 2 ). ( ) .
, .6.30.

. 6.30. Windows7

, POSIX, , , .. .
255 Unicode-.
16- ,
MS-DOS,
8, .
MS-DOS (8+ 3),
MS-DOS .
. , WindowsNT4.0,
. Win
dows2000, ,
.

, . [Mullender and Tanenbaum, 1984].
( )
,
.
,
().
264 . , . , ,
0 1 1 . 267
15 . ,
, .

541

NTFS ,
.
[Russinovich and Solomon, 2005].


Windows 7 UNIX , (-) ,
, .
,
. , .
UNIX
UNIX ,
. fork. , . ,
fork,
.
.
, exec, ,
exec. ,
xyz, () fork,
. exec,
xyz.
( exec
), - ,
,
. wait waitpid, , exit.
fork ,
. .6.31. A
fork , B C. B fork , C . , .

. 6.31. UNIX

542 6.

UNIX
, .
, ,
.
, . .
,
4 128 ,
512 ,
, .
SystemV Linux .
.
msgget.
msgsnd, msgrecv.
, , ,
. -, ,
. -, ,
. -, ,
msgrecv , .
. UNIX
. , ,
. . ,
, shmat shmop.
SystemV Linux .
.
POSIX- UNIX .
.
,
, ( , ..).
, .
(, ), .
, -, ,
, , .
..,
.
, Java.
Java , .
? , -.
-, .

543

, . ,
( 20 ),
,
- -.

, -.
,
. , .
, ,
.
UNIX pthreads POSIX (P1003.1C). . ,
, .
.6.9.
6.9. ,
POSIX

pthread_create

pthread_exit

pthread_join

pthread_mutex_init

pthread_mutex_destroy

pthread_mutex_lock

pthread_mutex_unlock

pthread_cond_init

pthread_cond_destroy

pthread_cond_wait

pthread_cond_signal

. , pthread_create,
.
. ,
, pthread_exit. , , pthread_join.
, pthread_
join . .
, (mutexes).

544 6.

- (, , ). ,

. , .
( , : 0 1).
pthread_mutex_init pthread_
mutex_destroy . : . , pthread_mutex_lock,
. , . , , ,
pthread_mutex_unlock.
(,
), (,
, ). (condition variables).
pthread_cond_init pthread_cond_
destroy .
:
. , , , , , ,
pthread_cond_wait. , ,
( ),
pthread_cond_signal.
, . , , .
, . , , .
Windows 7
Windows7 .
, , .
- .
CreateProcess API.
10 , . ,
UNIX, fork , exec
: ,
. 10
CreateProcess.
;
( );

545

;
;
, , -

(, , , , );
;
;
, ;
, 18

.
Windows7 .
. 18 , , (
),
,
. ,
, ,
.
Windows7 ,
. , , CreateThread
6 10: , , ,
, (
) . , (
, ,
).
,
, . ,
, , .
,
.
, , . , , .
: , , , , ,
. : .
. ,
UNIX. , 128 128 (
512 , ). ,
, .
, .
, , .

546 6.

,
.
A B
B A
A.
. ,
.
(), .
, . ,
, . , ,
- -.
Windows7 (, , , ).
, ,
,
.
CreateSemaphore API,
. ,
. DuplicateHandle , .
up down, : ReleaseSemaphore
( up) WaitForSingleObject ( down).
WaitForSingleObject ,
,
0 ( ).
, , . , ,
API (WaitForSingleObject) (ReleaseMutex).
, , ,
.
.
, .
, ,
.
EnterCriticalSection LeaveCriticalSection
. API , , .
, .
, WaitForSingleObject. SetEvent
,

547
PulseEvent . ,
.
, , . ,
. ,
, .


, .
, - .
, , ,
.
,
.
. , .
.
. Corei7, OMAP4430 , .
- .
, ,
, ,
-. , . .
, .
. ,
( ) ( ).


.
. ,
. .
- .
UNIX Windows7 . . , , . ,
.

548 6.


1.
3,
?
2. 32- . 4.
?
3. ? , , 4000?
, ?
4. 8 4 . 1024 .
.6.10.
6.10. 4

1) , .
2) 0, 3728, 1023, 1024,
1025, 7800 4096?
5. 16
4 . . :
0, 7, 2, 7, 5, 8, 9, 2, 4
1) LRU
?
2) FIFO
?
6.
FIFO.
. : , .

549

7. ,
,
, ,
.
(, ). , ,
? ?
8. , . - , ,
. ,
, , ,
, ?
9. .
2- , 2-
11- .
32, 2. , , , , .
.6.11.
6.11. 9
0

14

15

12

.6.12
. , ,
.

550 6.
6.12. 9

1.

2.

10

3.

2047

4.

5.

6.

14

7.

100

8.

50

9.

10.

60

10. - . , .
- ,
? .
11. , , , , . , 4- ,
, 4096,
5000. ?
12. Corei7
, .
, Intel ?
13. Corei7 10
8000. BASE 10
10 000. Corei7?
? ?
14. .
15. . ,
?
16. , .
,
. , , -
, .
: LRU FIFO. ?
17.
.

551

( ).
, .
-?
18. , open?
19. . 800 ,
5 32 . ( ), , ?
, , 32 .
20. ( ) . ?
21. , .
22. ,
. , N (N>> 1).
, , ..
,
,
i 2i.
?
23. - ,
,
, . ,
? .
24. ,
,
8. , 10%
( ) 95%
.
, ?
25. .
, up down ( ),
,
. ,
.
. , :
1) ,
100 ?
2) , ?

552 6.

26. :
, ,
.
up?
27. , ,
,
. , ( ).
, , peek.
,
. , ,
down. ,
? ?
28. , 0 1000 , P1, P2 P3 , . up down
. up,
, P1
P2 P3 .. ,
1.
yy t = 100 P1 down.
yy t = 200 P1 down.
yy t = 300 P2 up.
yy t = 400 P3 down.
yy t = 500 P1 down.
yy t = 600 P2 up.
yy t = 700 P2 down.
yy t = 800 P1 up.
yy t = 900 P1 up.
29. ,
,
. ,
, . , ,

(, ).
30. , ( TSL Test and Set Lock).
TSLX X. 0, 1 ,
. 0, TSL

553

. TSL, lock
unlock : lock(x) , x. , x
; unlock . x , ,
, x .
,

, .
lock unlock . (
, .)
31. in out 65
? in out 0.
1) 22 ;
2) 9 ;
3) 40 ;
4) 17 ;
5) 12 ;
6) 45 ;
7) 8 ;
8) 11 .
32. , UNIX 2
512 ( , ).
? ,
64.
33. , UNIX
.6.27:
unlink("/usr/ast/bin/game3")

, .
34. , UNIX- , . , -
, .
pipe,
. -
-? ?
.
35. UNIX,
.
,
- . , ,

554 6.

, ,
. , ,
, , . ?
36. Windows7 ,
,
. ?
37.
Windows7: .
, .
38. . , ,
,
64 1.
64 , .
,
.
, ,
. , . ,
, ,
( ),
. .
, ,
: LRU FIFO.
, x% 4 , . x
.
39. , 6.1, ,
. , -
. , ,
. ,
,
m.in m.out - .
, ,
, ?
40. UNIX Windows7,
. ,
, .
,
. ( ).

7.

46 , .
,
. . , ,
.

, . , ,
, , , , , , . ,
. , , ,
.
, (
) , . , , ( ). ,
, ,
, .
1. .
, ,
, , . :
1. .
2. .
.
. :
. ,

(, Java-).

: , .
,
1

,
( ). ,
, . . . .

556 7.

: ,
( ).
. . ,

, ( ), ,
.


. ,
, , .
(, Java C),
, , .

?
,
. , , , .
,
n
n .
, ( ), .
. , (add),
(subtract), (multiply) (divide) ADD, SUB,
MUL DIV, , . ,
, ,
.
. , , , , .
, ,
. , ,
.
,
. -, -

557

( ). -, , ,
. , ,
. , , , Java- .

, . ,
, , ,
, ,
, .
(, C) .
, ,
.
, , , , .
.


.
, .
, , .
? : . , , ,
, , .
.
(, -,
, ) BIOS,
, .
,
, . ,
, .
. -,
, , . ,
, .
, - ( ).
-, . ,
,
.

558 7.



,
, . 7.17.3 x86,
N= I+ J. I, J N,
.
7.1. N = I + J x86
FORMULA:

MOV
ADD
MOV

EAX,I
EAX,J
N,EAX

; EAX = I
; EAX = I + J
; N = I + J

DD

DD

DD

;
;
;
;
;
;

4
3
4
4
4
0

Intel ( x86) , .
Microsoft MASM. ARM,
x86, .
: , , .
. , , .
,
.
: FORMULA, I, J N. MASM ,
. - ,
.
.
, , , .
.
6 8 . .
.
,
. Corei7 EAX, EBX, ECX ..

( ), . ,

559

-. MASM
MOV , . MOVE
LOAD STORE.
. MASM DD
(Define Double ), 8088
16 .
,
.
, .
, . , , ..
,
. ,
,
, .
(
).
.

,
, ,
(,
). , . 7.1 DD. .7.1 ()
MASM x86.
7.1. MASM

SEGMENT

(, ..)

ENDS

ALIGN

EQU

DB

DW

16-

DD

32-

DQ

64-

PROC

560 7.
7.1 ()

ENDP

MACRO

ENDM

PUBLIC

EXTERN

INCLUDE

IF

ELSE

, IF

ENDIF

COMMENT
PAGE

END

SEGMENT , ENDS .
, ,
..
ALIGN ( ) ,
. , 61 , ALIGN 4
64.
EQU .
, BASE 1000:
BASE EQU 1000

, EQU,
, , :
LIMIT EQU 4 * BASE + 2000

, MASM, ,
, .
DB, DD, DW DQ 1, 2, 4 8 . :
TABLE DB 11, 23, 49

3 11, 23 49 , , TABLE,
, 11.
PROC ENDP .
, . MACRO ENDM
. .

561

PUBLIC EXTERN () . .
, ,
, .
, (),
,
PUBLIC.
, , (EXTERN), . , ,
. , , FOO
, ,
.
INCLUDE
. ,
, .
, MASM, . :
WORDSIZE EQU 32
IF WORDSIZE GT 32
WSIZE: DD 64
ELSE
WSIZE: DD 32
ENDIF

32-
WSIZE. : 32, 16 WORDSIZE ( 16).
, 32-,
64- .
IF ENDIF, ,
WORDSIZE, .
,
.
, WORDSIZE, ,
. .
COMMENT
( ) - . PAGE
. , END .
MASM . x86 , , .

, , .

562 7.

, , ,
.
,
. ,

. (, ), ,
. .

,
. , .
, . 7.2
x86, P Q. :
MOV
MOV
MOV
MOV

EAX,P
EBX,Q
Q,EAX
P,EBX

7.3 SWAP.
.
7.2. P Q
MOV
MOV
MOV
MOV

EAX,P
EBX,Q
Q,EAX
P,EBX

MOV
MOV
MOV
MOV

EAX,P
EBX,Q
Q,EAX
P,EBX

7.3. P Q
SWAP

MACRO
MOV EAX,P
MOV EBX,Q
MOV Q,EAX
MOV P,EBX
ENDM
SWAP
SWAP


-, :

563

, ;
, ;
, (, ENDM).

, .
, ( SWAP), .
,
.
, . . ,
7.2 7.3, .
,
.
.
.
,
. , ,
,
. .7.2 .
7.2.


, ?

,
, ?



-
?

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

564 7.

( ). .

.


, . ,
. , 7.4
P Q, RS.
7.4.
MOV
MOV
MOV
MOV

EAX,P
EBX,Q
Q,EAX
P,EBX

MOV
MOV
MOV
MOV

EAX,R
EBX,S
S,EAX
R,EBX

, , , .
.
7.5 7.4,
. P1 P2 . P1
, P2
. :
CHANGE P,Q

P , Q
. , 7.4 7.5 .
7.5.
CHANGE

MACRO P1,P2
MOV EAX,P1
MOV EBX,P2
MOV P2,EAX
MOV P1,EBX
ENDM
CHANGE P,Q
CHANGE R,S

565



, , .
MASM. :
. , ,
. ,
, . .
( MASM) (LOCAL),

.
.
MASM
. .
IF:
M1
M2

M2

MACRO
IF WORDSIZE GT 16
MACRO
...
ENDM
ELSE
MACRO
...
ENDM
ENDIF
ENDM

M2 , ,
: 16- 32-.
M1 , M2 .
, .
, ,
( ),
,
. , .


:
.
.
, ,
. , ,

566 7.

,
.

, , . .
. , ,
. CHANGE. , &.
MOV EAX,&P1;MOV EBX,&P2;MOV &P2EAX;MOV &P1,EBX;

.
, . , , .

. , , ,
. &
.


, .
, , , .


,
, ,
, ,
, . , . , , .
, L.
, L. L - ,
, . (forward reference problem) , L (
, ).
. -,
. , , , . -

567

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


, ,
:
BUFSIZE EQU 8192

, ,
. , (Instruction Location
Counter, ILC). 0
.
7.6 x86.
7.6.
MARIA:

MOV
MOV
ROBERTA: MOV
IMUL
IMUL
IMUL
MARILYN: ADD
ADD
STEPHANY: JMP

EAX,
EBX,
ECX,
EAX,
EBX,
ECX,
EAX,
EAX,
DONE

I
J
K
EAX
EBX
ECX
EBX
ECX

;
;
;
;
;
;
;
;
;

EAX = I
EBX = J
ECX = K
EAX = I
EBX = J
ECX = K
EAX = I
EAX = I

*
*
*
*
*

I
J
K
I + J * J
I + J * J + K * K
DONE

5
6
6
2
3
3
2
2
5

100
105
111
117
119
122
125
127
129

,
, : ,
. .
,
.7.3. ,
(, EQU).
(

568 7.

), .
:
, ;
( ,
, ,
);
,
.
7.3. 7.8

MARIA

100

ROBERTA

111

MARILYN

125

STEPHANY

129

, ,
(.7.4).
, ,
, , ,
(
).
7.4. x86

AAA

37

ADD

EAX

immed32

05

ADD

reg

reg

01

19

AND

EAX

immed32

25

AND

reg

reg

21

19

ADD. ADD EAX, 32- (immed32),


0x05, 5 (
, 8 16 ,
, ). ADD
, 2 , 0x01.
, , 19 , ADD
. ,
.
,
.

569

.
, .
, IBM3090
. 14 5 :
L 14,=F'5'

, ,
, 5, , L. ,
, . ;
.
, . ,
, ,
. ,
. ,
,
. ,
, , . ,
.
7.7 ,
. ,
.
. , ,
, .
7.7.
public static void pass_one() {
//
boolean more_input=true;
// ,
String line, symbol, literal, opcode;
//
int location_counter, length, value, type; //
final int END_STATEMENT = -2; //
location_counter = 0;
initialize_tables();
while (more_input) {
line = read_next_line();
length = 0;
type = 0;

// 0
//
//
//
//
//
//

more_input END
""

#

if (line_is_not_comment(line)) {
symbol = check_for_symbol(line);
if (symbol != null)

// ?
// ,
//

570 7.
7.7 ()
enter_new_symbol(symbol, location_counter);
literal = check_for_literal(line); // ?
if (literal != null)
// ,
//
enter_new_literal(literal);
// . -1
opcode = extract_opcode(line);
//
type =search_opcode_table(opcode); // ,
// , OP REG1,REG2
if (type < 0)
// ,
// ?
type = search_pseudo_table(opcode);
switch(type) {
//
case 1:length=get_length_of_type1(line); break;
case 2:length=get_length_of_type2(line); break;
//
}
}
write_temp_file(type, opcode, length, line); //
//
location_counter = location_counter + length; //
//
if (type == END_STATEMENT) {
// ?
more_input = false;
// ,
// :
rewind_temp_for_pass_two();
//
sort_literal_table();
//
remove_redundant_literals();
//
}
}
}

, , check_for_symbol,
, , , . ,
get_length_of_type1 get_length_of_type2,
. , , ,
.
,
. ,

. read_next_line. (, -
), , pass_one .

, (, ADD),
( ) . , ,
.

571

-.
-, ,
-
, ,
. , ,
. , .
END .
, . .



( ). , ,
, . 7.8
.
7.8.
public static void pass_two() {
//
boolean morejnput = true;
// ,
String line, opcode;
//
int location_counter, length, type; //
final int END_STATEMENT = -2;
//
final int MAX_CODE =16;
//
byte code[] = new byte[MAX_CODE];
//
//
location_counter = 0;

//
// 0

while (more_input) {

//
//
//
//
//
//
//
//

type = read_type();
opcode = read_opcode();
length = read_length();
line = read_line();

more_input END
""





if (type != 0) {
// 0
switch(type) {
//
case 1:eval_type1(opcode, length, line, code); break;
case 2: eval_type2(opcode, length, line, code); break;
//
}
}
write_output(code);

//

572 7.
7.8 ()
write_listing(code, line);
//
location_counter = location_counter + length; //
//
if (type == END_STATEMENT) {
// ?
more_input = false;
// ,
//
finish_up();
//
}
}
}

: . , ( ),
, , ,
. eval_type1,
eval_type2 .. (,
-).
code. . , write_code

.
() ,
( ), ,
.
.
, .
, - , ,
.
:
;
;
;
;
;
8 9;
(, );
END.
.
.
,
,
. . ,
,
.

573


. , .
.
.
,
( , ). .
,
( ), ( ). -
, ,
. ,
, .
. .
, ,
.
, , .
, .
, . , .
.
, . , n log2n
. , , ,
.
.
-, () 0 k 1. , ASCII-
, ,
k .
,
. , k
, 0 k 1. ( , ),
i, ,
i -. - n
k , n/k. k, n,
. k
, .
.7.1.

574 7.

. 7.1. : , -,
(); - 8
( )


. .
. ,
. ,
, -: ,
, .
(.7.2):

575

1. .
2. .
, .

. 7.2.

,
. ,

.
, ,
. Windows
.obj, .exe. UNIX
.o, .

. .

,
.
, .7.2,
,
.
, ,
( ) .
, .


0. ,
0. .7.3
4 , .
BRANCH MOVE
.

576 7.

. 7.3. ,

,
, (.7.4,).

. , .
, ,
, ,
, , , , .
( ) 100.
.7.4,. , . ,
, A.
MOVE, 300.
.
,
.7.3 . (,

577

. 7.4. ,
();
( ).
,

578 7.

x86)
, . x86
OS/2 . Windows UNIX
,
.
, .7.4, .
400 B,
,
, CALL B, B .
. .

.
:
1. .
2. .
3. , , ,
.
4. , ,
.
7.5
, .7.4. ,
.
7.5. , .7.4

400

100

600

500

500

1100

300

1600

.7.4, , .


:
1. .
2. .
3. .
4. .
5. .
6. .

579

, ,
(, ),
.
,
, .
. , bigbug, "bigbug" .
, , PUBLIC
, .
, , .
, ,
.
, , .
,
. , ,
EXTERN , . .
.
,
. , .
.
, ,
(. .7.4). ,
4 , .
, .
, , .
,
, , ,
.
.
, ,
. , .



, , ,
.
,
.

580 7.

.7.5 , , (. .7.4, ) 400, 100,


. , - .

. 7.5. .7.4,, 300 .


581

,
.
, ,
.
(, BRL). ,
, L, . , ,
:
1. .
2. .
3. , .
4. .
5. , .
6. , .
, ,
, (, ,
, ).
,
, , . , , ,

(. .7.5).
. -, ? -,
? .
, .
.
, .
, , .7.4,,
. , , A, B, C D, ,
.
.
,
, ,
. .
,
, .
. CDC6600 .

582 7.

, , .
.
.
, . ,
. ,
, (
, , , Intel 8088, ).
, .
, ,
. ,
, (, -), -.
-
.


, , : , , .
,
.
, . ,
.

. .
MULTICS,
.
.
MULTICS
MULTICS ,
(linkage segment).
, .
, ,
, .
,
, .7.6,.
, ,
.

583

. 7.6. : EARTH ();


EARTH ( )


. ,
,
.
( ),

584 7.

, .7.6,. ,
, , , .
,
. ,
, .
.
Windows
Windows, Windows NT,
. , DLL (Dynamic Link Library
). , .
,
. DLL- .dll,
, .drv ( driver libraries)
.fon ( font libraries).
DLL , ,
. .7.7 ,
DLL-, 4 , A, B, C D. 1 A; 2 C,
.

. 7.7. DLL-

DLL- .
DDL ,
DLL , ,

585

DLL. DLL-
, .
DLL- Windows .
DDL-, .

, , .
DLL-
.
, ,
,
. ,
, DLL- ,
, DLL- ,
.
DLL
, DLL- (
). . , DLL-
, . ,
, ,
DLL-, ,
, DLL- .

, DLL-.
DLL- :
.
,
. ,
DLL-.
, DLL-.
. ,
, , Windows , DLL-
. , , (
, ). ,
(
, .7.6). .
; DLL- ,
.
.
, DLL- -

586 7.

.
, DLL-,
,
. , ,
DLL-.
DLL-, .
, DLL-
( ).

. , ( ), , .
.
UNIX
UNIX , DLL Windows. DLL-, ,
,
.
C .
UNIX , : (host library),
,
(target library), .
, DLL.


, .

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

587

.
.
.
, . , ,
, .
, . . (), , .
, , . ,
. ,
. UNIX (DLL)
Windows .


1. 2% 50% .
. , C
100 -, 10
, 4 .
1) C.
2) .
3) C, 2% .
2. ? .
1) .
2) .
3. x86
, .
?
4. ? EQU
, .
P
Q
R
S

EQU
EQU
EQU
EQU

Q
R
S
4

5. 40- . , -

588 7.

,
. ,
, Q .
? .
6. ?
7. ?
? .
8. x86 ( 1000)?
EVEREST:
K2:
WHITNEY:
MCKINLEY:
FUJI:
KIBO:

POP BX
PUSH BP
MOV BP,SP
PUSH X
PUSH SI
SUB SI,300

;
;
;
;
;
;

(1
(1
(2
(3
(1
(3

)
)
)
)
)
)

9. ,
(, MOV )? .
10. ,
Berkeley : Ann Arbor, Berkeley, Cambridge, Eugene,
Madison, New Haven, Palo Alto, Pasadena, Santa Cruz, Stony Brook, Westwood,
Yellow Springs.
, , .
11. ,
?
12. - .
(a= 1, b= 2 ..)
-. - 19 ( 0 18).
els, jan, jelle, maaike
? , ?
13. , ,
, -, . n ,
(
). , ,
. , ..
, .
, , R,
, ?
14. , - ,

589

.
, ?
15. x86 .
SEGN, N.
?
16. DLL.

DLL-, ?
17. DLL-
? ,
? ? , , ?
18. () :
, ,
(EXTERN).
, ,
. ? ,
?
19. ? ? , ? , ?
20. .
,
. ?
21. , .
22. 5 200, 800, 600, 500 700
. ,
?
23. , : enter(symbol, value) lookup(symbol, value).
, .
- .
24. , -
.
25. Mic-1,
4. , , .
26. , , .

8.

,
.
. ,
.
,
. , ,

( , ).
,
.
. -
.
, ,
,
,
(, ).
, , ( ).
0,001, 1000 , 1.
,
.
.

.
.
. ,
. , ,
10 .

. , ,
, , . .

591


510 .
, ,
.
( ). , ,
.
,
. , (grids).
, .

,
(tightly coupled). ,

,
(loosely coupled).
. , ,

. .8.1.

. 8.1. (); ( ); ();


( ); ()

,
, .
9.

592 8.



, .

, ,
.
, . .


, , . , ,
: VLIW.
, .
.2.5.
.
.
, .
. ,

,
.

(Very Long Instruction Word, VLIW).
VLIW-, , ,
. , .8.2, .
, ,
. VLIW
. ,
6 , 5, 32 ,
134 , , , .
. ,
, (.8.2, ).
VLIW- -
, , (.8.2,).
. , , .

593

. 8.2. (); VLIW- ( );


()

, VLIW-
. . ,
,
, . ,
,
Itanium.
, .
,
[Chou et al., 2004].

594 8.

VLIW- TriMedia
5 Itanium 2
VLIW. VLIW- TriMedia Philips. TriMedia
, - , CD-, DVDMP3-, CD DVD, , , .. ,
TriMedia Itanium 2 .
TriMedia- . .
266 366, ,
.
TM3260 .
TriMedia .
TriMedia- .8.3.
8-, 16- 32- IEEE 754
.

TriMedia , , .

. 8.3. TriMedia-

TriMedia , . (16 )
(32 ) .
,
, .
. 8- - (64 ) .
64 ; 16 .
128 32- .
R0 R1 . 126 .
, 32- :
, ,
. , 64- . 300
2000 .

595

Trimedia TM3260 11 , , (
, ). .8.1. .
. (, ) . , , , . ,
, ,
. , , , .
8.1. TM3260 ,

# 1

32-

32- - 2

17

2


( 16-
8- )

2
( 16-
8-
)

596 8.

,
. ,
.

,
. , , ,
.
.
. , TriMedia RISC- , ,

. 8, 16 32.

.
,
.
, , .
.
,
( 15 ). .
, , . (Digital Signal Processor, DSP).
, ,
,
(saturated arithmetic). - ,
.
, 8- 130 130 255.
,
. , .
26, 34 42 . TriMedia- ,
2 28 (
).
TriMedia-
.
, .
.
Corei7 , ,
. TriMedia -

597

,
.
, , .
Itanium 2, TriMedia . (
) ,
. ,
; .
( ) . :
IF R2 IADD R4, R5 > R8

R2,
, R4 R5 R8.
,
R1 ( 1). R0 ( )
.
TriMedia 15 , .8.2. , , .
8-, 16- 32- . , 40 340 0 255
40 255. .
8.2. TriMedia

, ,
(DSP)
(DSP)

(DSP)

(DSP)

16-

8- 16-

, ,

598 8.
8.2 ()

8-

8-

.8.2 , .
.
,
, .
32-
. ,
RGB (Red, Green, Blue , , ) 8- , . (,
) ,
( RGB), (
YUV, ). ,
8- .
TriMedia . 8- ,
(.8.4, ). 44
16 8- A P. ,
, .8.4,.
?

. 8.4. 8- (); ( );
, ();
( )

12 , ,
12, (, ). ,
24 , .

599

. ,
R2 R5 (
.8.4, ).
,
(.8.4, ). .
( 24 8),
-
.
TriMedia . . ,
. ,

. 4 5 R2 R3,
R4 R5.
, ,
1, 2 3 . 8
, . ,
6 , 14 30
, , .
. ,
TriMedia
.




, , .
(on-chip multithreading).

.
: 1 ,
, 2.
, ,
. , (fine-grained multithreading), ,
, .8.5. .8.5, (A, B, C ), 12 .
A A1. , A2.
, .

600 8.

5. , B C
.
. ,
,
.

. 8.5. .
(); ( );
()

,
(.8.5,). 4 , A1, , A2
A1, .
,
. 4
4 ..
, . , ,
. ,

.
.
, . ,
, .
: k ,
, , k ,
,
.
, .
,
, , (coarse-grained multithreading), .8.5,. A
, . .
B
(B1). , 6 C1.

601

, ,
, ,
.
.
, ,
.
, (, ,
) , .
( ) . ,
,
, .
.
-
. ,
.
. , . ,
, ,
.
,
. , . .8.6
, ,

. 8.6, . ,
A ,
B .

. 8.6. : ();
( ); ()

602 8.

.8.6,
,
. , ,
;
.
(simultaneous
multithreading), .8.6,.
,
,

. .
- .
, 11 B8,
12 C 7.
[Gebhart
et al., 2011; Wing-kei et al., 2011].
Core i7
,
Corei7. 2000- , Pentium4, , Intel
. , Pentium 4 , Intel
.
.
1. .
2. .
3. .
4. .
5. .
,
, . ,
, . ,
: (
, ) (
).
, , .
-,
, . -,

603

,
-
, . , ,

.
,
. ,
,
?
,
,
, , , -,
, .
, ,
, , , .
, . ,
, . Intel
, 5% 25%.
Intel Xeon 2002.
, 3,06, Pentium4 ( Corei7). Intel
(hyperthreading).

(
).
Corei7 .
. , . ,
,

, .
,
, . ,
.
, , .

, .
.

604 8.


, .
Intel : , ,
. .
(resource duplication). , . ,
,
. ,
(EAX, EBX ..) ; ,
.
(partitioned resource
sharing) . , , 1, 2.
, .
. ,
,
, , . ,
, .
(full
resource sharing).
, .
, ,
, , .
, , , ,
.
, - .
,
.
(threshold resource sharing).
() .

- . , ,
3/4 ,
. Corei7
. ,
, .
, -

605

( , ,
). 5% ,
. , ,
(, ),
. ,
(, ),
.
Sandy Bridge, Corei7, .8.7;
.

. 8.7. Corei7

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

3/4 . ,
- ( , ).
- ,
, .
Intel
[Gerber and Binstock, 2004; Gepner et al., 2011].

606 8.


, , .
. ,
, .
.

( ),

.
( ), ,
2, . ,
-.
, ,
,
( , ,
).
. (.8.8,)
,
. (.8.8, )
, .
(, , -
-), , , .

. 8.8. : ();
( )

( ) ; ,
, .

. ,
.

607

.
,
, .
Core i7
Core i7 ,
.
Corei7 . 8.9.

. 8.9. Core i7

Corei7
, L2.
-.
L3.
L2 L3 . ,
, . ,
.
, , (
, ). , .
Corei7 : -,
-
, - , ,
.
.

, :
, DVD-, , , .. .
, , -

608 8.

, ,
-. , , , , , ,
.
DVD-. :
1. , .
2. .
3. .
4. .
5. MPEG-2.
6. .
7. NTSC, PAL SECAM.

, ,
, , .
CD, DVD Blu-ray (.,
, .2.21). DVD
, Blu-ray, Blu-ray DVD,
, MPEG-4
MPEG-2.
.
.
, . ,
.
MPEG-2,
.
, . , - ,
NTSC, PAL SECAM , DVD-. ,
.
, . DVD- .8.10.
, .8.10, ;
. ,
DVD MPEG-2 (
Motion Picture Experts Group
).
.

609

. 8.10. DVD-

, ( x, y)
. , MPEG-2
. , -

.
, DVD- . ,

,
, DVD.

(CDMA GSM), - , , , ,

(IEEE802.11, WiFi).
, , , .
, GPS-, ,
.
.
. (, ,
)
.
, , . , .

610 8.

, , , ,
. ,
, , , , .

. , 50 75%
. .
- ? -, ?
? ?
? : SRAM ,
, SDRAM? , .
, . ,
,
.
. ,
(token).
. , . ,
.
CoreConnect IBM (.8.11).
.
CoreConnect
, PCI Pentium. , PCI CoreConnect

, , .
CoreConnect . 32, 64
128 , 66, 133
183. 23,4/ (
, PCI 4,2/).
. ,
PCI, .
, MPEG-2, .
,
- (UART,

611

. 8.11. CoreConnect IBM

, USB-, -
..) , , . 8-, 16- 32- ,
.
,
300/. ,
, PCI ISA, ISA .
CoreConnect .
,

. , .
, CoreConnect
PCI, . , PCI
. CoreConnect
,
.
,

.
(ARM, MIPS, PowerPC ..), MPEG,
-.
CoreConnect, . AMBA (Advanced Microcontroller Bus Architecture
ARM
- [Flynn, 1997].
VCI (Virtual Component Interconnect ) OCP-IP (Open Core Protocol-International Partnership

612 8.

) . [Bhakthavatchalu et al., 2010].


, ; [Ahmadinia and Shahrabi, 2011].
- , , .
[Gupta et al., 2010; Herrero et al., 2010;
Mishra et al., 2011].

,
, . , . IBM 360 -
. CDC 6600 10 ,
-.
. DMA .
;
.

( - IBM360), (
) (
). ,

. , :
, .



. ,
. ,
, .
.

:
(Local Area Networks, LAN) , , (Wide Area Networks, WAN)

613

, .
Ethernet.
Ethernet ,
(vampire tap)
. Ethernet
( .8.12).
Ethernet 3/, 10/.
Fast Ethernet Gigabit Ethernet 100/ 1/ .
10/,
40/.

. 8.12.

. , , .
641500 , . , ,
, ,
.
(store-and-forward packet switching).
, , .
, .
.8.12 .
- , ,
ADSL (.2).
. .8.12
,
. , ,

614 8.

,
(Internet Service Provider, ISP). ( ) , .
, .
, -,
, ,
(, ). ( ),
. ,
, , .8.12, .
,
, , . , - , HTTP (HyperText Transfer
Protocol ) GET PAGE
, , . , .
,
,
.
.
,
.
GET PAGE. -? TCP (Transmission
Control Protocol ). ,
, ,
, .
TCP ,
.
. HTTP GET PAGE,
TCP, . TCP
, . TCP-.
, TCP TCP ( GET PAGE)
, IP (Internet Protocol ). IP-
( , )
(, ), ,
(
, ), (
) .
( IP-, TCP- GET PAGE) ,

615

. , CRC (Cyclic
Redundancy Check )
. , ,
IP , , ,
. CRC-
, CRC- , . .8.13
, Ethernet.
(ADSL) , Ethernet-
. ,
. , ,
.
[Tanenbaum and Wetherall, 2011].

. 8.13. Ethernet-


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

. ,
,
, .
,

. , ,
, ( ), ( ),
..
40 /,
1,
5 . 64
80 .
12200 ,
, .
.

(Application-

616 8.

Specific Integrated Circuit, ASIC). ,


.
ASIC. ,
. ,
. , ,
, . , ,
,
() . ,
, .
(Field Programmable Gate Array, FPGA).
, .
,
, .
, ,
ASIC,
, .
, , ,
. , , , .
.
, , ,
, ( PCI),
, , ,
. .8.14.
(SRAM), (SDRAM)
. SRAM SDRAM, -
.
, SDRAM . ,
,
. , (
, , )
, .
. ,
, . ,
.
, PPE- (Protocol/
Programmable/Packet Processing Engine

617

. 8.14.

), RISC- (,
)
.
PPE-.
PPE- .
, PPE-, . PPE- ,
SDRAM,
PPE-. ,
.8.14, , PPE-
.
PPE- ,
PPE- , PPE- .
, 2. PPE-
.
PPE-
,
, , . ( ) , .
(, SDRAM, ),
PPE- , . PPE-,

SDRAM .

618 8.

PPE-, ,
(, ).
RISC- ,
. ,
,
.
(ASIC), ,
.

.

,
, .
(ingress processing)
(egress processing).
, ( ),
. ,
, . ,
(, ).
, , , ,
, .
1. . Ethernet,
(CRC-) , , , .
CRC Ethernet- , IP- . , IP-
, IP-. , , .
2. .
, . Ethernet- Ethernet, IP- IP-.
( PPE), SRAM ( ).
3. .
.
, .
4. .
, ,
-, -

619

. ,
.
5. . IP- 32- . ( ) 232 .
,
. , , ,
, .
.
6. . , SRAM, , . ,
.
7. .
() TCP-,
, TCP, IP, Ethernet
. , (, , )
.
.
8. .
, ,
. .
9. . ,
. , IP-
, . , .
10. .
. , . ,

.
.
11. . . IP-
, Ethernet-
.
12. . ,
. .
13. . :
, ,
.. .

620 8.


.
? , , . ,
, , .
, , , . ,

, .
. ,
,
. ,
.
PPE- .
, ,
.
, ,
.
,
.
,
. , (SRAM SDRAM), , ,
.
, , .
[Freitas et al., 2009; Lin et al., 2010;
Yamamoto and Nakao, 2011].


(, 3D-).
.
, .

NVIDIA Fermi
, ,
NVIDIA Fermi ,
.

621

Fermi .8.15. 16 , SM (Streaming Multiprocessors),


. 32 CUDA;
, Fermi 512 CUDA.
CUDA (Compute Unified Device Architecture)

. SM 32 CUDA
.2.6. 16 SM 768- ,
DRAM.
DRAM
( PCI-Express).

. 8.15. Fermi

Fermi , , .
, 16 , , ,
, . SIMD (SingleInstruction Multiple Data); , SM .
SM NVIDIA
512 .
Fermi (

622 8.

),
, Corei7 OMAP4430.
SIMD SM ,
.
16 CUDA
. , NVIDIA
CUDA, .
,
.
(
), 16 ( ,
16 ). SM , , - .
.
, ,

. SIMD-
: , ,
.. GPGPU (GeneralPurpose Graphics Processing Units).
512 CUDA Fermi
.
Fermi ,
.8.15. SM ,
1. CUDA
SM. 1 DRAM.
, SM
16- 48- 1, 48- 16- 1.
SM 2 768.
DRAM, 1.
SM,
SM.
DRAM, ,
, ,
Fermi.
DRAM,
.
Fermi
. GTX580 Fermi, 772 512
CUDA, 1,5

623

250 . , , GTX580 600 .


: 1990- Cray-2
0,002 30 .

150 . GTX580 750
, 50000 600
. , ?

. 8.16. Fermi

, ( ) ,
. , .
()
, .
, , .
:
.
(
). (1024-),
.
, . ,

624 8.

PCI-. ,
, . ,

, . [Gaspar et al., 2010; Haghighizadeh
et al., 2010; Shoufan et al., 2011].

, ,
.
. .
, , .


,
, - ,
. ?
: . . ,
, .

, , ,
(.8.17,). , ,
,
. LOAD STORE
. .

, .
. . ,
.
, .8.17,.
16 ,
16. ,
,
, . ,
, , .

625

. 8.17. 16 , (); ,
16 , ( )

, .
,
. ,
,
, . ,
, ,
.
, , (, ..).
-
, , -.
-.
-
, (Symmetric MultiProcessor, SMP).

, .
, (.8.18,).
,
,
, LOAD STORE,

. , , ,

.

, -

626 8.

. 8.18. 16 ,
(); .8.16, 16
()

.
IBM BlueGene/L, Red Storm Google.
, ,
.
,
LOAD STORE. ,
.8.17, ( 0) , ,
( 1), ,
. 0 .8.18,,
1.
.
0 - , ,
. 0 . 1
, ,
. 0 ,
, .
send receive. , .
.
,
, . , , .

627

: , ? :
,
. ,
, , , 10000 , .
50000 .
, :
, , ,
.
. ,
-,
.

, .
, ,
.
, , .
,
.8.19. .8.19, , , .
,
. ,
,
. , ,
, .
.

, , , .
(Distributed Shared Memory,
DSM),
(. .8.17,),
[Li and Hudak, 1989].
LOAD STORE, , ,
.
,
,
.
-, ,
. ,
, . , .
.

.

628 8.

. 8.19. , :
(); ( ); ()

,
( ). , Linda ( , ).

. ( Linda),
.
,
, Orca.
Orca , Linda, ,
. , ,
. ,
,
. Linda Orca .

,

629

. ,
- .
[Flynn, 1972; Treleaven, 1985], , ,
. ,
(.8.3).
8.3.

SISD

SIMD

MISD

MIMD


. . n
n , , n .
. ,
, .
- ,
4 (. .8.3). SISD (Single Instruction stream Single
Data stream ) .

. , SIMD
(Single Instruction-stream Multiple Data-stream ), ,
, ,
. SIMD- ILLIACIV
(..2.6). SIMD- ,
SIMD-. SSE- Pentium
SIMD-. , ,
SIMD, , . [Kapasi et al., 2003].
MISD (Multiple Instruction-stream Single Data-stream ) .
. ,
, MISD .
MIMD (Multiple Instruction-stream Multiple Datastream ).
.
. , MIMD-.

630 8.

(.8.20). SIMD-
.
, ,
. ILLIACIV,
.

. 8.20.

MIMD
( ) ( ). .
UMA (Uniform Memory
Access ), NUMA (NonUniform Memory Access
) COMA (Cache Only Memory Access
-). ,
.
UMA- . ,
, . ,
, ,
.
. ,
.
NUMA-, , .
,
, , -

631

, .
, . COMA- , .
, .
MIMD- ,
. , ,
, , LOAD.
.
LOAD
. ,
LOAD STORE, ,
. , .

, NORMA (NO Remote Memory Access
).
. MPP (Massively Parallel Processor
) ,
,
.
SP/3 IBM.

( ),

. , ,
,
, MPP-. (Network Of
Workstations, NOW), (Cluster Of Workstattions,
COW) (cluster).



, , -
.
(. ).

, ;
, .

(, -), ,
. , -

632 8.


.

[Adve and Hill, 1990]. ,
. ,
. [Sorin et al., 2011].
, , 0 1 - , 1
2 . 2
1.
? , .

.
x
x. ,
:
, (
), . , ,
.

[Lamport,
1979]. ,
.
. , 1 100 x, 1 2 200. , 1 (
) , 3 4, x (.8.21).

. 8.21. ,

.8.4.

633
8.4. .8.21
1

100

100

200

200

100 3

200 4

200 3

200

100

200 3

200 4

100 3

200 4

200 3

100 4

200 4

200 4

100 3

200
. 3 100
200, 4 200. 3 100, 4 200 100.
, , .
.
, , 3 100 200,
4 200 100. , 3 , 100 1 200, 2.
. 4 ,
2 200 1 100.
, .
( ) .
3 100, 4
.
, , .
, , ( ),
.
, ,
.

,
[Goodman, 1989].
.
1. ,
.
2.
.

634 8.

. , 1 1A, 1B 1 -
, .
, , -
1B, 1A. ,

, , . .
.
, , 2
2A, 2B 2C 1.
, , , 1A, 1B, 2A, 2B,
1C, 2C 2A, 1A, 2B, 2C, 1B, 1C ..
, (
). ,
1A, 1B, 2A, 2B, 1C, 2C, 2A, 1A, 2B, 2C, 1B, 1C,
- . ,
, ,
1B, 1A. , , .
, .

, , , [Dubois et al., 1986]. 1A,
1B, 1B, 1A. ,
.
, ,
.
,
.
,
, ,
.

, (.8.22).
1A 1B ,
-,
1A, 1B,
1B, 1A. .
1B 1C, 1C, 2B, 3A, 3B , 1A, 1B 2A. ,

635

,
, .
.

. 8.22.


,
, .
,
[Gharachorloo et al., 1990]. . , , . ,
, - .
.
,
( )
acquire ,
. ,
( ), release , , . release ,
, . , .
acquire, ,
release . , acquire , ( ,
release, ). ,
acquire
release, ,
. acquire
release,
( , )

636 8.

release. ,
. , , :
, .
.
[Naeem et al., 2011; Sorin et
al., 2011; Tu et al., 2010].

UMA-

(.8.23,).

. ,
, . ,
,
, .

. 8.23. : - ();
-( ); - ()

, , .
.
, , 32
64.
,
.
, , . 8.23,. -
, , .

637

. , ,
. , . , ,
.
,
, (.8.23,). ,

, , , ,
.
.

.

, ,
. , . , 1
, 2 ,
? 2
. ,
. , 1
, 2
-. ,
. , 2, .
, ,
. , -,
, ,
-.
(., , [Goodman, 1983; Papamarcos and Patel, 1984]). , ,
,
.
- ,
, ,
. (snooping
cache), . , , , ,
. .
32 64.

(write through). , 4 , .8.5.
, -, -

638 8.

, . ,
.
.
8.5. ( ,
)

- . , , .
- , . , ,
.
,
( .8.5). , ,
1, 2. - 1,
1 , .
2 , . -
1 ( 1),
, 2 - 1.
. 1 , 1
-, -.
2 .
, 2 - . (, .8.5, -
, , -
, . ,
- - , .)
, 1 , 2.
2 , ,
2 -,
. .
, - ,
. .
, 2 . 2 ,
. 1, 2
. - ,
, .

639

. , -
, .
, .
, , .

.
- . , , , , , -.
- .
;
. : ,
? ,
- ( ). , -
-. ,
- ,
- .
, .
,
.
. :
.
, , , .
,
, . .
MESI
MESI
(Invalid, Shared, Exclusive, Modified , , , ),
[Papamarcos and Patel, 1984].
[Goodman, 1983].
MESI Corei7 .
:
;
,
;
(
), ;
, , .

640 8.

.
,
(.8.24,).
, .
.

. 8.24. MESI

641

(1) ,
, , . (.8.24, ). ,
,
.
.
, , 2
. , ,
, 2 (.8.24,). .
, ,
,
.
, 3.
2, , ,
, ,
3 , .
3 ,
(.8.24,).
2 (.8.24,), 3 .
, 1. 2
, , , 1, , 2
. 2
, , . ,
. ,
(.8.24,).
, , .
UMA-
- UMA- 16 32 .
, .
n k
(.8.25). ,
.
() () (crosspoint),
,
. .8.25, , ,

- (001, 000), (101, 101) (110, 010). -

642 8.

. 8.25. 88(); ( ); ()

.
, .
, . ,
,
(, ). , .
,
. , .
, n2.
,
NUMA- Sun Fire E25K.
1000 1000 , . .
UMA-
2 2
(.8.26,) . ,
, .
(.8.26,).
, .

643

.
, READ WRITE. ,
, 32- ,
WRITE.
,
: X Y.

. 8.26. 22(); ( )

2 2 .
omega (.8.27). 8 8
12. n n log2n
n/2 , (n/2)log2n , , n2
, n.

. 8.27. omega

omega
(perfect shuffle),
. , omega, ,
011 110. READ, 1D,
110 . ( ) 110
(0 , 1 ).
1,
2D.
, 2D,
. 1, -

644 8.

3D, .
0, , 110, . , ,
.8.27 a.

, .
, ,
. a 0 ( 1D), 1 (
2D) 1 ( 3D) . ,
011, .
, , 001
001. .
, .
.8.27 b. , 001, ,
.
, , .
, , 000 000.
001 3A, .
, omega
. .
(
), ( )
( ).
, .
.
,
32- . 00,
. , . ,
, .
,
. ,
.

NUMA-
UMA-
,
,
.
100 , - .
, .
, -

645

(NonUniform Memory Access, NUMA). UMA,


, UMA-
, . , UMA-
NUMA-,
, UMA- .
NUMA- , :
, ;
LOAD STORE;
, .

( ), NC-NUMA (No Caching NUMA
NUMA ). ,
CC-NUMA (Coherent Cache NUMA NUMA ). , , ,
(DSM), ,
.
NC-NUMA- (
) Cm* Carnegie-Mellon. .8.28 [Swan et al., 1977].
LSI-11, ,
. (LSI-11
70- - DECPDP-11.) , LSI-11 .
, , ,
. , , ,
, . , , . ,
, 10 ,
, .

. 8.28. NUMA-

NC-NUMA- ,
-.

646 8.

,
. , , , .
NC-NUMA-
.

(), .
,
. ,
,
.
, , (,
, ). ,
T. , [LaRowe and
Ellis, 1991]. .
CC-NUMA-
, , .8.28,
, -.
, ,
,
. - .
. ,
,
. .
, CC-NUMA,
. , .
,
().
,
,
.
, , 256 ,
16- , . 232.
226 64 .
: 016M 0, 1632M 1
.. (.8.29,).

647

, .
218 64- ,
224 . , .

. 8.29. , 256 ();


32- ( ); 36()

, , LOAD 20, . ,
, , ,
, 0x24000108.
, .8.29,.
36, 4 8. , ,
, 36, 20,
36, , , 4 ,
, .
36, .
218 ( ) 4. . 8.29, ,
, 4 ,
20 4, ,
20.
, 2 36.
. 8.29, , 82.
2 , ,

648 8.

20, 82,
20, 82 . ,

.
, . 16- 218 9-
. 9 218 16,
1,76%, .
32, 4%.
128, 1%.
, .
, - (, ). .
k
,
( k ).
, .
, . ,
256 64- (512-) , 50%
. 8-
,
.
. , , .
, .
,
? , , , . ,
, ,
.
, .8.29, ,
,
.
,
( )
, .
, , -
, . ,
,
.
.
CC-NUMA- [Cheng and Carter, 2008].

649

NUMA- Sun Fire E25K


NUMA- Sun Fire Sun Microsystems.
, E25K,
74 UltraSPARC IV. , UltraSPARC III Cu
. E15K ,
.
, , .
E25K 18 ,
-, - PCI- . -
-, ,
. 4 4 8. ,
- 8 32-
( E15K 4 32- ).
E25K 144 , 576 72 PCI-,
.8.30. , 18
: 18 ,
, . , ,
, .
18
1818 , . 18 ,
, , , , ,
, ,
.
. 144 ? ,

14472, . ,
, ,
. , E25K,
.


. ,
,
. ( 43-, - 576.)
, .
, .

650 8.

. 8.30. E25K Sun Microsystems

, . , ,
. .
150 , 150 , 2,7
18 .
.8.30 ,
,
. PCI ,
,
.8.31. ,
.
, .
(.8.29),
. 0
,
1. -
1. .
,
( ).
33.
: -, - , .

651

. 8.31. Sun Fire E25K.


,

2 ,
- ( UltraSPARC ). , ,
2. ,
3
1818. 32 , ,
64 .
, , , .
576
229 64 . .
, , - .
.
,
17 , ,
. E25K
, , ,
.
( ) :
( );
( );
( ).

652 8.


, , , . , , .
,
- . , ,
. ,
, ,
.

, , , .
ECC-,
. ,
, .
.
, , (
), .
, , (
), , .
.
,
. , ,
. . ,
. , ,
, . ,
.
229 ,
229 .
, , ( ) .
17 ,
.
, ,
. ( ) ,
.

Sun Fire E25K .

653

2,7 .
- -. 32 ,
288 . 150
40 /,
.
, ,
.
Sun Fire E25K
[Charlesworth, 2002; Charlesworth, 2001].
2009 Oracle Sun Microsystems, SPARC . SPARC Enterprise M9000
E25K. M9000
SPARC, PCI. M9000 256 SPARC, 4 DRAM 128
- PCIe.

COMA-
NUMA- CC-NUMA- : , .
CC-NUMA- -
-.
-, -, .
, UMA, , .
NC-NUMA- ,
,
. , ,
, , -
. CC-NUMA-, Sun Fire E25K, ,
. ,
.
,
. COMA (Cache Only Memory Access
-). , NUMA CC-NUMA, ,
.
,
.
. ,
, , . ,
, .

654 8.

-, ,
.
, . COMA
:
?
, ?
. ,
.
, ,
, .
,
, .
, , , ?

, .
. ,
, .
, .
,
.
, ,
. ,
COMA, , . ,
,
.
, , .
( ,
, , ). ,
, ,
.
, , .
. CC-NUMA, .
-, , . , ?
.
, . , . ,
- .
.
. COMA-
, CC-NUMA,

655

COMA-,
. COMA- KSR-1 [Burkhardt
et al., 1992] Data Diffusion Machine [Hagersten et al., 1992].
COMA [Vu et al., 2008; Zhang and Jesshope, 2008].

.8.20, MIMD
: .
. , , LOAD STORE.
, , , . , ,
,
.
.
, . ,
. , Sun E25K,
72 . ,
65536 . ,
- 65536 ,
.
,
. 100 ,
, .

,
, . .

LOAD STORE, send receive, .
.
, ( ),
() -, .
(. UMA- ).
, ,

656 8.

:
send,
(, ). .8.32.

. 8.32.


.8.32,
. . ,
, ,
. ,
, ,
.

, . , ,
. , : .

, ,
, .


( , , ).
,
, (.8.33). ( ) . , .
, . k ,

657

, ,
k 1 .

. 8.33. . .
: (); ( );
(); ( ); (); (); (); ()

.
,
, ,
, .

,

658 8.

. , .
, .

, , .

. ,
( )
,
.
( ) . ,
, 800/, ,
,
800/. ,
. , ,
.
.

. (
), .
(, , ), .

, , ..
.8.33 . ( ). (
) .
.8.31, ,
,
. ,
.
, .
.8.33,
. .
, , (
). k k(k 1)/2 ,
k.
(.8.33,). ,
. , .
,
. ,
b, 2b, -

659

4b. , (fat tree),


Thinking MachinesCM-5.
(.8.33,) , . ,
(.8.33,), ,
.
,
( ).
(.8.33,) ,
.
, ,
.
. , (i, j, k),
(1, 1, 1) (l, m, n).
, ,
, .
(.8.33,) . 222,
kkk. .8.31, , , . ,
4 . 6 ,
..
n- (.8.33,).
,
. ,
2 , 10- 1024,
10,
. , 3232, 1024
, 62, , . ,
,
, , .
.
, - .

. .


(Massively Parallel Processors, MPP)
.

, , .. ,
,
. - -

660 8.

1960- (
, ). , ,
MPP- SIMD-, .
MPP- . Intel Pentium, Sun UltraSPARC, IBM RS/6000 DECAlpha.
, . (
) ,
( 256),
( 8). MPP-
.
MPP -. MPP-
, .
,
.
, MPP .
.
- ,
, .
MPP- ,
.
, , MPP-, , , .
, MPP-
,
. MPP-, BlueGene/P
Red Storm.
BlueGene

IBM BlueGene. IBM 1999
. , ,
.
. , ,
(,
). ,
, ,

661

BlueGene.
, , .
, IBM
BlueGene 100 . 2001
BlueGene
BlueGene/L. , . 2007 IBM
Blue Gene BlueGene/P,
.
BlueGene MPP-,
,
/, / /3. IBM ,
MPP- . ,
,
. BlueGene/P 2007. 65536
, 167/.
. , BlueGene/P : 371/,
, BlueGene/L.
BlueGene/P 2009 294912 ,
1/.
BlueGene/P , , .8.34.
PowerPC 450, 850. PowerPC 450
,
. (Floating Point Unit, FPU),
4 .
SIMD-, . ,
.
.
, 32 32
. 2.
, , .
, . 4,
. L1 ; ,
,

662 8.

. 8.34. BlueGene/P

. , -
- , 11.
- -
28 . , -
(DDR SDRAM), 75.
, : , , , ,
. ,
, .
,
.
IBM , , . 8.35,,
DDR2 2. 8.35,,
.8.35,.
, 32 ,
32 ( 128 ) .
DRAM 2, 64
(.8.35,). 32 , 4096 .
.8.35,.

663

. 8.35. BlueGene/P: (), (), (), ( ), ()

, , 72 294912 , .8.33,. PowerPC450 6 /;


, BlueGene/P
1769472 . 850
1,504 /. - ,
. BlueGene/P
1 /.
,
,
2 .
. , ,
.
11524 -, .
,
- , , ,
. ,
. ,
, , ..,
10 .
. 723232. ,
6 : 2 , , 2
, 2 (.

664 8.

.8.32). , 1024 8816.


8832. 83232,
, 8 723232.
,
3,4/. 73728 , , 752/.
, , Encapsulated
PostScript, 300, , BlueGene/P
2,5 . ,
.
(virtual cut through routing). -
(. ),
,
. , ,
. (), () .
.
, , . ()
. ,
BlueGene/P, .
65536 ,
. ,
, .

(, 65535 ).
() . ,
, , , ,
.
,
. , . .
Ethernet 10 .
- ,
BlueGene/P, ; .
,
. ,
.
.

665

, .
,
, ,
. - Linux .
BlueGene, BlueGene/Q. , 2012, 18 ,
. .
, 20/.
BlueGene/L [Adigaetal, 2002; Alam et al., 2008;
Almasi et al., 2003a 2003b; Blumrich et al., 2005; IBM, 2008].
Red Storm
MPP Sandia Red Storm ( Thors
Hammer). Sandia Lockheed Martin .
,
.
Sandia .
, ,
, MPP-.
2002 MPP- ASCI Red
. 9460 ,
1,2 13,5 ,
3 /.
2002 Sandia ASCI Red,
Cray Research.
2004 ,
.
, Red Storm
.
, . 2006
; .
Red Storm Opteron 2,4 AMD.
. .

, Pentium.
64- 264 ,
32-. , 64- 64-
64- . 64- -

666 8.

32-, 64- , .
Opteron .
, . , - . AMD Opteron
, ,
, .
DIMM 4 ,
32. Red Storm Opteron 24 , , ,
, . Opteron ,
.
Opteron
Seastar IBM.
,
Seastar. , ,
.
Opteron , , Red Storm
(.8.36). 4 Opteron,

. 8.36. Red Storm

667

4, 4 Seastar, RAS (Reliability,


Availability and Service , ), Ethernet 100/.
.
, 96 Opteron, .
108 , 10368 SDRAM 10.
SDRAM, .
41 /.
Opteron Seastar, . 271624,
. 7 (24/) .
: , , , , ,
Opteron. 2 .
5 . Ethernet
100 / .
108 16
- .
32 Opteron. 512 256 -
256 . ,
RAID- 3 5, . 240.
50/.
, , .
2688 ,
2688 . 4992
, .8.37. Opteron
4 , 2.
- .
20002, ,
30000 . 1,6, 1 .

3,5.

90 , 9 , 100 , .
, 60 . Cray

X3T.

668 8.

. 8.37. Red Storm,

, Catamount ( ). -
Linux ,
MPI (. ). RAS- Linux.
Red Storm ASCI Red,
, , MPI, , .
.
RAS-,
, . MTBF (Mean Time Between Failures
), 50 . ASCI
Red 900 , 40 .
, - .
Red Storm [Brightwell et al., 2005,
2010].
BlueGene/P Red Storm
BlueGene/L Red Storm, , , .
.8.6 .
8.6. BlueGene/7 Red Storm

BlueGene/L

Red Storm

32- PowerPC

64- Opteron

850

2,4

294912

20736

128

669

BlueGene/L

Red Storm

4096

192

72

108

( )

124

1000

- 512

24

144

10

PowerPC

Seastar

73728

10368

723232

271624

Gigabit Ethernet

Fast Ethernet

Linux

Linux

IBM

Cray Research

,
, , , , IBM Cray.
BlueGene/P ,
,
. , Red Storm
Sandia, Cray .
IBM : , , ,
. , Sandia:
64- ,

, ,
BlueGene/P. ,
, , .
-.
, IBM ,
, 1024 . Sandia

670 8.

24,
96 . , Red Storm
, BlueGene/P.

. BlueGene/P
, 1000 /
124 / Red Storm. ,
Red Storm , Sandia, , Opteron. IBM
(, 850 ). , MPP
.


[Anderson et al.,
1995; Martin et al., 1997]. ,
,
. MPP
, .
, , , .. ( , , )
, - . MPP .
,
MPP, , ,
.
. , MMP-,
,
.
MMP ,
, .
, : .
,
. , , .
, , , , .
(Gordon Bell), PDP-11 VAX,
, , .

, .
, . . ,
.

671

, ,
, - ,
.
, -
, ,
. ,
.
, , 500.
. Google ,
.
Google
Google . , Google , .
, ( 40 ),
0,5 , ,
. , ,
, ,
. Google
.
Google ? Google
. . www.google.com IP- ,

.

OC-48 (2,488/),
. ,
OC-12 (622 /)
. , . ,
Google , .
, Google , , . ( 1 .8.38)

(2), , , (3) (4).
(5), .
(

672 8.

-, PDF-, PowerPoint ..).


, .
, ,
.

. 8.38. Google

,
. , 1
, n
. 2 n .. ,
,
k , k ..
.
(6),
. :
+digita +kapibara +dance


, . Google (7), , ,
, .
, .

673

. ,
(
),
100 .
(8),
.
, (9),
(10). ,
(, , camcoder),
, Google . ,
HTML (HyperText Markup Language )
-.
, ,
Google. ,
, ,
. Google .
. .
, . , , /.
: . ,
. ,
23 ,
23, 510 .
, ,
, . Google ,
. , ,
, 0,5 2% . Google , 2%
. ,
, .
, , . ,
, .
, (
).
, Google,
Pentium 2, 4 2
. , .
Ethernet. ,
. 1u ( 5) , 40 .
, , 80 , -

674 8.

Ethernet .
Ethernet ,
.
Google .8.39.
OC-48
128- Ethernet-.
OC-12. , Ethernet-.
Ethernet-, ,
, .
.
, ,
. 128
, 64 . ,
80 , 5120 , , ,
, 80 ,
128 .
Google .

. 8.39. Google

675

. 120 ,
10 .
, 32 .
, 3000/2.

600 1200 /2,
.
Google
-, .
1. , .
2. .
3. /.
,
. , , .
,
.
, ,
. , . Google ,
, , .
, . .
. , , RAID SCSI-. , , .
. ,
, (
).
Google [Barroso et al., 2003; Ghemawa
et al., 2003].




( ),
. , MPP-, ,
.

. , ,
( ) . ,

676 8.

, () ,
.

send receive, .
:
;
;
.

send, receive, () ,
receive, .
, , .
.
: , .

- ( ),
. send,
. ,
. . .
, -
.
, ,
. , , . . ,
send,
, , . - ,
. , .
.
.
,
.
MPI
PVM (Parallel Virtual Machine
) [Geist et al., 1994; Sunderram,. 1990].
MPI (Message-Passing
Interface ). MPI ,
PVM; . MPI, -

677

MPI-1, 1997 , MPI-2.


MPI-1, , MPI-2.
MPI . [Gropp et al., 1994; Snir et al., 1996].
MPI-1 PVM
.
. ,
. MPI.
MPI : , , .
.
, - (, ). ,
, .
,
, , ,
.. ,
.
MPI . :
MPI_Send(, _, _, , , )

, _ _.
; ,
. () , (
).
:
MPI_Recv(&, _, _, ,
, , &)

,
_ .
MPI . . ,
MPI_Recv. .
. .
, , . .
, , ,
, .
, 8 .
: .
MPI .

. .
,
,

678 8.

, (, ).
MPI (, , , ..).
.
MPI-2 ,
, , -, .
MPI PVM.
PVM , . MPI , MPI
, , ,
. , PVM ,
, ,
. , ,
MPI.

MPI ,

.

. , ,
.
, .
FIFO (.8.40,). , ,
. ,
.. , ,
. 8 ,
128 16 ( 8
) - .

. , ,
, ,
. , ,
FIFO (.8.40, ).
, ,

. ,
(.8.40,). , ,
.

.

679

. 8.40. (
): FIFO(); ( );
()


,
, . , MPI.
, ,
. , : ( , ), .
, .
,
. .8.18 , , .
, , .


. DSM (Distributed Shared Memory ).
:
. .
.8.41, ,
16 , .
, .
, .
,

680 8.

. 8.41. 16 ,
: ();
0 10( ); 1
10, ()

, ,
.
, , . .8.41,
, 0 10,
1 0.
IVY [Li and Hudak, 1989].

. . IVY , ,

681

. , ,
. .8.41, ,
10, .
,
- ,
. ,
.
.
-. , Treadmarks [Amza, 1996].
, ,
,
acquire, .
, , , release .
release .
Treadmarks ,
. , , . ,
,
. ,
, .
, ,
, .
,
. , ,
NUMA- COMA-. , DSM,
NUMA- COMA-, DSM
, .
DSM - . CASHMERE [Kontothanassis, et al., 1997; Stets et al.,
1997], CRL [Johnson et al., 1995], Shasta [Scales et al., 1996] Treadmarks [Amza,
1996; Lu et al., 1997].
Linda
DSM ( IVY Treadmarks)
, .
,
,
.

682 8.

Linda,
[Carriero and Gelernter,1989].
,
(, C FORTRAN),
C-Linda FORTRAN-Linda.
Linda ,

. ,
.
. C-Linda , ,
, ( )
( ). 8.1 .
8.1. Linda
("abc", 2, 5)
("matrix-1", 1, 6, 3.14)
("family", "is sister", Carolyn, Elinor)

4 . , out,
. :
out("abc", 2, 5);

("abc", 2, 5) .
out , , :
out("matrix-1", i, j, 3.14);

,

ij.
in.
, .
in .
:
in("abc", 2, ? i);

, "abc", 2 ,
(, i ). , i . .

in, , .
.
, in,
. in, , -

683

.
, :
;
;

.
, ,
, ( ), , ,
.
, ,
.
. ,
, ,
, .
, read, in, . , eval, , .
.
Linda.
Linda
(replicated worker model). (task bag), .
,
out("task-bag", job);


.
, :
in("task-bag", ?job);

.
. , . ,
, .
Linda .
,
. . .
. [Bjornson, 1993].
Orca
,
. , ()
.

684 8.

, , .
, , Orca [Bal, 1991;
Bal et al., 1992; Bal and Tanenbaum, 1988]. Orca ( Modula2),
.
Orca , Java Ada. , . ,
, .
.
Orca - . ,
(true) (false). ,
. ,
,
.
. 8.2 stack ,
push pop.
8.2. stack

Object implementation stack;
top:integer;
#
stack:array[integer 0..N1]of integer;
operation push(item: integer); # ,
begin
stack[top] := item;
#
top := top + 1;
#
end;
operation pop(): integer;
begin
guard top>0 do
top := top 1;
return stack[top];
od;
end;
begin
top:=0;
end;

# ,
# ,
#
#

stack :
s, t, stack;

top
0. k s

s$push(k);

685

pop ,
, - .
Orca fork.
, fork. , . . :
for i in 1..n do fork foobar(s) on i; od;

1 n,
foobar . n (
) ,
s s, .
, .

. , ,
,
.
Orca ,
.
. .
. Orca
, , ,
. Orca
[Hoare, 1975].
, , . Orca
. , 8.2, ,
, .
Orca , ,
.
: .
, . ,
, .
( ), .
, ,
.
, , .
,
, .

686 8.

, ,
. ,
. ,
. , , , 50 ,
.
.


, - .
- , ,
. :
. .
, , , , .
, ,
. , , .
( , ).
,
,
, .

. ,
, . .
, ,
Ts, p ,
b /, Ts+ p/b.
, p
p Ts+ 2p/b .

, Ta .
Ta+ p/b, .
, Td,
.. Td
( , ). n , Ta+ n( p/b+
+ Td)+ p/b,
.

687

Ta+ p/b,
,
. ,
. , .
. , , , ,
, . .
(.
).
.
, .
.
1/,
100/ .

.
. . ,
, ,
, . 1024 4
, 4096.
,
. .
,
. ,
(
),
, .

, .

, ,
, . . , .
: n- .
(.8.42).
, , -

688 8.

64 PentiumPro.
k k. , k
k k.
, ,
. N , ( ,
) ,
,
. [Bal et al., 1998].

. 8.42. (
)

,
: ,
, ,
.
. , T , ( f) ,
(1 f) ,
.8.43,. n , (1 f)T (1 f)T/n,
.8.43,. (, ) fT+ (1 f )T/n.
(T),
:

689

n
.
1 + (n 1) f

f= 0 , f> 0
, .
.

. 8.43. ,
();
( )

, .
, , .
1000 , , , , ,
. ,
,
.
n ,
2n . , , - ,
100 %.

. ,
. ,
, .
4 , (.8.44,). ,
16 , 12 (.8.44,).
b/, 4
, b/4 b/16/. .

690 8.

. 8.44. 4 , ();
16 , ( );
4(); 16 ()

(.8.44,,).
, , . ,
1,0
4 (4 ) 1,5 16 (24
),
.
, .
, , , . nn 2(n 1),

. 400 38, 1600 78,
4 , , ,
.

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

691

(
-, -).
, , .
,
.
.
(prefetching),
, .
, .
, .
, ,
.
. , , , ,
. ,
,
. LOAD , ,
. LOAD
, , .

. (,
),
,
, .
1, 2 .. ,
, .
. STORE
.
, .
LOAD ,
.


, , ,
.
, , , , , .

692 8.

:
, ;
, (,
);
,
.
,
, .
, .

, ,
.

, (grid computing). ,
.8.1. ,
.

, ,
, . ,

. , ,
.
,
. . - , , ,
. ,
.
, .
.
, .
.
, , , .
, ,
.

(.8.7). ,
, .

693

, , , . ,
.
8.7.

, , ,

- , , ,

, ,

.
. ,

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

.
(,
).
.

, ,
. ,
, .

694 8.

. ,
, ,
. , ,
.
,
. , UNIX 16- , . , , ,
.
,
. Global Grid Forum.

, OGSA (Open Grid Services Architecture ).
, , OGSA
WSDL (Web Services Definition Language
-).
, , , .
1. ( ).
2. ( ).
3. ( , ).
4. ( ).
5. ( ).
6. ( ).
7. ( ).
8. ( ).
,
.
[Abramson, 2011; Balasangameshwara
and Raju, 2012; Celaya and Arronategui, 2011; Foster and Kesselman, 2003; Lee etal.,
2011].


,
.
. -

695

, ,
, , .
, .
;

, .
;
. .
. ,
.
.
,

, .
, ,
.
. ,
. (UMA) ( )
. . NUMA- ,
, . , COMA-
, ,
, .
,
. . MPP-, BlueGene/P
IBM, , .
(, , , Google).
, MPI, , .
.
DSM,
Linda, Orca Globe. DSM
, DSM NUMA-, , , .

696 8.

. ;
, , .


1. Intel x86 17 . x86 VLIW?
2.
, Intel AMD
. ?
3. 0255. 96, 9, 300 256?
4. TriMedia-, , ?
1) , , ,
, ;
2) , ,
, ;
3) , ,
, , .
5. .8.5, 12 .
, .
6. - 1 -
2 k .
- 1 . ,
?
7. NVIDIA Fermi , 2. ?
8. ,
.
. , SIMD
MIMD?
9. , ,
.
?
10. . ,

?
11. . ,

?

697

12. ,
, .
?
13.
. ,
,
. , FIFO.
64 ?
14. MESI .
.
MESI
? ,
?
15. MESI , -,
? , .
16. , n .
, ,
p. , :
1) (0 );
2) ;
3) .
17. .
18. Fire
E25K Sun?
19. , 2A 3B
omega . ?
20. ( , )

. ?
21. omega 4096 RISC-,
60, 4096 .
5. LOAD?
22. , omega (. .8.27). ,
i i. ? (
IBM RP3 BBN Butterfly.)
?
23. NUMA- 20,
120.
N , 1% P.

698 8.

,
C.
, ?
24. CC-NUMA-, .8.29, 512 8 .
64, ?
( , )?
25. NC-NUMA CC-NUMA?
26. ,
.8.33.
27. , .8.33, ( ,
).
28. (. .8.33,), kk. ? (: k
.)
29. 888. 1/.
?
30. , . f
, . f= 0,1?
31. 8.44 , , . ,
b.

. 64
. ,
?
32. send ,
. , , .

send?
33. , (, Ethernet).
( ) (
)?

9.

,
.
1. Abramson, D.: Mixing Cloud and Grid Resources for ManyTask Compu
ting, Proc. Intl Workshop on Many Task Computing on Grids and Super
computers,ACM, pp. 12, 2011.
2. Adams, M., and Dulchinos, D. OpenCable, IEEE Commun. Magazine, vol. 39,
pp.98105, June 2001.
3. Adiga, N.R. et al. An Overview of the BlueGene/L Supercomputer, Proc.
Supercomputing 2002, ACM, pp.122, 2002.
4. Adve, S.V., and Hill, M. Weak Ordering: A New Definition, Proc. 17th Ann.
Int'l. Symp. on Computer Arch., ACM, pp. 214, 1990.
5. Agerwala , T., and Cocke, J. High Performance Reduced Instruction Set
Processors, IBM T.J. Watson Research Center Technical Report RC12434,
1987.
6. Ahmadinia, A., and Shahrabi, A.: A Highly Adaptive and Efficient Router
Architecture for Network-on-Chip, Computer J.,vol. 54, pp. 12951307, Aug.
2011.
7. Alam, S., Barrett, R., Bast, M., Fahey, M.R., Kuehn, J., McCurdy, Rogers, J., Roth,
P., Sankaran, R., Vetter, J.S., Worley,P., and Yu,W.: Early Evaluation of IBM
BlueGene/P, Proc. ACM/IEEE Conf.onSupercomputing,ACM/IEEE, 2008.
8. Alameldeen, A.R., and Wood, D.A. Adaptive Cache Compression for HighPerformance Processors. Proc. 31st Ann. Intl Sym. on Computer Arch. ACM,
pp.212223, 2004.
9. Almasi, G.S. et al. System Management in the BlueGene/L Supercomputer,
Proc. 17th Intl Parallel and Distr. Proc. Symp., IEEE, 2003a.
10. Almasi , G.S. et al. An Overview Of The Bluegene/L System Software
Organization, Par. Proc. Letters, vol. 13, 561574, April 2003b.
11. Amza, C., Cox, A., Dwarkadas, S., Keleher,P., Lu,H., Rajamony,R., Yu,W.,
Zwaenepoel,W. TreadMarks: Shared Memory Computing on a Network of
Workstations, IEEE Computer Magaxine, vol.29, pp. 1828, Feb. 1996.
12. Anderson, D. Universal Serial Bus System Architecture, Reading, MA: AddisonWesley, 1997.
13. Anderson, D., Budruk, R., and Shanley, T. PCI Express System Architecture,
Reading, MA: Addison-Wesley, 2004.
14. Anderson, T.E., Culler, D.E., Patterson,D.A., and the NOW team A Case for
NOW (Networks of Workstations), IEEE Micro Magazine, vol.15, pp. 5464,
Feb. 1995.

700 9.

15. August , D. I., Connors, D. A., Mahlke, S. A., SIAS, J. W., Crozier, K. M.,
Cheng,B.-C., Eaton,P.R., Olaniran,Q.B., and HWU,W.-M. Integrated
Predicated and Speculative Execution in the IMPACT EPIC Architecture,
Proc. 25th Ann. Int'l. Symp. on Computer Arch., ACM, pp. 227237, 1998.
16. Bal, H.E. Programming Distributed Sysytems, Hemel Hempstead, England:
Prentice Hall Int'l., 1991.
17. Bal, H.E., Bhoedjang, R., Hofman,R, Jacobs,C., Langendoen,K., Ruhl,T., and
Kaashoek,M.F. Performance Evaluation of the Orca Shared Object System,
ACM Trans. on Computer Systems, vol.16, pp. 140, Feb. 1998.
18. Bal, H.E., Kaashoek,M.F., and Tanenbaum,A.S. Orca: A Language for Parallel
Programming of Distributed Systems, IEEE trans. on Software Engeneering,
vol.18, pp. 190205, March 1992.
19. Bal, H.E., and Tanenbaum,A.S. Distributed Programming with Shared Data,
Proc. 1988 Int'l. Conf. on Computer Languages, IEEE, pp. 8291, 1988.
20. Balasangameshwara, J., and Raju, N.: A Hybrid Policy for Fault Tolerant
Load Balancing in Grid Computing Environments, J. Network and Computer
Applications, vol. 35, pp.412422, Jan. 2012.
21. Barroso, L.A., Dean, J., Holzle, U. Web Search for a Planet: The Google Cluster
Architecture, IEEE Micro Magazine, vol. 23, pp. 2228, March-April 2003.
22. Bechini, A., Conte, T.M., and Prete, C.A. Opportunities and Challenges in
Embedded Systems, IEEE Micro Magazine, vol. 24, pp. 89, July-Aug. 2004.
23. Bhakthavatchalu, R., Deepthy, G.R.; and Shanooja, S. : Implementation of
Reconfigurable Open Core Protocol Compliant Memory System Using VHDL,
Proc. Intl Conf. on Industrial and Information Systems, pp. 213218, 2010.
24. Bjornson, R.D. Linda on Distributed Memory Multiprocessors, Ph.D.Thesis,
Yale Univ., 1993.
25. Blumrich, M., Chen, D., Chiu, G., Coteus, P., Gara, A., Giampapa, M.E., Haring,
R.A., Heidelberger, P., Hoenicke, D., Kopcsay, G.V., Ohmacht, M., SteinmacherBurow, B.D., Takken, T., Vransas, P., and Liebsch, T. An Overview of the
BlueGene/L System, IBM J. Research and Devel., vol. 49, MarchMay,
2005.
26. Bose , P. Computer architecture research: Shifting priorities and newer
challenges, IEEE Micro Magazine, vol. 24, p.5, NovDec. 2004.
27. Bouknight, W.J., Denenberg,S.A., Mcintyre,D.E., Randall,J.M., Sameh,A.H.,
and Slotnick,D.L. The Illiac IV System, Proc. IEEE, pp. 369388, April
1972.
28. Bradley,D.: A Personal History of the IBM PC, IEEE Computer, vol. 44, pp.
1925, Aug. 2011.
29. Bride, E.: The IBM Personal Computer: A Software-DrivenMarket, IEEE
Computer, vol. 44, pp. 3439, Aug. 2011.
30. Brightwell, R., Camp, W., Cole, B., DeBenedictis, Leland, R, and Tompkins, J.
Architectural Specification for Massively Parallel Computers An Experience
and Measurement-Based Approach, Concurrency and Computation: Practice
and Experience,vol. 17, pp. 146, 2005.

701

31. Brightwell, R., Underwood, K.D., Vaughan, C., and Stevenson, J.: Performance
Evaluation of the Red Storm Dual-Core Upgrade, Concurrency and
Computation: Practice and Experience,vol.22, pp.175190, Feb. 2010.
32. Bryant, R.E., and OHallaron, D. Computer Systems: A Programmers Perspective
Upper Saddle River, NJ: Prentice Hall, 2003.
33. Burkhardt,H., Frank,S., Knobe,B., and Rothnie,J. Overview of the KSR-1
Computer Sysytem, Technical Report KSR-TR-9202001, Kendall Square
Research Corp, Cambridge, MA, 1992.
34. Carriero, N., and Gelernter,D. Linda and Context, Commun. of the ACM,
vol.32, pp. 444458, April 1989.
35. Celaya, J., and Arronategui, U.: A Highly Scalable Decentralized Scheduler of
Tasks with Deadlines, Proc. 12th Intl Conf. on Grid Computing, IEEE/ACM,
pp.5865, 2011.
36. Charlesworth, A. The Sun Fireplane Interconnect, IEEE Micro Magazine, vol.
22, pp.3645, Jan.-Feb. 2002.
37. Charlesworth, A. The Sun Fireplane Interconnect, Proc. Conf. on High Perf.
Networking and Computing, ACM, 2001.
38. Charlesworth, A., Phelps, A., Williams, R., and Gilbert, G. Gigaplane-XB:
Extending the Ultra Enterprise Family, Proc. Hot Interconnects V, IEEE,
1998.
39. Chen, L., Dropsho, S., Albonesi, D.H. Dynamic Data Dependence Tracking
and its Application to Branch Prediction, Proc. Ninth Intl Symp. on HighPerformance Computer Arch., IEEE, pp. 6578, 2003.
40. Cheng, L., and Carter, J.B.: Extending CC-NUMA Systems to Support Write
Update Optimizations, Proc. 2008 ACM/IEEE Conf. on Supercomputing,
ACM/IEEE, 2008.
41. Chou, Y., Fahs, B., Abraham, S. Microarchitecture Optimizations for Exploiting
Memory-Level Parallelism, Proc. 31st Ann. Intl Symp. on Computer Arch.,
ACM, pp.7677, 2004.
42. Cohen, D. On Holy Wars and a Plea for Peace, IEEE Computer Magazine,
vol.14, pp.4854, Oct. 1981.
43. Corbat, F.J., and Vyssotsky,V.A. Introduction and Overview of the MULTICS
System, Proc. FJCC, pp.185196, 1965.
44. Denning, P.J. The Working Set Model for Program Behavior, Commun. of
the ACM, vol.11, pp.323333, May 1968.
45. Dijkstra, E.W. GOTO Statement Considered Harmful, Commun. of the ACM,
vol.11, pp. 147148, Mar. 1968a.
46. Dijkstra, E.W. Co-operating Sequential Processes, in Programming Languages,
F.Genuys (ed.), New York: Academic Press, 1968b.
47. Donaldson , G., and Jones, D. Cable Television Broadband Network
Architectures, IEEE Commun. Magazine, vol. 39, pp.122126, June 2001.
48. Dubois, M., Scheurich, C., and Briggs, F .A. Memory Access Buffering in
Multiprocessors, Proc. 13th Ann. Int'l. Symp. on Computer Arch., ACM,
pp.434442, 1986.

702 9.

49. Dulong, C. The IA-64 Architecture at Work, IEEE Computer Magazine,


vol.31, pp.2432, July 1998.
50. Dutta-Roy , A. An Overview of Cable Modem Technology and Market
Perspectives, IEEE Commun. Magazine, vol. 39, pp.8188, June 2001.
51. Faggin, F., Hoff, M.E.,Jr., Mazor,S., and Shima,M. The History of the 4004,
IEEE Micro Magazine, vol.16, pp. 1020, Nov. 1996.
52. Falcon, A., Stark, J., Ramirez, A., Lai, K., and Valero, M. Prophet/Critic Hybrid
Branch Prediction, Proc. 31th Ann. Intl Symp. on Computer Arch., ACM,
pp.250261, 2004.
53. Fisher, J.A., and Freudenberger,S.M. Predicting Conditional Branch Directions
from Previous Runs of a Program, Proc. 5th Conf. on Arch. Support for Prog.
Lang. and Operating Syst., ACM, pp.8595, 1992.
54. Flynn, D. AMBA: Enabling Reusable On-Chip Designs, IEEE Micro Magazine,
vol.17, pp.2027, July 1997.
55. Flynn, M.J. Some Computer Organizations and Their Effectiveness, IEEE
Trans. on Computers, vol.C-21, pp.948960, Sept. 1972.
56. Foster, I., and Kesselman, C. The Grid 2: Blueprint for a New Computing
Infrastructure, San Francisco: Morgan Kaufman, 2003.
57. Fotheringham, J. Dynamic Storage Allocation in the Atlas Computer Including
an Automatic Use of a Backing Store, Commun. of the ACM, vol.4, pp.435
436, Oct. 1961.
58. Freitas, H.C., Madruga, F.L., Alves, M., and Navaux, P.: Design of Interleaved
Multithreading for Network Processors on Chip, Proc. Intl Symp. on Circuits
and Systems,IEEE, 2009.
59. Gaspar, L., Fischer, V., Bernard, F., Bossuet,L., and Cotret, P.: Hcrypt: A Novel
concept of Crypto-Processor with Secured Key Management, Intl Conf.On
Reconfigurable Computing And FPGAs,2010.
60. Gaur, J., Chaudhuri, C., And Subramoney, S.: Bypass and Insertion Algorithms for
Exclusive Last-Level caches, Proc. 38th Intl Symp. On Computer Arch.,ACM,
2011.
61. Gebhart, M., Johnson, D.R., Tarjan, D., Keckler, S.W., Dally, W.J.,Lindholm,
E., And Skadron, K.: Energy-Efficient Mechanisms For Managing Thread
Context In Throughput Processors, Proc. 38th Intl Symp. On Computer Arch.
ACM,2011.
62. Geist,A., Beguelin,A., Dongarra,J., Jiang,W., Mancheck,R., and Sunderram,V.
PVM: Parallel Virtual Machine A User's Guide and Tutorial for Networked
Parallel Computing, Cambridge, MA: M.I.T. Press, 1994.
63. Gepner, P., Gamayunov, V., and Fraser, D.L.: The 2nd Generation Intel Core
Processor. Architectural Features Supporting HPC, Proc. 10th Intl Symp. on
Parallel and Dist. Computing, pp. 1724, 2011.
64. Gerber, R., and Binstock, A. Programming with Hyper-Threading Technology,
Santa Clara, CA: Intel Press, 2004.
65. Gharachorloo, K., Lenoski, D., Laudon, J., Gibbons, P.B., Gupta, A., and Hennessy,
J.L.: Memory Consistency and Event Ordering in Scalable Shared-Memory

703

Multiprocessors, Proc. 17th Ann. Intl Symp. on Comp. Arch.,ACM, pp. 1526,
1990.
66. Ghemawat, S., Gobioff, H., and Leung, S.-T. The Google File System, Proc.
19th Symp. on Operating Systems Principles, ACM, pp.2943, 2003.
67. Goodman, J.R. Using Cache Memory to Reduce Processor Memory Traffic,
Proc. 10th Ann. Int'l. Symp. on Computer Arch., ACM, pp.124131, 1983.
68. Goodman J.R. Cache Consistency and Sequential Consistency, Tech. Rep.61,
IEEE Scalable Coherent Interface Working Group, IEEE, 1989.
69. Goth, G.: IBM PC Retrospective:There Was Enough Right to Make ItWork,
IEEE Computer,vol. 44, pp. 2633, Aug. 2011.
70. Gropp, W., Lusk,E., and Skjellum,A. Using MPI: Portable Parallel Programming
with the Message Passing Interface, Cambridge, MA: M.I.T. Press, 1994.
71. Gupta, N., Mandal, S., Malave, J., Mandal, A., and Mahapatra, R.N.: A Hardware
Scheduler for Real Time Multiprocessor System on Chip, Proc. 23rd Intl Conf.
on VLSI Design, IEEE, 2010.
72. Gurumurthi, S., Sivasubramaniam, Kandemir, M., and Franke, H. Reducing Disk
Power Consumption in Servers with DRPM, IEEE Computer Magazine, vol.
36, pp.5966, Dec. 2003.
73. Hagersten , E., Landin, A., Haridi, S. DDM A Cache-Only Memory
Architecture, IEEE Computer Magazine, vol.25, pp.4454, Sept. 1992.
74. Haghighizadeh, F., Attarzadeh, H., and Sharifkhani, M.: A Compact 8-Bit AES
Crypto-processor, Proc. Second. Intl Conf. on Computer and Network Tech.,
IEEE, 2010.
75. Hamming, R.W. Error Detecting and Error Correcting Codes, Bell Syst.
Tech.J., vol.29, pp.147160, April 1950.
76. Henkel, J., Hu, X.S., and Bhattacharyya, S.S. Taking on the Embedded System
Challenge, IEEE Computer Magazine, vol. 36, pp.3537, April 2003.
77. Hennessy, J.L. VLSI Processor Architecture, IEEE Trans. on Computers,
vol.C-33, pp.12211246, Dec. 1984.
78. Herrero, E., Gonzalez, J., and Canal, R. : Elastic Cooperative Caching: An
Autonomous Dynamically Adaptive Memory Hierarchyfor Chip Multiprocessors,
Proc. 23rd Intl Conf. on VLSI Design, IEEE, 2010.
79. Hoare , C. A. R. Monitors, An Operating System Structuring Concept,
Commun. of the ACM, vol.17, pp.549557, Oct. 1974; Erratum in Commun.
of the ACM, vol.18, p.95, Feb.1975.
80. Hwu, W.-M. Introduction to Predicated Execution, IEEE Computer Magazine,
vol.31, pp.4950, Jan. 1998.
81. Jimenez, D.A. Fast Path-Based Neural Branch Prediction, Proc. 36th Intl
Symp. on Microarchitecture, IEEE., pp.243252, 2003.
82. Johnson, K.L., Kaashoek,M.F., and Wallach,D.A. CRL: High-Performance AllSoftware Distributed Shared Memory, Proc. 15thSymp. on Operating Systems
Principles, ACM, pp.213228, 1995.
83. Kapasi, U.J., Rixner, S., Dally, W.J., Khailany, B., Ahn, J.H., Mattson, P., and
Owens, J.D. Programmable Stream Processors, IEEE Computer Magazine,
vol. 36, pp.5462, Aug. 2003.

704 9.

84. Kaufman, C., Perlman, R., and Speciner, M. Network Security, 2nd ed., Upper
Saddle River, NJ: Prentice Hall, 2002.
85. Kim, N.S., Austin, T., Blaauw, D., Mudge, T., Flautner, K., Hu, J.S., Irwin, M.J.,
Kandemir, M., and Narayanan, V. Leakage Current: Moores Law Meets Static
Power, IEEE Computer Magazine, vol. 36, pp.6875, Dec. 2003.
86. Knuth, D.E.: The Art of Computer Programming: Fundamental Algorithms,
3rded.. Reading, MA: Addison-Wesley, 1997.
87. Kontothanassis , L., Hunt, G., Stets, R., Hardavellas, N., Cierniad, M.,
Parthasarathy,S., Meira,W., Dwarkadas,S., and Scott,M.: VM-Based Shared
Memory on Low Latency Remote Memory Access Networks, Proc. 24th Ann.
Int'l. Symp. on Computer Arch., ACM, pp.157169, 1997.
88. Lamport, L. How to Make a Multiprocessor Computer That Correctly Executes
Multiprocess Programs, IEEE Trans. on Computers, vol.C-28, pp.690691,
Sept. 1979.
89. LaRowe, R.P., and Ellis,C.S. Experimental Comparison of Memory Management
Policies for NUMA Multiprocessors, ACM Trans. on Computer Systems, vol.9,
pp.319363, Nov. 1991.
90. Lee, J., Keleher, P., and Sussman, A. : Supporting Computing Element
Heterogeneity in P2P Grids, Proc. IEEE Intl Conf.on Cluster Computing,
IEEE, pp. 150158, 2011.
91. Li, K., and Hudak,P. Memory Coherence in Shared Virtual Memory Systems,
ACM Trans. on Computer Systems, vol.7, pp.321359, Nov. 1989.
92. Lin, Y.-N., Lin, Y.-D., and Lai, Y.-C. : Thread Allocation in CMP-based
Multithreaded Network Processors, Parallel Computing,vol. 36, pp. 104116,
Feb. 2010.
93. Lu, H., Cox,A.L., Dwarkadas,S., Rajamony,R., and Zwaenepoel,W. Software
Distributed Shared Memory Support for Irregular Applications, Proc. 6th Conf.
on Prin. and Practice of Parallel Progr., pp.4856, June 1997.
94. Lukasiewicz, J.: Aristotle's Syllogistic, 2nded., Oxford: Oxford University
Press, 1958.
95. Lyytinen, K., and Yoo, Y.: Issues and Challenges in Ubiquitous Computing,
Commun. of the ACM, vol. 45, pp.6365, Dec. 2002.
96. Martin, R. P., Vahdat, A. M., Culler, D. E., and Anderson, T. E. Effects of
Communication Latency, Overhead, and Bandwidth in a Cluster Architecture,
Proc. 24th Ann. Int'l. Symp. on Computer Arch., ACM, pp.8597, 1997.
97. Mayhew , D., and Krishnan, V. PCI Express and Advanced Switching:
Evolutionary Path to Building Next Generation Interconnects, Proc. 11th
Symp. on High Perf. Interconnects IEEE, pp.2129, Aug. 2003.
98. McKusick, M.K., Bostic,K., Karels,M., and Quarterman,J.S. The Design and
Implementation of the 4.4 BSD Operating System, Reading, MA: AddisonWesley, 1996.
99. MNairy, C., and Soltis, D. Itanium 2 Processor Microarchitecture, IEEE
Micro Magazine, vol. 23, pp.4455, MarchApril 2003.
100. Mishra, A.K., Vijaykrishnan, N., and Das, C.R.: A Case for Heterogeneous OnChip Interconnects for CMPs, Proc. 38th Intl Symp. on Computer Arch.
ACM, 2011.

705

101. Morgan, C.: Portraits in Computing, New York: ACM Press, 1997.
102. Moudgill, M., and Vassiliadis,S. Precise Interrupts, IEEE Micro Magazine,
vol.16, pp.5867, Feb. 1996.
103. Mullender, S.J., and Tanenbaum,A.S. Immediate Files, Software Practice
and Experience, vol.14, pp.365368, 1984.
104. Naeem, A., Chen, X., Lu, Z., and Jantsch, A.: Realization and Performance
Comparison of Sequential and Weak Memory Consistency Models in NetworkOn-Chip Based Multicore Systems, Proc. 16th Design Automation Conf.Asia
and South Pacific, IEEE, pp. 154159, 2011.
105. Organick,E.: The MULTICS System, Cambridge, MA: M.I.T. Press, 1972.
106. Oskin, M., Chong, F.T., and Chuang, I.L.: A Practical Architecture for Reliable
Quantum Computers, IEEE Computer Magazine, vol. 35, pp.7987, Jan.
2002.
107. Papamarcos, M., and Patel., J. A Low Overhead Coherence Solution for
Multiprocessors with Private Cache Memories, Proc. 11th Ann. Int'l. Symp.
on Computer Arch., ACM, pp.348354, 1984.
108. Parikh, D., Skadron, K., Zhang, Y., and Stan, M. Power-Aware Branch Prediction:
Characterization and Design, IEEE Trans. on Computers, vol. 53, pp.168186,
Feb.2004.
109. Patterson, D.A. Reduced Instruction Set Computers, Commun. of the ACM,
vol.28, pp.821, Jan. 1985.
110. Patterson, D. A., Gibson, G., and Katz, R. A case for redundant arrays of
inexpensive disks (RAID), Proc. ACM SIGMOD Int'l. Conf. on Management
of Data, ACM, pp.109166, 1988.
111. Patterson, D.A., and Squin,C.H. A VLSI RISC, IEEE Computer Magazine,
vol.15, pp.822, Sept. 1982.
112. Pountain, D. Pentium: More RISC than CISC, Byte, vol.18, pp.195204,
Sept. 1993.
113. Radin, G. The 801 Minicomputer, Computer Arch. News, vol.10, pp.3947,
March 1982.
114. Raman, S.K., Pentkovski, V., and Keshava, J. Implementing Streaming SIMD
Extensions on the Pentium III Processor, IEEE Micro Magazine, vol. 20,
pp.4757, JulyAug. 2000.
115. Ritchie, D.M.: Reflections on Software Research, Commun. of the ACM, vol.
27, pp.758760, Aug. 1984.
116. Ritchie, D.M., and Thompson,K. The UNIX Time-Sharing System, Commun.
of the ACM, vol.17, pp.365375, July 1974.
117. Robinson, G.S. Toward the Age of Smarter Storage, IEEE Computer Magazine,
vol. 35, pp.3541, Dec. 2002.
118. Rosenblum, M., and Ousterhout, J. K. The Design and Implementation of
aLog-Structured File System, Proc. Thirteenth Symp. on Operating System
Principles, ACM, pp.115, 1991.
119. Russinovich, M.E., and Solomon, D.A. Microsoft Windows Internals, 4th ed.,
Redmond, WA: Microsoft Press, 2005.

706 9.

120. Rusu, S., Muljono, H., and Cherkauer, B. Itanium 2 Processor 6M, IEEE Micro
Magazine, vol. 24, pp.1018, MarchApril 2004.
121. Saha, D., and Mukherjee, A. Pervasive Computing: A Paradigm for the 21st
Century, IEEE Computer Magazine, vol. 36, pp.2531, March 2003.
122. Sakamura, K. Making Computers Invisible, IEEE Micro Magazine, vol. 22,
pp.711, 2002.
123. Sanchez, D., and Kozyrakis, C.: Vantage: Scalable and Efficient Fine-Grain
Cache Partitioning, Proc. 38th Ann. Intl Symp. on Computer Arch.,ACM, pp.
5768, 2011.
124. Scales, D.J., Gharachorloo,K., and Thekkath,CA. Shasta: A Low-Overhead
Software-Only Approach for Supporting Fine-Grain Shared Memory, Proc. 7th
Int'l. Conf. on Arch. Support for Prog. Long. and Oper. Syst., ACM, pp.174
185, 1996.
125. Seltzer, M., Bostic,K., McKusick,M.K., and Staelin,C. An Implementation of a
Log-Structured File System for UNIX, Proc. Winter 1993 USENIX Technical
Conf., pp.307326, 1993.
126. Shanley, T., and Anderson,D. PCI System Architecture, 4thed.. Reading, MA:
AddisonWesley, 1999.
127. Shoufan, A., Huber, N., and Molter, H.G.: ANovelCryptoprocessor Architecture
for Chained Merkle Signature Schemes, Microprocessorsand Microsystems,vol.
35, pp. 3447, Feb.2011.
128. Singh, G.: The IBM PC: The Silicon Story, IEEE Computer,vol. 44, pp. 4045,
Aug. 2011.
129. Slater, R. Portraits in Silicon, Cambridge, MA: M.I.T. Press, 1987.
130. Snir, M., Otto, S.W., Huss-Lederman, S., Walker, D.W., and Dongarra, J.: MPI:
TheComplete Reference Manual, Cambridge, MA: M.I.T. Press, 1996.
131. Solari, E., and Congdon, B.: PCI Express Design & System Architecture,
Research Tech, Inc., 2005.
132. Solari, E., and Willse, G.: PCI and PCI-X Hardware and Software, 6th ed.,
SanDiego, CA: Annabooks, 2004.
133. Sorin, D.J., Hill, M.D., and Wood, D.A.: A Primer on Memory Consistency and
Cache Coherence, San Francisco: Morgan&Claypool, 2011.
134. Stets , R., Dwarkadas, S., Hardavellas, N., Hunt, G., Kontothanassis, L.,
Parthasarathy,S., and Scott,M. CASHMERE-2L: Software Coherent Shared
Memory on Clustered Remote-Write Networks, Proc. 16th Symp. on Operating
Systems Principles, ACM, pp.170183, 1997.
135. Summers, C.K.: ADSL: Standards, Implementation, and Architecture, Boca
Raton, FL: CRC Press, 1999.
136. Sunderram, V.B.: PVM: A Framework for Parallel Distributed Computing,
Concurrency: Practice and Experience, vol.2, pp.315339, Dec. 1990.
137. Swan, R.J., Fuller,S.H., and Siewiorek,D.P. Cm*A Modular Multiprocessor,
Proc. NCC, pp.645655, 1977.
138. Tan, W.M.: Developing USB PC Peripherals, San Diego, CA: Annabooks,
1997.

707

139. Tanenbaum, A.S., and Wetherall, D.J.: Computer Networks, 5th ed., Upper
Saddle River, NJ: Prentice Hall, 2011.
140. Thompson, K.: Reflections on Trusting Trust, Commun. of the ACM,vol. 27,
pp.761763, Aug. 1984.
141. Thompson, J., Dreisigmeyer, D.W., Jones, T., Kirby, M., and Ladd, J.: Accurate
Fault Prediction of BlueGene/P RAS Logs via Geometric Reduction, IEEE,
pp. 814, 2010.
142. Treleaven, P. Control-Driven, Data-Driven, and Demand-Driven Computer
Architecture, Parallel Computing, vol.2, 1985.
143. Tu, X., Fan, X., Jin, H., Zheng, L., and Peng, X. : Transactional Memory
Consistency: A New Consistency Model for Distributed Transactional Memory,
Proc. Third Intl Joint Conf. on Computational Science and Optimization,IEEE,
2010.
144. Vahalia, U.: UNIX Internals, Upper Saddle River, NJ: Prentice Hall, 1996.
145. Vahid, F.: The Softening of Hardware, IEEE Computer Magazine, vol. 36,
pp.27-34, April 2003.
146. Vetter, P., Goderis, D., Verpooten, L., and Granger, A. Systems Aspects of APON/
VDSL Deployment, IEEE Commun. Magazine, vol. 38, pp. 6672, May
2000.
147. Vu, T.D., Zhang, L., and Jesshope, C.: The Verification of the On-Chip COMA
Cache Coherence Protocol, Proc. 12th Intl Conf.onAlgebraic Methodology
and Software Technology,Springer-Verlag, pp. 413429, 2008.
148. Weiser, M. The Computer for the 21st Century, IEEE Pervasive Computing,
vol.1, pp.1925, Jan.March 2002; originally published in Scientific American,
Sept. 1991.
149. Wilkes, M.V. Computers Then and Now, J. ACM, vol.15, pp.17, Jan.
1968.
150. Wilkes, M.V. The Best Way to Design an Automatic Calculating Machine,
Proc. Manchester Univ. Computer Inaugural Conf., 1951.
151. Wing-Kei, Y., Huang, R., Xu, S., Wang, S.-E., Kan, E., and Suh, G.E.: SRAMDRAM Hybrid Memory with Applications to Efficient Register Files in FineGrained MultiThreading Architectures, Proc. 38th Intl Symp. on Computer
Arch. ACM, 2011.
152. Yamamoto, S., and Nakao, A.: Fast Path Performance of Packet Cache Router
Using Multi-core Network Processor, Proc. Seventh Symp. on Arch.for Network
and Comm. Sys., ACM/IEEE, 2011.
153. Zhang, L., and Jesshope, C.: On-Chip COMA Cache-Coherence Protocol for
Microgrids of Microthreaded Cores, Proc. of 2007 European Conf.onParallel
Processing, Springer-Verlag, pp. 3848, 2008.

.

, , ,
. -, ,
. -,
, .
.


- ,
, . ,
, , 1078 ,
, 79
. .
.
,
. ,
, , ,
. ,
, .
.
,
.
1000 : 000, 001, 002, 003,..., 999.
. :
999;
;
;
;
.

, . ,
i j i+ j, i j ij . , i j,
i/j (, 7/2 1/0).
.
.

709

600 + 600 = 1200.


:

003 005 = 2.
:

050 050 = 2500.


:

007 / 002 = 3,5.


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

.
.
.
.

a + (b c) = (a + b) c.
a= 700, b= 400 c= 300.
(b c). 100. a
800. , (a+ b).
3- .
, 1100. 300 - ,
1100, 800. .
.
:
a(b c) = ab ac.
a= 5, b= 210 c= 195.
515= 75. 75 ,
ab .
, - , . , , , ,
.

710 .



(). ..1.
(
), 10 . .
2, 8 16. ,
.

. .1.

k k
0 k 1. 10 :
0123456789
, , :
01
:
01234567
16 . ,
6 . , 9, A F. ,
:
0123456789ABCDEF
( 1 0) . ..2 2001 ,
. 7B9, , ,
B . 111
. , (
).
..1 .

711

. .2. 2001 ,
.1. ,

10

11

100

101

110

111

1000

10

1001

11

10

1010

12

11

1011

13

12

1100

14

13

1101

15

14

1110

16

15

1111

17

16

10000

20

10

712 .
.1 ()

20

10100

24

14

30

11110

36

1E

40

101000

50

28

50

110010

62

32

60

111100

74

3C

70

1000110

106

46

80

1010000

120

50

90

1011010

132

5A

100

11001000

144

64

1000

1111101000

1750

3E8

2989

101110101101

5655

BAD



.
, ,
,
..
0
7 (. ..1). ,
.
.
3- .
,
, . ..3
.

.
. , , ,
. .
,
. ,
, .
( ) 2.
, (0 1) . .

713

, 0.
.
. ..4 ,
.

. .3.

. .4. 1492
( ). , 93 2, 46 1.

714 .

.
, 1 . :
10110 = 24 + 22 + 21 = 16 + 4 + 2 = 22.

, .
1, 2 ..
. 1. n
n 1 n (0 1). ,
, . ..5.

. .5. 101110110111
.
. ,
374 2 ( 1).
749

,
, 8 16.


4 .
. (0
, 1 ), .

715

, , (0 , 1 ). , .
. .
, , (0 ,
1 ). .
, (
). .
, , , 1, 9. ,
6 :
+6:
00000110.
6 :

11111001.
6 :

11111010.
, .
, m-
2m1, 2m1.
, 8- (m= 8) 128,
128. ,
3 3+ 128= 125, (3) 8-
125 (01111101). 128 +127
0 255 ( 8- ).
, . ..2
.
.2. 8-
N
N

128

00000001

10000001

11111110

11111111

011111111

00000010

10000010

11111101

11111110

01111110

00000011

10000011

11111100

11111101

01111101

00000100

10000100

11111011

11111100

01111100

00000101

10000101

11111010

11111011

01111011

00000110

10000110

11111001

11111010

01111010

00000111

10000111

11111000

11111001

01111001

00001000

10001000

11110111

11111000

01111000

716 .
.2 ()
N
N

128

00001001

10001001

11110110

11110111

01110111

10

00001010

10001010

11110101

11110110

01110110

20

00010100

10010100

11101011

11101100

01101100

30

00011110

10011110

11100001

11100010

01100010

40

10101000

10101000

11010111

11011000

01011000

50

00110010

10110010

11001101

11001110

01001110

60

00111100

10111100

11000011

11000100

01000100

70

01000110

11000110

10111001

10111010

00111010

80

01010000

11010000

10101111

10110000

00110000

90

01011010

11011010

10100101

10100110

00100110

100

01100100

11100100

10011011

10011100

00011100

127

01111111

11111111

10000000

10000001

00000001

128

10000000

00000000


: +0 0. .
, .
. , ,
, .

.
, , ,
:
;
.
, ,
m .
, .
0, - ,
.


.6 .
.
. , .

717

. .6.

. .7.


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


1. : 1984, 4000, 8192.
2. 1001101001 ,
.
3. BED, CAB, DEAD, DECADE, ACCEDED, BAG,
DAD ?
4. 100 2 9.
5. k , r?

718 .

6. 10.
. , . 1, 0. ,
? ? ,

. ?
7. 8- :
00101101 + 01101111
11111111 + 11111111
00000000 11111111
11110111 11110111
8. .
9. 3- . :
1) .
2) .
3) .
000 + 001
000 + 111
111 + 110
100 + 111
100 + 100
10. , n ,
n+ 1 . 0
.
9. , 014725 985274.
.
.
3- : 6, 2, 100,
14, 1,0.
11. , :
0001 + 9999
0001 + 9998
9997 +9996
9241 + 0802

719

12. .


. ?
13. 3.
14. 0111 0011.
15. ,
ASCII-,
,
.
16. , 32 ASCII . 32- .
32 ASCII- .

.

, , .
,
(910-28 ) (21033 ). 1060. :
0000000000000000000000000000000000.0000000000000000000000000009
2000000000000000000000000000000000.0000000000000000000000000000
34
28 . 62 .
, .
,
62.
- 62 .
62 , 50 60 ,
.
, .
.
, , .



:
n= f 10e,
f , e (
) .
. :
3,14 = 0,314 101 = 3,14 100.
0,000001 = 0,1 105 = 1,0 106.
1941 = 0,1941 104 = 1,941 103.
,
.
, .

721

, R 0,1 | f |< 1 . +0,100


1099 +0,999 10+99, 199 , 5 2 .

,
. ..1 .
7 :
1. 0,999 1099.
2. 0,999 1099 0,100 1099.
3. 0,100 1099 .
4. .
5. 0 0,100 1099.
6. 0,100 1099 0,999 1099.
7. 0,999 1099.

. .1. 7

,
, ,
1, 3, 5 7.
1 7 (, 1060 1060= 10120), , .
. 3 5. .
, ,
3 5.
10102 .
. x y
,
y x. , x y
z= (x+ y)/2. .
. 179100 , 179100
0 ( ),

722 .

358201 .
10+100 +0,999 1099 358201
. ..1 .
, 2 6. ,
+0,100 103 3 .
, .
.
, , 2 6 .
+0,998 1099 +0,999 1099 +0,998 100 +0,999 100.
,
. , , , , .
,
, .

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

.
.1.


1012

109

10

1099

101002

10999

10

109999

1013

109

10

1099

10

10999

1010003

109999

10

109

10104

1099

10

10999

1010004

109999

10

10

10999

20

10

10999

102

10002

103
1003

14

1004

1009
1019

723

. 2, 4, 8 16, 10.
, , .
0,
, 1, ( ).
.
, ,
.
..2 . 16- ( ) 7- . .
.

. .2.

724 .

IEEE 754
80-
. . ,
, ,
.
, 70- IEEE
.
,

. 1985 IEEE754 [IEEE, 1985].
( Intel, SPARC JVM)
, . ,
, , , ,
(William Kahan).
.
IEEE754 : (32 ),
(64 ) (80 ).
.

, . 2
. ..3.

. .3. IEEE : ();


( )

; 0
, 1 . . 127,
1023. (0) (255 2047) -

IEEE 754 725

.
, . 23
52 .
, 1 , . ,
PDP-11, , 1
, , . ,
. ,
1, , 23 52
. 23 52 0,
1,0. 1,
, 2,0.
, 23 52 (mantissa)
(significand). (s)
1 s< 2.
IEEE
..2. 0,5, 1 1,5 . 3F000000, 3F800000 3FC00000 .
.2. IEEE

11

23

52

32

64

127

1023

126 +127

1022 +1023

2126

21022

2128

21024

1038 1038

10308 10308

1045
10324

, ,
, . ,
IEEE, CDC 6600.
4
(..4).

726 .

. .4. IEEE

, () ,
.
: 0,
. , IEEE
. 0 ,
23 52 . 1 0.
, .
1
0 1,02-126. 0 0,99999992-127, .
, 23 , 24 .
0,
, , . 1 ,
0. 2-127, 2-23,
2-150. , 0,
.
, ,
. 0 0.
0, 1.
. : , ,
, 0. .
. ,
. ,
, 0. , 0,
.

727

, ?
.
(Not a Number, NaN). .


1. IEEE . .
1) 9;
2) 5/32;
3) 5/32;
4) 6,125.
2.
:
1) 42E28000H;
2) 3F880000H;
3) 00800000H;
4) C7F00000H.
3. IBM/370 7- ( 64), 24-
. .
16. , , . 7/64
.
4. ,
( 64) 2 16-
. :
1) 0 1000000 0001010100000001;
2) 0 0111111 0000001111111111;
3) 0 1000011 1000000000000000.
5. ,
( ). , .
3EE00000H 3D800000H .
6. ,
16- . 0.001
, 7- ( 64)
8- . 0.002 ,
5- ( 16) 10-
. 2. ?

728 .

?
- ?
7. ,
. ?
8. . (, ).
.

?
9.
. 32- .
10.
, 16, 2, ,
1 .
4 0001, 0010,..., 1111,
0000. 4
1 .

( , , )

(Instruction Set
Architecture, ISA), ,
, ,
. ISA ,
. , ,
, ,
. ,
, ADD, SUB MUL.

8088 Intel.
IBM PC
Corei7. ,
, .
,
, , ,
.
, 8088 Intel. 8088 , , ,
Corei7,
.
Corei7 8088; (32 16 ). ,

Corei7.
,
. , 8088,
8088 , ,
8088. ,
.

730 .

, , . ,
,
. (, ),
.

. , ,
, .



, .


, ,

(, , ) ADD, SUB MUL.
, .
,
, ,
.
, , ( )
, . , , , ,
. ,
, ,
.
.
, ,
.
( , ),
. , , ,
. ,
, ;
, ;
, .

731


, . ..1,
8088. , ,
; . - ( HlloWrld.s) examples.
(s), , ,
, .
, ..1,, .

.

..1. (a);
( )

,
..1,.
. ,
(CS, DS, SS ES), (AH, AL, AX)
.

, .
;
, .
, ,
. , Enter . , ,
, ,
.

732 .

, ,
, . . , ,
,
. .
,
,
: , , .
,
, .

8088
, 8088, ,
.
. PC (Program Counter
). (),
.
IP (Instruction Pointer ). , ,
. , 8088, 1,
64.
1 CS (...1).
, CS.
, , 64 . ..1 DS,

, .
CS DS , 8088
16 , , , 20- , 1, .
.
, .
. , , ,
.


8088 ( )
.
:

8088 733

1. PC
.
2. .
3. .
4.
() .
5. .
6. () .
7. ( 1).
. , ( ).
4.
, , 8088
14 . , ; , , .
..2. ,
..1.

..2. 8088

734 .

8088 16 .
.
,
, ..2.
.


AX, BX, CX DX .
, AX, -.

. ,
(, ) AX .
, BX, . AX, .
BX , ,
. , BX
, AX .
, . :
MOV AX,BX

BX AX. :
MOV AX,(BX)

AX , BX. BX;
. ,
, MOV : () (). .
, CX, -.
, . LOOP
. ,
, CX .
(DX). AX
(32-). DX 16 , AX 16 . ,
32- .
64- ,
32- . ,
.

16- , 8- . ,
8088 8- , . ,

8088 735

, 8- . (, AX),
(, AL AH). , ,
, 16- , , ,
8- . , AL AH ,
AX. AX 16-
AL AH .
AX, AH AL
:
MOV AX,258

AX 258.
AH 1,
AL 2. :
ADDB AH,AL

AH AL
( 2), 3.
AX 770, 0000001100000010 003002
. , 8
. MULB,
AL,
AH . DIVB
AH AL . - CL

.
( GenReg.s) .

-
- .
(SP). .
, ,
. ,
, ,
,
. , , .
, , , ,
. ,

. ,
.
.

736 .

, . 8088 PUSH, 16-


. SP
2, , . POP 16-

SP . SP,
, PUSH, POP CALL; PUSH CALL
, POP, , .
(BP).
. SP,
, BP .
BP
; . , BP (
, ), SP
( ).
,
- BP SP.
: SI (Source Index ) DI (Destination Index ). BP
,
BX .
, .
, , Intel (PC).
.
,
PC.
. ,
.
, , ,
, :
Z ;
S ( );
V ;
C ;
A ( 3);
P .
. , I , T ,
. , D
. 16 ; .

737

. , , .
, .
(CS), (DS), (SS)
(ES). .
,
, ,
.
.


8088 , 1- 16- . ,
1 20 .
, 16-
.
64 , 16 .
8088 .


8088, 8- ,
, .
, , 8088
, .
8088 65536 . : , , .
, .
PC
. PC
, . .
BX ,
. , . , SP BP,
. ,
.
16-
CS, DS, SS ES. 20- ,
4
. , 20-
, 16-.

738 .

. 16- 20-
.
16 .
, DS 7, BX 12, , BX
716+ 12= 124. , 7 DS
20- 00000000000001110000.
16- 0000000000001100 ( 12), 20- 00000000000001111100 (
124).

.
, ,
,
DS. , .
CS
. , 16-
CS 20- , 16- PC; 20-
.
2- , ,
(SP) .
. , PUSH
2, , SS SP. POP
PUSH SP 2.
, , SP, . ,
SP. DS SS
, 16- .
DS SS , 17-

. ,
.

, , .
.
16- . ,

.

739

,
, .
8088 . , () ().
:
MOV AX,BX
ADD CX,20

, . ( ;
.) ,
, . ,
.
8088 ,
, . ,
, ,
.
. ,
.
,
.
. , MULB
AX.
. ,
, , . ,
(
).
8088 : ,
(2), (4 ) - ,
. .
, , . , ,
20, 20 21. 24
2427. 8088 (little endian); ,
.
. AXDX, AX ,
8088.

740 .

..1 8088 .
. .
. 8 .
.1. ( #
)

AH, AL, BH, BL, CH, CL, DH, DL

AX, BX, CX, DX, SP, BP, SI, DI

(#)

(SI), (DI), (BX)

#(SI), #(DI), #(BX)


BX
SI/DI

(BX)(SI), (BX)(DI)

BX SIDI

#(BX)(SI), #(BX)(DI)

(BP)


#(BP)
BP


BP
SI/DI

(BP)(SI), (BP)(DI)

BP SI/DI

#(BP)(SI), #(BP)(DI)


(SP) PUSH, POP, PUSHF, POPF

741

LAHF, STC, CLC, CMC

XLAT

AL, BX

XLAT

(SI), (DI), (CX)

MOVS, CMPS, SCAS

AX, AL

IN #, OUT #

AL, AX, DX

CBW, CWD

, .

.
,
. :
ADD CX,(20)

CX ,
20 21. , ,
. CALL JMP
, . ( , ,
),
:
ADD CX,20

, CX 20, ,
20. # ..1
, .

: BX, SI DI.
. , ,
.
, , . , SI 5,
, FORMAT, AL
:
MOVB AL,FORMAT(SI)


. -
2.

742 .

, ( )
BX, SI DI .
. :
PUSH (BX)(DI)

, BX DI.
.
:
NOT 20(BX)(DI)

BX+ DI+ 20 BX+ DI+ 21.


, ,
; BX
BP. , (BP) , ,
: 1(BP)(SI).

, .
.
, ,
, . ,
.
, .
.
,
, . :
CMP AX,50

AX 50 .
, . . :
PUSH AX

AX ; SP , AX ,
SP. SP .
,
. .
8088
(MOVS), (CMPS) (SCAS) . SI DI . , ,
. (
) SI DI
. , .

8088 743

1 2 .
: 2
PUSH 2 POP.

8088
, , ,
. , ,
.
8088. ..2,
10 .
.2. 8088

MOV(B)

re, er, e#

XCHG(B)

re

LEA

r#e

PUSH

e, #

POP

PUSHF

POPF

XLAT

AL

ADD(B)

re, er, e# *

ADC(B)

re, er, e# *

SUB(B)

re, er, e# *

SBB(B)

- re, er, e# *

IMUL(B)

U *

MUL(B)

U *

IDIV(B)

U U

DIV(B)

U
U U

744 .
.2 ()

CBW

CWD

NEG(B)

NOT(B)

INC(B)

DEC(B)

AND(B)

er, re, e# 0

OR(B)

er, re, e# 0

XOR(B)

er, re, e# 0

SHR(B)

e1, eCL

SAR(B)

e1, eCL

SAL(B)
(=SHL(B))

e1, eCL

ROL(B)

e1, eCL

ROR(B)

e1, eCL

RCL(B)

e1, eCL

RCR(B)

e1, eCL

TEST(B)

er, e#

CMP(B)

er, e#

STD

-
()

CLD


( )

STC

CLC

8088 745

CMC

LOOP

,
DEC(CX)0

LOOPZ
LOOPE

,
Z= 1 DEC(CX)0

LOOPNZ
LOOPNE

,
Z= 0 DEC(CX)0

REP REPZ
REPNZ

MOVS(B)

LODS(B)

STOS(B)

SCAS(B)

CMPS(B)

JCC

JMP

e,

CALL

e,

RET

, #

SYS

,
.
MOV, .
, . ..2 r, e. , ,
, er.
MOV. , ,
, , (). , er
, .
, MOV ,
. re (
).
, ,
e#.

746 .

(#). B , (MOV) (MOVB).


, .

,
(). ,
. , ,
.
, , XCHG.
. ().
,
XCHG re.
(LEA).
.
PUSH, .
( #
), ( e ).
, SP, . SP 2,
, SP .
POP
. PUSHF POPF,
, . XLAT,
AL , AL BX.
256 .
8088 IN OUT
( ..2).
, - .
AX,
.
..2 .
, MOV: (re),
(er) (e#).
(O), (S ), (Z ) (C ).
O ,
, ,
. , 16- 0x7fff (32767 )
16- ,
O.
.
,
(*). ADC SBB

8088 747

( ),
. 32-
. ,
.
.
IMUL IDIV;
MUL DIV.
AH : AL.
AX : DX.
, DX AX . ,
. ,
.
.
: DX: AX AH : AL. AX AL, DX
AH. , ,
.
, ,
, ,
, . ,
, 8088,
,
.
- , ASCII- (AAA) (DAA),
..2.

,

, , , .
, , DX : AX AH : AL.
() . NEG, INC DEC
, .
.
.
.

748 .

; CL .
; .

, . RCR,
RCL, RCRB RCLB , , 17- 9- ,
.
, ,
. , . ()
. TEST ,

. ,
. CMP ,
. ,
SI DI ,
STD CLD .
8088
. , ,
. ,
(4-) .
, LAHF SAHF, AH, .

. , , ,
, 8080 8085.



. LOOP
CX
. LOOPZ,
LOOPE, LOOPNZ LOOPNE, ,
CX .
LOOP
128 ; ,
8- .
( ), , . ,
,
. -

8088 749

,
,
- . 2,5 ,
50 .

: REP, REPZ REPNZ. ,
..2, / . SI , DI ,
ES. REP, MOVSB
. CX.
MOVSB , REPNZ
ASCII- ; , REPNZ
SCASB, CX ,
REP MOVSB. .

ES ( DS). , ES= DS= SS.


..2
, . JMP.
.
. , .
CS, , .

;
,
,
.
. 20- ,
16 . CS PC .

8088 15 , (, JUMP GREATER
OR EQUAL JUMP NOT LESS THAN ). ..3.
128 .
, ( jump over jump).

750 .

.
,

. :
JB FARLABEL

:
JNA 1f
JMP FARLABEL
1:

, JUMP BELOW , , JUMP NOT ABOVE 1


FARLABEL. ,
. ,
. . ,
, .
.
. , .
,
.
.3.

JNA, JBE

CF = 1 ZF = 1

JNB, JAE, JNC

CF = 0

JE, JZ

ZF = 1

JNLE, JG

SF = OF ZF = 0

JGE, JNL

SF = OF

JO

OF = 1

JS

SF = 1

JCXZ

CX

CX = 0

JB, JNAE, JC

CF = 1

JNBE, JA

CF = 0 ZF = 0

JNE, JNZ

ZF = 0

JL, JNGE

SF OF

JLE, JNG

SF OF ZF = 1

JNO

OF = 0

JNS

SF = 0

8088 751


. CMP
, ,
. .
( ) .
,
. , .
.
GREATER THAN
LESS THAN. ABOVE BELOW.


8088 , ,
(subroutines). . .
, . ,
,
(..3).
, .
CALL. , ,
, , . ,

.

..3.


. CS
PC, .
CALL .

752 .

, RET, ,
, , CALL. RET
. , ;
SP, . ( RETF)
.
.

SP
BP. , .
BP ,
BP+ 4 BP+6
. ,
; .
..3 ,
BP 2, BP 4 BP 6. ,
BP.
, , .
, , , , BP
RET.

. ,
, .

. ,
AX DX.
, ,
. ,
RET. , ,
AX DX ( ),
, .


,
, , . ,
. ..4.

8088 753
.4. UNIX,

_OPEN

*name, 0/1/2

_CREAT

*name, *mode

_READ

fd, buf, nbytes

n (nbytes)
buf

_WRITE

fd, buf, nbytes

n (nbytes)
buf

_CLOSE

fd

0 -
fd

19

_LSEEK

fd, offset(long), (long)


0/1/2

_EXIT

status

117

_GETCHAR

122

_PUTCHAR

char

127

_PRINTF

*format, arg

121

_SPRINTF

but, *format,
arg

buf

125

_SSCANF

buf, *format,
arg


buf

:
,
; ; ,
SYS . ,
,
. AX, DX: AX ( ).
SYS
. . ,
.
; ,
. ,
.

754 .

OPEN CREAT. , . OPEN 0 ( ), 1(


) 2 ( ). ,
. CREAT , . OPEN CREAT AX,
,
. ,
.
: 0 , 1
2 .
READ WRITE : , ,
, . , ,
, , (READ
WRITE).
C:
read(fd, buffer, bytes);


: bytes, buffer, fd.
CLOSE .
0 AX. EXIT
.
LSEEK - .
.
, ,
, .
: (0), (1)
(2). ;
DX: AX.
, .
GETCHAR
AL; AH . AX 1. PUTCHAR
. ;
1.
PRINTF . , . %d
, , .
, %x , %o
. %s

8088 755

,
.
.
:
printf(??x = %d and y = %d\n??, x, y);

x y %d
. C y, x, .
, printf ,
.
, , printf
.
SPRINTF ,
( PRINTF,
). , PRINTF.
SSCANF PRINTF
, ,
,
.
, .
,
. , .


8088
,
; , ,
. :
ESEG MOV DX,(BX)

BX,
, DX.
( SP),
( , DI)
. SS, DS ES
MOV, ,
XCHG .
,
. , .
. , . ,
. .

756 .

, 8088.
, 8088
, , ,
.
( ),
( ), , ,
.

, ADD CMP.
AX, BP .. ,
, , .
,
, . ,
, . ,
( ), .
, .
, , (
),
. , .
.
.

( );
,
. , ,
.
, .
,
.
, .

, ,
. , 2 3 ,
5. , , L 5:

757
MOV AX,6
MOV BX,500
L:

.
, . , ,
.
.

as88 ACK
/ as88,
- . , ACK (Amsterdam Compiler Kit), UNIX,
MS-DOS Windows.
(!). ,
,
. ,
.
,
. . , , .
, , ,
. , BSS
(Block Started by Symbol ), ( ,
) .
. ,
, , ,
, .., , ,
, ,
. ,
. , BSS
.
,
. ,
. :
CMP AX,ABC
JE L
MOV AX,XYZ
L:

L , . . -, , - , (:).

758 .

;
. -, , (:). .
:
JE 2f

JUMP EQUAL
2. :
JNE 4b

JUMP NOT EQUAL


4.


=

- , :
BLOCKSIZE = 1024


. ,
BLOCKSIZE, BLOCKSIZZ BLOCKSIZ . , .
,
.
( ), ( 0X 0x). af AF 10 15. +, , *, / %
, , , .
&, ^ ~ ,
() .
.
( ).
.
. , ,

. , , . ,
, as88
.
,
, . . as88 ..5.

759
.5. as88

.SECT .TEXT

.SECT .DATA

.SECT .BSS

BSS

.BYTE

.WORD

.LONG

.ASCII "str"

str ASCII-

.ASCIZ "str"

str ASCII-

.SPACE n

.ALIGN n

n-

.EXTERN

, . ,
.
, , BBS.
.
,
. .

. : .BYTE, .WORD, .LONG .

.
: ASCII ASCIZ.
, ASCIZ
. , . -, ..6.

, \377 ( , 0 ).
.6. as88 -
-

\n

( )

\t

\\

760 .
.6 ()
-

\b

\f

\r

\"

SPACE , . , BSS
. ALIGN
2-, 4- 8- , , ..
. , EXTERN

. ;
.
. ,
; .
- \r (
) \n ( ), . ,
,
.$.

#include _

$-. ,
, . ,
.
. #include
,
.
(, pr.s) ,
pr,
pr.$. , , $-,
.
,
oprojname; projname.$.
,
. ,
, . ,

761

, projname.$,
, , . ,
#include.

8088
as88 UNIX,
Microsoft MASM Borland 8088 TASM. MASM, TASM
MS-DOS,
. MASM
TASM 8088, MS-DOS.
, ,
, , 64, ,
64 , , .
.
DS.

(, CS MOV). as88 , ,

- .
BSS, .
; ,
.data,
.code. title ( ),
.model ( ) .stack ( ). .com,
;
, 256
.
.WORD .BYTE ASCIZ TASM MASM DW ( ) DB ( ).
DB .
.
DUP;
, . :
LABEL DB 1000 DUP (0)

1000 ASCII-
LABEL.
,
PROC. , -

762 .

ENDP, . .
, , MASM, TASM
as88. ,
. , , .
C C++, ,
C. ,
as88 .
MASM, TASM as88 . MASM TASM
INT. INT 21H; MS-DOS.
AX (
).
, INT 16H BIOS INT 10H
. ,
.
UNIX, as88, .

/ (VT100) 2480 ANSI-.


UNIX Linux
X-window. Windows ansi.sys;
. . ..4,
.
;
,
.
,
. .
v, > () <
(). n (
) p ( ).
z, c.
.
. (=>).
,
. , .
, , (=>).

763

..4.


. ,
, . , (
Enter).
. ,
, .
8 . 11 ,
. ,
,
. ,
, :
.
.
, , . E, I, >. (->)
. read getchar
.
Enter.
(->).
, .
,
. .t,
.i. ,

764 .

, .
.$, , .
(, pr)
:
1. (pr.s).
2. (pr.$).
3. (pr.88).
4. (pr.i).
5. (pr.t).
6. (pr.#).

. , ,
: ;
.


..7. ( ),
, q ( ).
, . , k k-
. ,
(!) X.
.7.

,! ,X

24

/T +#

g,!,

/start +5g

# T

/T +#

/start +5b

#
T

/T +#

/start +5c

#
T

108g

765

/buf + 6

+#

/D +#
/D +#

d,!

/buf + 6d

+#

R , CTRL L

g .
. ,
. /T
( +# ) , , T. g
,
.
/label: .

, . /label: g.
(..7 #),
.
b . b
.
, . , .
,
. c, ,
b, .
r, ,
.
, ,
. ;
.
.
, (
, ). .
+,
( ) . = ,
,
CALL. =

766 .

. n,
. LOOP;
.


, , . .
Solaris, UNIX, Linux Windows.
- www.prenhall.com/tanenbaum.
, Companion Web Site, , , , . zip-
assembler. . - Bigendnx,
LtlendNx MSWindos. assembler, ,
, .
UNIX (
Sun), UNIX (
Linux, ) Windows.
assembler
: READ_ME, bin, as_src, trce_src, examples exercise.
bin,
examples.
,
examples
t88 HlloWrld

.
as_src.
C, make.
POSIX-
Makefile, . Windows
make.bat. , , PATH
, as88 t88
. , t88 .
Windows 2000 XP
ansi.sys; config.nt :
device=%systemRoot%\System32\ansi.sys

:
Windows 2000 \winnt\system32\config.nt;
Windows XP \windows\system32\config.nt.
UNIX Linux .

767

8088, 8088
8088, . ,
as88. . ,
. ,

. , ,

. . , ,
examples .
.

Hello World
HlloWrld.s. .1
, ..5 .
(!) .
,
.

..5. .1
.1. HlloWrld.s
_EXI T = 1
_WRITE = 4
_STDOUT = 1
.SECT .TEXT

!
!
!
!

1
2
3
4

768 .
.1 ()
start:
MOV CX,de-hw
PUSH CX
PUSH hw
PUSH _STDOUT
PUSH _WRITE
SYS
ADD SP, 8
SUB CX,AX
PUSH CX
PUSH _EXIT
SYS
.SECT .DATA
hw:
.ASCII "Hello World\n"
de: .BYTE 0

!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

.SECT 4 , , , .
, , 17, .
19 , 12 ,
(\n) .
5, 18 20 , (:).
, . . start
, 0,
( )
.
6. .
, 6 :
MOV CX,12

, , .
, , 19. MOV 6
de hw CX.
711
. , C:
write(1, hw, 12);


(1), (hw),
(12). 79 , , C
. 10
write (4), 11 .
UNIX ( Linux), -

769


. , Windows
as88 t88 , UNIX.
11 . 12
, ,
2- . write , AX. 13
11
, CX; ,
. ,
, , . 14 15 exit, 16; ,
EXIT, .
, MOV SUB , . ;
.
, , .
HlloWrld.s .
UNIX, Windows.
Linux, Solaris, MacOSX UNIX ,
UNIX. -,
( ). Windows

(Start Programs Accessories Command Prompt). ,
examples cd. .
, ;
ls (UNIX) dir (Windows).
as88 t88 . Windows
.exe, .
, .

as88 HlloWrld.s

examples,
, UNIX :
./as88 HlloWrld.s

Windows :
.\as88 HlloWrld.s


:
Project HlloWrld listfile HlloWrld.$
Project HlloWrld num file HlloWrld.#
Project HlloWrld loadfile HlloWrld.88

770 .

, .
,
t88 HlloWrld

,
MOV CX,de-hw

6 .1.
( Enter). ,

PUSH CX

CX , , 12.
, 000c 12.
, 12.
, 810.
, 000b.
, :
"Hello World\n"

, SP 0x7ff0. SP 8 0x7ff8. exit ,


.
, , hlloWrld.s
(
). UNIX ex, vi emacs; Windows
(Notepad),

(StartProgramsAccessoriesNotepad).
Word , .
19, , .
.


,
8088. genReg.s, start,
.2, ..6 7.

771

..6. : 7 ();
( )
.2. genReg.s
start:
MOV AX,258
ADDB AH,AL
MOV CX,(times)
MOV BX,muldat
MOV AX,(BX)
llp: MUL 2(BX)
LOOP llp
.SECT .DATA
times: .WORD 10
muldat: .WORD 625,2

!
!
!
!
!
!
!
!
!
!
!

3
4
5
6
7
8
9
10
11
12
13

4 AX 258:
MOV AX,258

AH 1, AL 2. , 5, AL AH , AH .
6 CX times (10). 7
BX muldat, 2, .
, ..6,. , AH
3, AL 2, AX 770; ,
3256+ 2= 770.
( 8) muldat
AX. ,
AX 625.
, AX 2BX ( muldat+ 2), 2.
MUL
DX:AX. (1250) , AX, DX .
7 ..6,.
AX 625, 80000.
AX, 32- , DX:AX; , DX 1,

772 .

AX 14464. , 165536+
+ 14464= 80000. , CX 4, LOOP . 10,
MUL ( LOOP) CX 4.
. AX, DX ;
, MUL AX (14464) 2 28928.
AX 28928, DX ,
.


vecprod.s , : vec1 vec2.
.3.
.3. vecprod.s
_EXIT
= 1
_PRINTF
= 127
.SECT .TEXT
inpstart:
MOV BP,SP
PUSH vec2
PUSH vec1
MOV CX,vec2-vec1
SHR CX,1
PUSH CX
CALL vecmul
MOV (inprod),AX
PUSH AX
PUSH pfmt
PUSH _PRINTF
SYS
ADD SP,12
PUSH 0
PUSH _EXIT
SYS
vecmul:
PUSH BP
MOV BP,SP
MOV CX,4(BP)

1:

MOV SI,6(BP)
MOV DI,8(BP)
PUSH 0
LODS
MUL (DI)
ADD -2(BP),AX

!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!

1
2
3
4
5
6

_EXIT
_PRINTF

inpstart
SP BP
vec2
vec1
8 CX =
9 CX =
10
11 vecmul
12 AX
13

14

15
PRINTF
16 PRINTF
17
18
19 EXIT
20 EXIT
21 vecmul(count, vec1, vec2)
22 BP
23 SP BP

24 CX

25 SI = vec1
26 DI = vec2
27 0
28 (SI) AX
29 AX (DI)
30 AX

773

ADD DI,2
LOOP 1b
POP AX
POP BP
RET

!
!
!
!
!
!
!


31 DI

32 CX > 0, 1b
33 AX
34 BP
35

.SECT .DATA
! 36
pfmt: .ASCIZ "Inner product is: %d\n" ! 37
.ALIGN 2
! 38
vec1:.WORD 3,4,7,11,3
! 39 1
vec2:.WORD 2,6,3,1,0
! 40 2
.SECT .BSS
! 41 BSS
inprod:
.SPACE2
! 42 inprod

vecmul;
SP BP, vec2 vec1 ,
vecmul . , 8
CX.
1 ( 9) CX ,
10. vecmul 11.
, , , , C
. , C vecmul :
vecmul(count, vec1, vec2)

CALL .
, 0x0011.
PUSH.
(BP) 22. BP , .
, 23 BP ; ,
.

.
. ,
, , .
,
2(BP). count 4(BP).
CX 24. 25 26 vec1 vec2 SI DI .

0. 27 0.
, 28, ..7.
( ) .
vec2 (0x0022); , , vec1 (0x0018) , (0x0005).
(0x0011). 1 , ,

774 .

. 1,
.
BP (0x7fc0) , 27. ,
, (
SP). ;
.
, 28. LODS SI AX. , LODS , ,
SI vec1.
,
t88 vecprod

:
/vecmul+7b

..7. vecprod.s
28,

,
, LODS. ( ,
.)
g


. ,
LODS.
29 AX . ,
MUL, DI
. ( )
MUL DX:AX.
30 , -2(BP). MUL

775

, 31.
DI vec2.
LOOP.
CX ,
, 1
28. 1b l
. AX ( 33),
BP ( 34) ( 35).

MOV ( 12).
, . printf
printf C. 1315 3 :
, , (pfmt)
printf (127). pfmt %d, , , ,
printf.
17 . 5,
,

MOV SP,BP

, .
,
, .
vecmul . vecprod.s
, . _EXIT
_PRINTF. syscalnr.h ,
.


, . , .
,
vec1. 3 .
, .
, , ,
, ,
, :
#include "../syscalnr.h"

776 .

, :
STDIN = 0
STDOUT = 1
STDERR = 2

, , .
,
. ,
,
.
arrayprt .4. ,
,
. 4

, 10. ( 59)
. 2225 .
.4. arrayprt
#include "../syscalnr.h"

! 1

.SECT .TEXT
vecpstrt:
MOV BP,SP
PUSH vec1
MOV CX,frmatstr-vec1
SHR CX
PUSH CX
CALL vecprint
MOV SP,BP
PUSH0
PUSH _EXIT
SYS

!
!
!
!
!
!
!
!
!
!
!
!

.SECT .DATA
vec1: .WORD 3,4,7,11,3
frmatstr: .ASCIZ "%s"

! 14
! 15
! 16

frmatkop:
.ASCIZ "The array contains "
frmatint: .ASCIZ " %d"

! 17
! 18
! 19

.SECT .TEXT
vecprint:
PUSH BP
MOV BP,SP
MOV CX,4(BP)
MOV BX,6(BP)
MOV SI,0
PUSH frmatkop

!
!
!
!
!
!
!
!

2
3
4
5
6
7
8
9
10
11
12
13

20
21
22
23
24
25
26
27

777
PUSH frmatstr
PUSH _PRINTF
SYS
MOV -4(BP),frmatint
1: MOV DI,(BX)(SI)
MOV -2(BP),DI
SYS
INC SI
LOOP 1b
PUSH '\n'
PUSH _PUTCHAR
SYS
MOV SP,BP
RET

!
!
!
!
!
!
!
!
!
!
!
!
!
!

28
29
30
31
32
33
34
35
36
37
38
39
40
41

2730 , ,
3134 printf . 27,
33 .
PRINTF. 3739
putchar.
.

as88 arrayprt.s

28

arrayprt.$.

;
. 28
. 28 arrayprt.s - arrayprt.$
. 28 arrayprt.$ 7 arrayprt.s,
syscalnr.h 21 .
UNIX 28 arrayprt.$
head 28 arrayprt.$

28 . ,
.
, . ,
7 , SHR. ..2 :
. 7
:
SHR CX,1

, arrayprt.s,
arrayprt.$,
.
, ,
.
t88 arrayprt

778 .

, , . 3, 4, 7, 11 3,
3, 1024, ,
- .
, . ,
, 32 33.
. , SI ,
, ,
. , 35. SI
, 2.
, :
ADD SI,2

.
. vecprint .
, ,
vecprint, ,
RET 41. , . ,
40 :
ADD SP,10
POP BP

5 , vecprint;
BP, 22.

BP, , . . ,
, ,
, .


. .5 .6 , strngcpy.s reverspr.s,
examples.
.5. (strngcpy.s)
.SECT .TEXT
stcstart:
PUSH mesg1
PUSH mesg2
CALL strngcpy
ADD SP,4
PUSH 0
PUSH 1
SYS

!
!
!
!
!
!
!
!

1
2
3
4
5
6
7
8

779
strngcpy:
PUSH CX
PUSH SI
PUSH DI
PUSH BP
MOV BP,SP
MOV AX,0
MOV DI,10(BP)
MOV CX,- 1
REPNZ SCASB
NEG CX
DEC CX
MOV SI,10(BP)
MOV DI,12(BP)
PUSH DI
REP MOVSB
CALL stringpr
MOV SP,BP
POP BP
POP DI
POP SI
POP CX
RET
.SECT .DATA
mesg1: .ASCIZ "Have a look\n"
mesg2: .ASCIZ "qrst\n"
.SECT .BSS

!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

.6. (reverspr.s)
#include "../syscalnr.h"
start: MOV DI,str
PUSH AX
MOV BP,SP
PUSH _PUTCHAR
MOVB AL,'\n'
MOV CX,-1
REPNZ SCASB
NEG CX
STD
DEC CX
SUB DI,2
MOV SI,DI
1: LODSB
MOV (BP),AX
SYS
LOOP 1b
MOVB (BP),'\n'
SYS
PUSH 0
PUSH _EXIT
SYS
.SECT .DATA
str: .ASCIZ "reverse\n"

!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

780 .

.5 .
stringpr, stringpr.s
( ).
, , as88
, , . , , .5,
as88 strngcpy.s stringpr.s

.6
. .
.5 , .
( 28) strngcpy
: mesg2 mesg1; .
strngcpy, 9 . ,
. 1013
; , 2730, . 14 SP BP . BP
. 26
BP SP.
REP MOVSB, 24 . MOVSB ,
SI, , DI. . REP ,
MOVSB;
CX 1. CX
.
REP MOVSB , 1522. , SI,
21; , DI, 22.
CX . ,
. MOVSB
, SCASB ( ).
, DI, AL
DI . MOVSB, . 15 AX AL, 16
DI, 17 CX 1. 18 REPNZ SCASB,

. CX,
REPNZ
, CX. MOVSB,
, CX
1 ( 1920).

781

, ,
. ,
.
23 25
stringpr, examples.
, .
,
.6, 1 . 3 , 4
(BP) . ASCII- ,
_PUTCHAR. : BP ,
SYS.
2, 6 7 DI, AL CX SCASB.
, , , AL .
, SCASB str \n,
c, .
REP SCASB DI, ,
. 12 DI 2;
.
, , , ; 10 ,
. LODSB
14 AL, 15
_PUTCHAR, SYS .
, 18 19, ,
_EXIT.
, , .
.
/str str .
, ,
.
, ,
. . 13, . b
15. , ,
e. r,

. , r,
, .

782 .


.

, syscalnr.h, 20. ,
, , 16, 36b. ,
start 2

/start + 14b


, .
.
, , ,
SYS. 8088 jumptbl.s,
.7.
.7.

#include "../syscalnr.h"
.SECT .TEXT
jumpstrt:
PUSH strt
MOV BP,SP
PUSH _PRINTF
SYS
PUSH _GETCHAR
1: SYS
CMP AX,5
JL 8f
CMPB AL,'0'
JL 1b
CMPB AL,'9'
JLE 2f
MOVB AL,'9'+1
2: MOV BX,AX
AND BX,0Xf
SAL BX,1
CALL tbl(BX)
JMP 1b
8: PUSH 0
PUSH _EXIT
SYS
rout0: MOV AX,mes0

!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

783
JMP 9f
rout1: MOV AX,mes1
JMP 9f
rout2: MOV AX,mes2
JMP 9f
rout3: MOV AX,mes3
JMP 9f
rout4: MOV AX,mes4
JMP 9f
rout5: MOV AX,mes5
JMP 9f
rout6: MOV AX,mes6
JMP 9f
rout7: MOV AX,mes7
JMP 9f
rout8: MOV AX,mes8
JMP 9f
erout: MOV AX,emes
9:
PUSH AX
PUSH _PRINTF
SYS
ADD SP,4
RET

!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

.SECT .DATA
!
tbl: .WORD rout0,rout1,rout2,rout3,rout4,rout5,
rout6,rout7,rout8,rout8,erout
!
mes0: .ASCIZ "This is a zero.\n"
!
mes1: .ASCIZ "How about a one.\n"
!
mes2: .ASCIZ "You asked for a two.\n"
!
mes3: .ASCIZ "The digit was a three.\n"
!
mes4: .ASCIZ "You typed a four.\n"
!
mes5: .ASCIZ "You preferred a five.\n"
!
mes6: .ASCIZ "A six was encountered.\n"
!
mes7: .ASCIZ "This is number seven.\n"
!
mes8: .ASCIZ "This digit is not accepted as an octal.\n"
!
emes: .ASCIZ "This is not a digit. Try again.\n"
!
strt: .ASCIZ "Type an octal digit with a return. Stop on end of file.\n"!

49
50
51
52
53
54
55
56
57
58
59
60
61

strt, ( 47 ).
( 8 9). AX
5, ,
8 22 0.
,
AL. , 0,
13 ; . , 9, .
16 ASCII- , ASCII- 9.
, 17 AX
0 . BX. 18 AND , ,

784 .

0 10 ( , ASCII 0x30). ,
, BX 2 19.
20 .
BX tbl,
PC.
,
.
,
_PRINTF.
, , JMP
CALL PC .
, . ,
, ,
50. , , tbl, rout0, rout1, rout2 ..,
. 2-
1, 19. .
erout ( 4348 ). ,
. -, 43 ( AX).
_PRINTF.
, , .
rout0 rout8
AX, erout, .
, . , , ,
.


InFilBuf.s, .8, -. , ,
. , n n .
,
lseek read.
.
,
.

785
.8. ,

#include "../syscalnr.h"
bufsiz = 512
.SECT .TEXT
infbufst:
MOV BP,SP
MOV DI,linein
PUSH _GETCHAR
1: SYS
CMPB AL,'\n'
JL 9f
JE 1f
STOSB
JMP 1b
1: PUSH 0
PUSH linein
PUSH _OPEN
SYS
CMP AX,0
JL 9f
MOV (fildes),AX
MOV SI,linh+2
MOV BX,0
1: CALL fillbuf
CMP CX,0
JLE 3f
2: MOVB AL,'\n'
REPNE SCASB
JNE 1b
INC (count)
MOV AX,BX
SUB AX,CX
XCHG SI,DI
STOS
XCHG SI,DI
CMP CX,0
JNE 2b
JMP 1b
9: MOV SP,BP
PUSH linein
PUSH errmess
PUSH _PRINTF
SYS
PUSH _EXIT
PUSH _EXIT
SYS
3: CALL getnum
CMP AX,0
JLE 8f
MOV BX,(curlin)
CMP BX,0
JLE 7f
CMP BX,(count)
JG 7f

!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

786 .
.8 ()
SHL BX,1
MOV AX,linh-2(BX)
MOV CX,linh(BX)
PUSH 0
PUSH 0
PUSH AX
PUSH (fildes)
PUSH _LSEEK
SYS
SUB CX,AX
PUSH CX
PUSH buf
PUSH (fildes)
PUSH _READ
SYS
ADD SP,4
PUSH 1
PUSH _WRITE
SYS
ADD SP,14
JMP 3b
8: PUSH scanerr
PUSH _PRINTF
SYS
ADD SP,4
JMP 3b
7: PUSH 0
PUSH _EXIT
SYS
fillbuf:
PUSH bufsiz
PUSH buf
PUSH (fildes)
PUSH _READ
SYS
ADD SP,8
MOV CX,AX
ADD BX,CX
MOV DI,buf
RET

!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

getnum:
MOV DI,linein
PUSH _GETCHAR
1: SYS
CMPB AL,'\n'
JL 9b
JE 1f
STOSB
JMP 1b
1: MOVB (DI),' '
PUSH curlin
PUSH numfmt
PUSH linein

!
!
!
!
!
!
!
!
!
!
!
!
!

94
95
96
97
98
99
100
101
102
103
104
105
106

787
PUSH _SSCANF
SYS
ADD SP,10
RET
.SECT .DATA
errmess:
.ASCIZ "Open %s failed\n"
numfmt: .ASCIZ "%d"
scanerr:
.ASCIZ "Type a number.\n"
.ALIGN2
.SECT .BSS
linein: .SPACE 80
fildes: .SPACE2
linh: .SPACE 8192
curlin: .SPACE4
buf:
.SPACE bufsiz+2
count: .SPACE2

!
!
!
!

107
108
109
110

!
!
!
!
!
!
!
!
!
!
!
!
!
!

111
112
113
114
115
116
117
118
119
120
121
122
123
124

, , , .
613 , linein.
, ,
. 3845. ,
39,
40. ( 113)
$s _PRINTF.
linein.

1420. open ,
, 9 28. , ,
fildes.
read lseek.
512 , buf. ,
(512 ), ,
( 123). , 21 SI
linh,
. BX
, , , 22
.
fillbuf,
8393. read
, AX.
CX,

788 .

. BX, 91 CX
BX. 92 DI;
,
.
fillbuf 24 ,
- .
25.
. \n AL
26,
REP SCASB .
: CX
.
\n, (
) linh. ,
BX , CX ( 2931 ). 3234 ,
STOS SI, DI,
STOS . 3537
,
CX .

. linh , , 0, linh+ 2 .. n
n
n+ 1.
,
, write.
linh,
n- n .
, 7.
getnum ( 46
).
linein ( 95103 ). SSCANF.
, curlin,
,
numfmt , , linein,
. , SSCANF
curlin. AX. 48;
8.
getnum curlin, BX.

789

( 4953 ).
, , (EXIT).
; BX 2
(SHL). 55
AX. CX
.
lseek;
,
. lseek ,
57 .
.
(32-) , ,
AX ( 58 59 ); 32- . 62
LSEEK, . LSEEK
, DX:AX.
(
65536 , - ), AX; , CX ( 63),
, .
. 6468 ,
1 7072
. ,
, 69, . , 73, ,
3 getnum.

, , Amsterdam Compiler Kit.


www.cs.vu.nl/ack. ,
: (Johan Stevenson),
(Hans Schaminee) (Hans de Vries).
(Ceriel Jacobs), ,
,
, (Elth Ogston),
.
, (Robbert van Renesse)
- (Ian-Mark Wams) PDP-11
Motorola 68000 .
. ,
,
.

790 .


1. AH AL MOV AX,
702?
2. CS 4.
?
3. , 8088.
4. , CS= 40, DS= 8000, IP= 20.
1) ?
2) AX
MOV AX, (2)?
5.

, CALL.
BP , .
; .
, ,
AX.
6. ..1 de hw.
. , de+ hw?
.
7. ,
:
=a+b+2
8. C- :
footbar(x,y);

, .
9. , , , ,
.
+, -, /.


A
ACL, 539
Acorn Computer, 66
ADSL, 153
AGP, 242
AMBA, 611
APIC, 231
Apple, 43
Apple Newton, 67
ARM7, 67
ASCII, 162
ASIC, 616
ASID, 499
ATA, 113
ATAPI, 113
ATmega168, 238
, 418
, 390
, 368
, 439, 442
, 369
, 391
, 396
, 405, 406
AVR, 69
AVX, 363

B
BBC Micro, 66
BGA, 237
BIOS, 112
BlueGene/L, 661
Blu-Ray, 130

BSS, 757
Burroughs-B5000, 40

C
Catamount, 668
CCD, 159
CC-NUMA, 645, 646
CDC 6600, 40, 88, 349
CD-R, 126
CD-ROM, 123
CD-ROM XA, 127
CD-RW, 128
Celeron, 64
CISC, 83
CMYK, 148
COLOSSUS, 35
COMA, 630, 653
Core 2 duo, 63
CoreConnect, 610
Core i7
, 416
, 492
, 360363
, 357, 358
, 386
, 387

8086, 386
COW, 631
CPP, 287, 304
CRC, 253, 615

792

H
DDR, 206
DEC, 38, 81
DIMM, 106
DIP, 183
DLL, 232, 584
DMA, 132
DMI, 231, 243
dpi, 149
DRAM, 205
DSLAM, 155
DSM, 627, 679
DSP, 596
DVD, 129

I
IA-32, 386
IA-64, 459464
IAS, 37
IBM, 38
IBM 360, 41
IBM 701, 38
IBM 704, 38
IBM 709, 29
IBM 801, 82
IBM 1401, 39
IBM 7094, 39, 41
IDE, 112
IFU, 318
IJVM, 270, 284
, 288
, 285
, 271
ILC, 567
ILLIAC, 36
ILLIAC IV, 629
ILLIAC-IV, 91
i-node, 534
Intel, 60
Intel 8255A, 259
Intel-8259A, 225
Intel Pentium, 62
IP, 614
IPC, 522
ISA, 133, 729
ISP, 158, 614
ISR, 452
Itanium 2, 461464

E
ECC, 108
EDO, 206
EDVAC, 36
EEPROM, 70, 207
EIDE, 113
EISA, 134
ENIAC, 36
ENIGMA, 35
EPIC, 462
EPROM, 207
EPT, 502

F
FAT, 536
FIFO, 485
FMS, 29
FORTRAN, 28
FPGA, 45, 208, 616
FPM, 205
FPU, 661
FSM, 320

G
GDT, 492
Google, 671
GridPad, 46
GUI, 44, 522

High Sierra, 125


HTML, 673
HTTP, 614

J
JOHNNIAC, 36

K
Kinect, , 145

793

N
LAN, 612
Latin-1, 164
LBA, 113
LDT, 492
LGA, 183
Linda, 682
, 683
, 683
, 682
, 682
Linux, 520
lpi, 148
LRU, 342, 484
LUT, 208
LV, 287, 304

NaN, 727
NC-NUMA, 645
NID, 154
NORMA, 631
NOW, 631
NTFS, 536
NUMA, 630, 645
Nvidia, 68
NVIDIA Fermi, 620

O
OCP-IP, 611
OGSA, 694
OLED, 141
OLE_LINK, , 478
OLE_LINK, , 614
OLE_LINK, , 173
OLE_LINK,
, 451
OLE_LINK, , 657
OLE_LINK, ,
689
OMAP4430, 234
, 418
, 497
omega, 643
Omnibus, 39
OPC, 304
Opteron, 665
Orca, 684
, 684
, 685
, 684

M
MAL, 295
MAR, 275
MBR, 276, 304
MDR, 275
MESI, 639
MFT, 539
Mic-1, 280
Mic-2, 323
Mic-3, 328
Mic-4, 333
Microsoft, 44
Microsoft Xbox 360, 55
MIMD, 629
MINIX, 520
MIPS, 83, 84
MIR, 281
MISD, 629
MMU, 480
MMX, 63
Motif, 522
Motorola-68000, 82
MPC, 281
MPEG-2, 608
MPI, 676
MPP, 631, 659
MTBF, 668
MULTICS, 491

P
PC, 287, 304
PCI, 134, 240
PCIe, 134
PCI Express, 134, 249, 250
, 251
, 253

794

PCI Express ()
, 251
, 251
, 251
, 254
, 252
, 253
, 253
, 252
PDA, 46
PDP-1, 39
PDP-8, 39
Pentium 4, 227
PGA, 183
PIO, 259
PnP, 247
POSIX, 520
POWER4, 45
PPE, 616
PROM, 207
PSW, 385, 496
pthreads, 543
PVM, 676

SIB, 403, 417


SID, 539
SIMD, 629
SIMD-, 91
SIMM, 106
SISD, 629
SLED, 115
SLR, 161
SMP, 625
SO-DIMM, 106
Sony PlayStation-3, 55
SP, 304
SPARC, 83
SRAM, 205
SSE, 63

T
TAT-12/13, 50
TCP, 614
TFT, 140
TLB, 366, 499
TLB-, 499
TN, 139
TOS, 304
TriMedia, 594
TX-0, 38

R
RAID, 115
RAM, 205
RAS, 667
RAW, 331
Red Storm, 665
RFID, 51, 52
RGB, 141
RISC, 44, 83, 84
ROB, 361
ROM, 206

S
Samsung Galaxy, 56
Samsung Galaxy Tab, 67
Sandy Bridge, 358
SCSI, 114
SDRAM, 206
Seastar, 666
Serial ATA, 113

U
UART, 259
UMA, 630
Unicode, 164
UNIX, 519
Berkeley, 519
System V, 519
, 586
, 542
, 542
, 586
USART, 259
USB, 255
USB 2.0, 258
UTF-8, 166
u-, 88

795

V
VAX, 81, 83
VCI, 611
VLIW, 592
VMCS, 502
VMX, 502
VTOC, 127
v-, 88

W
WAN, 612
WAR, 351
WAW, 351
WEIZAC, 36
Whirlwind, 38
Wiimote, , 144
Win32 API, 525
Win64, 525
Windows, 522
Windows 95, 523
Windows 98, 523
Windows 2000, 523
Windows ME, 523
Windows NT, 523

X
X3T, 667
Xeon, 64
X Windows, 522

Z
Zilog Z8000, 82

, 153
, 532
, 742
, 742
, 508
, 424
, 396, 406
, 408
, 742

()

, 742
, 413
, 407, 741
, 406, 741, 742
, 742
, 410
, 406
, 407
, 741
, 406
, 410
, 477
, 478
, 478
, 275
, 95, 732
, 742
, 494
, 35, 105
, 38, 79
, 430
, 140

, 175
, 175
, 26
, 24, 77, 190, 271
, 689
, 152
, 34

, 645
, 26
, 221
, 133
, 751
, 596
- , 24,
77, 190, 271
, 26, 80
, 105
, 390
, 26
, 88

796


, 153
, 216, 219
, 26, 556, 730, 756
, 757
, 757
, 757
, 730
, 756
, 758
, 730, 756
, 756
, 730, 758

BSS, 757
, 757
, 757
, 730
, 573
, 756
, 730
, 559
, 756
, 492, 573
, 35

, 173
-, 112
, 355
, 734
, 160

, 308, 402
, 96, 381
, 739
, 232
, 55
, 38
, 664
, 670

, 584
, 585

, 586
, 421
, 573
, 94, 710
, 357, 468
, 480
, 99
, 394
, 394
, 751
, 749

, 355
, 318
, 365
, 535
, 333
, 535
, 363
, 361
, 535
, 334
, 644
-, 69
, 152
, 761
, 614
, 38
, 175
, 175

, 366, 499
, 86
, 511
, 361
, 361
,
676
, 276

, 201
, 201
, 205
, 33

797

-
, 428
, 261
, 431
, 431
, 91
, 91
, 226, 453
, 23, 172, 178

, 134, 240

RAW, 331
WAR, 351
WAW, 351
, 141
, 109
, 500
, 21, 676
, 692
, 476
Core i7, 492
OMAP4430, 497
,
664
, 678
,
478
, 253
, 284
, 579
, 578
, 490
, 485
,
599
, 43
, 69
, 710
, 758
, 338
, 157

, 87
, 668

()
, 110
, 581
, 192
, 47
, 757
, 618
, 555
, 86
, 527

, 751
, 751
, 30, 475
, 483
, 30
, 421
, 618
, 555

, 462
, 42

, 105
, 757
, 500
, 659
, 228, 603
, 586
, 539
, 757
, 612
, 492
, 515
, 148

, 44, 522
, 737
, 146

, 751
, 749
, 28

798

, 137
, 681
, 734
, 659
, 730
, 710
- , 739
- , 94
, 566
, 742
, 186
, 180
, 186
, 658

, 539
, 534
, 531, 754
, 758
, 43
, 35
, 152
, 582
, 205

, 235

, 345
, 107
, 121

SSD, 119

, 480
, 784

OLED, 141
TFT, 140
, 138
- , 138
, 139
, 313
, 739
, 734

, 715
, 715

, 108, 127


, 630, 645
, 630
-, 630, 653
, 541

, 214
, 604
, 152
, 152

, 70, 71

, 123
, 110
, 604
, 138

PCI Express, 251


TCP, 614
, 214
, 183

, 689
, 48
, 65
, 708
-, 126

, 410
, 342
, 410
, 639
, 342, 639
, 109
, 351
, 351
, 410
, 342, 637

799

, 639
, 94

, 196
, 196
, 527
, 133, 432

D, 196
SR, 194, 195
, 195, 196
, 658
, 125
, 277
, 725

, 758
, 758
, 758
, 613
, 34

, 108
, 99
, 21, 80, 730
, 21

, 114
, 676
-
, 258
, 258
, 258
, 410
, 380
, 275

, 508
, 508
, 137
, 182
, 747

,
352
, 356
, 555
, 575
, 756
, 555
, 739

, 55, 56
, 539
, 107
, 174
, 173

, 736
, 736
, 505
, 141
, 408
, 742
, 742
, 534
, 735

, 140
, 140
, 182
, 40
, 42

, 155157
, 157
, 285, 287
, 157
, 253, 542
, 253
, 46
, 508
, 532
, 532
, 221
, 40

800

, 43
, 136
, 58
, 631
, 539
, 670
, 43
, 505

, 123
, 125
, 122
, 127
, 228

-, 94
, 98
, 271
, 108
, 162
, 402
, 385
, 101
8/10-, 253
, 164
, 99
, 164
, 732
, 173
, 511
, 659

-, 428
, 79
, 79
, 79
, 420
, 426
, 424
, 184
, 677
, 656
, 657
, 656
, 658
, 656

, 641
, 613
-, 121
, 126
, 127
, 128
, 124
, 123
, 187
, 26, 556

, 582
, 585
, 585
, 574, 756
, 574

, 55, 56
, 46
, 670
, 55
, 46, 47
, 590
, 56
, 44, 83
, 44,
83
, 26
, 26

, 57
, 86
Pentium, 88
, 344
, 328
, 320
, 320
, 320
, 578

-, 132
, 111
, 280
, 231
, 765

801

, 256
, 527
, 532
, 256

, 183
, 682
, 407,
741

-, 104
-, 104
, 656
, 122
, 40
, 546
,
600
, 55
, 659

, 521
, 359
, 637
, 637

, 639
, 639
-, 62, 103, 337
n-, 341
, 337
, 343
-, 340
-, 340
, 342
, 105
, 342
, 339
, 105, 337
, 342

, 34
, 146

, 739
, 113
, 494

, 153
, 152
, 153
, 569

, 182
, 182
, 504

, 338
, 338
, 758
, 612
, 492
, 122

, 108
, 284
, 563
, 562
, 563
, 562
, 30
, 564
, 564
, 761
, 720
, 539, 610
, 613

, 664
, 664

, 421
, 120
, 627
,
627
, 131

802

, 34
, 21
, 34
-, 37, 77
, 20, 729
, 108
, 614
, 599
, 730
, 757
, 758
, 426
, 295
, 161
, 82
, 53, 54
, 334
, 24, 323, 733
, 24
, 182
RFID, 51
, 210
, 761
-, 157
, 49
, 730, 756
, 681
, 41

, 599
, 600
, 599
, 602
-, 127

, 20
, 55

, 761
, 761
, 761
, 632
, 683

ADSL, 154
, 152
, 157
, 153

, 578


, 106

, 106
, 152
, 152
, 152
, 152
, 214
, 174
, 35

, 631
, 627
, 94, 625
, 216
, 184
, 93, 624, 630
, 646
, 625
, 137
, 48, 60
, 142
, 543
, 59

,
676
, 642
, 46, 47
, 182
, 726
, 630,
645
, 406, 741,
742

803

, 406
, 540
, 151
, 727
, 742
, 585
, 121
, 40, 60
, 723
, 380

()
, 406
, 739
, 508
, 205
, 205
, 205
, 29, 475
, 594, 684
, 421
, 422
, 525
, 222
, 491
, 121
, 127
, 710
, 694
-,
258
, 214
, 342, 639
,
410
, 722
, 532
, 542

, 482
, 721
, 721

, 287
, 58
, 522

, 618
, 618
, 147

, 452
, 596
, 342
, 410
, 378
,
97, 739
-, 105
, 555
, 575, 578
, 756
, 476
, 127
, 235

, 91
, 639
, 191
, 630
, 205
, 722
, 96
, 38

, 739

, 251, 613, 656


, 251
, 683
, 253
, 251
, 30
, 94, 193
, 492, 573
, 476
, 205
, 205

804

()
, 206
, 653
, 644
, 206
, 281
-, 207

, 85
, 85
,
676
-, 259

, 564
, 564
, 33
, 140
, 82
, 431
, 756

, 676
, 676
, 676
-, 128
, 641
, 755
, 363
, 451

, 749
, 749
, 320
, 218
, 611
, 109
, 56
,
46
, 82, 206
, 141
, 720
, 57
, 122

, 47
, 354
, 426, 751
, 214
, 356
, 182
, 110
-
, 582
, 490
, 251
, 639
, 658
, 643
, 221
, 604
, 178
, 189
, 252
, 435
, 153
, 188
, 381
, 604
, 685

, 97, 739
, 97
, 222
, 206
-, 123
, 207
, 207
,
207
, 410

-, 521
, 629
, 629
, 512, 542
, 442
, 511
, 108
, 404
, 465

805

, 132, 452
, 352
, 352
, 436
, 308, 402
, 534
, 381
, 214

OLE_LINK, , 259
, 259
, 214
, 25
,
525
, 146
, 146
, 150
, 150
, 149
, 150

RISC, 84
, 104, 483
, 653

, 578
, 576
, 637
, 485
, 343
, 345
, 348
, 20
, 730
, 555
, 756
, 132, 452
, 555
-, 582
, 408
,
45, 616


, 207
, 208
-, 428
, 231

, 25
, 25
, 26
, 512, 542
, 254
-
, 137
, 454
, 511
, 448

, 87
, 658
, 687
, 687
COMA, 654
, 331, 344
, 338

, 477
, 682
, 252, 614
, 614
, 639
, 639
, 614
, 637
, 614
, 213
, 566
, 426, 444

, 541
, 541

SIMD, 91
, 91
, 616

806

()
, 631, 659
,
592
, 76
, 633
, 406
, 132, 431
, 97
, 559, 730, 758
, 532
, 532
, 532
, 464

, 331
, 386
, 24, 384, 732
, 734
, 91
, 284
, 735
, 736
, 77
, 281
, 734

, 275
, 276
, 275
, 734
, 734
, 735
, 385, 736
, 407

, 741
, 574

, 742
, 742
, 406
, 205
8086, 386
, 30
, 381
, 381
, 386
, 137
, 444
, 426
, 659
, 331
, 541

, 483

, 380
, 380

, 604
, 604
, 604
-, 105, 337
,
658
, 34
, 116
, 627, 679

, 694
, 692
, 692

, 692
, 693
, 693
, 693
, 644
, 135
, 216
, 399
, 134

,
408
, 42, 606
, 203

807

, 42
, 142
, 635
, 527
, 532
, 348
, 487, 737
, 749
, 749
, 582
, 672
, 632
, 82
, 108

BSS, 757
, 757
, 757
, 515
, 137
, 57
, 127
, 154
, 616
, 659

, 664
, 644
, 612
, 656
, 612
, 642
, 631
,
643

, 151
, 203
, 276
, 203
, 591
, 730
, 625
, 153
D-, 196

SR-, 195

, 206
, 602
, 676
, 216, 218
- , 259

, 689
, 29
, 222
, 30
, 624
, 625

, 710
, 710
, 710

, 232
, 212
, 30, 475
, 25
, 342, 637
, 139
, 634
, 591
, 637
, 228
, 96, 739
, 99
, 385, 496

, 344

, 491
, 46
, 715
, 546

, 687
, 637
, 521
, 451
, 612

808

, 47

, 515
, 271
, 320

, 633
, 635
, 632
, 634
, 632
, 467
, 356

, 615

, 539
, 506
, 154
, 687
, 566
, 531

, 133
, 531
, 531
, 205

, 348

, 286, 287, 293


, 285
, 410
, 735
, 656
, 35

, 207
, 478
, 527
, 527
, 527
, 478
, 479
, 646

, 639
, 639
, 195
, 632

, 105, 339, 637


, 340
, 149
, 149
, 149
, 149
, 145
, 86
, 150
, 734
, 189
, 188
, 190
, 190
, 40, 59
, 88, 89

, 182
, 184
, 188

, 756
, 567
, 77, 287, 732
, 281
, 349

, 226
, 539

, 492
, 492
, 784
, 175
, 127

809

()
, 536
, 567, 573, 756
, 478, 495
, 192
, 119
, 532
, 136
, 150
, 231

, 739
- , 739
, 739
, 394
, 739
, 393
, 610
, 659
, 140
, 656, 678
, 520

, 579
, 765
, 665
, 135
, 24, 77, 271
, 38
, 174
, 174
, 174
, 174
, 214
, 555
, 21
, 730
, 196
, 174

, 81
, 407
, 736
, 754

()
, 388
, 732, 736
, 735
, 754
, 422

, 255

, 259

-, 258
, 253
, 281
, 691
, 22
, 524

, 25, 377, 729
, 555
, 692
, 253
, 693
, 24, 270, 313
, 24
, 25, 475
, 693
, 254
, 693
, 253
, 252
, 23, 172
, 23, 172
, 242
, 544
, 465

-, 258

, 231
, 203
, 637

-, 24, 77
-, 131
, 94

810

()
, 154
, 159
, 112
, 201

, 214
, 214

, 152
, 503
, 756
, 540
, 756

FAT, 536
NT, 536
, 564
, 66
, 252
, 478

, 160
, 140
, 532

, 742
, 748
, 748
, 385, 736
, 629
-, 110
-, 207
, 37
-
, 37, 77
, 564

, 490
, 485
, 45
, 426

, 256
, 50
, 444, 456
, 573
, 50
, 46

, 141
, 148
, 586
, 739
, 555

, 734
, 734
, 38, 76
, 58

--,
271
, 78
, 216
, 49
,
253, 615
, 110
, 153
, 159, 161
, 23, 172
, 210
, 38

, 263
, 152
, 152

, 149
, 149

, 708
, 726

811

, 723
, 714
, 393
, 331

, 38
, 114

, 179
. , 36
, 720
- , 138

, 207
, 138
, 448
, 174
, 43
, 49

, 682
,
710
, 758
, 39, 76, 133, 212
AGP, 242
PCI, 240
, 245
, 244
USB, 255
, 216, 219, 220
, 216
, 611
, 213
, 610
, 611
, 216, 218
, 212
, 215
, 153

, 623
, 623
, 497

, 585
, 606

, 556, 729, 756


, 555
, 26
, 555
, 555
, 20, 729
, 555
, 95

. , .


6-

.
.
.
.
.
.

, 192102, -, . (. ), . 3, , . 7.
005-93, 2; 95 3005 .
25.02.13. 70100/16. . . . 69,660. 2500.

????????????????

?
!
?
?
? ,

?
!


!

www.piter.com/ePartners

www.piter.com,
,

( www.piter.com)
!
.
10% ,
, - c
. ,
, 5%
.
, , 500 ,
. Web.Money.
:
http://www.piter.com/book.phtml?978538800282
http://www.piter.com/book.phtml?978538800282&refer=0000
, 0000


WWW.PITER.COM


:
: www.piter.com
: postbook@piter.com
: (812) 7037374
: 197198, , / 127,
ICQ: 413763617

:

.
.
,
.
. : . Web-money USD
E-Gold, MoneyMail, INOCard, RBK Money (RuPay), USD Bets, Mobile Wallet
.
, ,
.
.
.
e-mail.

:
, , , , , e1mail;
, , , , , ,
, ;
, , .