VXL Hoang Xuan Dau

  • View
    681

  • Download
    0

Embed Size (px)

Transcript

HC VIN CNG NGH BU CHNH VIN THNG ----------------------------------HONG XUN DU

BI GING

KIN TRC MY TNH

H NI 2010

LI NI U

Kin trc my tnh l mt trong cc lnh vc khoa hc c s ca ngnh Khoa hc my tnh ni ring v Cng ngh thng tin ni chung. Kin trc my tnh l khoa hc v la chn v ghp ni cc thnh phn phn cng ca my tnh nhm t c cc mc tiu v hiu nng cao, tnh nng a dng v gi thnh thp. Mn hc Kin trc my tnh l mn hc c s chuyn ngnh trong chng trnh o to cng ngh thng tin h i hc v cao ng. Mc tiu ca mn hc l cung cp cho sinh vin cc kin thc c s ca kin trc my tnh, bao gm bao gm kin trc my tnh tng qut, kin trc b x l trung tm v cc thnh phn ca b x l trung tm, kin trc tp lnh my tnh, c ch ng lnh; h thng phn cp ca b nh, b nh trong, b nh cache v cc loi b nh ngoi; h thng bus v cc thit b vo ra. Kin trc my tnh l mt lnh vc c pht trin trong mt thi gian tng i di vi lng kin thc s, nhng do khun kh ca ti liu c tnh cht l bi ging mn hc, tc gi c gng trnh by nhng vn c s nht phc v mc tiu mn hc. Ni dung ca ti liu c bin son thnh su chng: Chng 1 l phn gii thiu cc khi nim c s ca kin trc my tnh, nh khi kim kin trc v t chc my tnh; cu trc v chc nng cc thnh phn ca my tnh; cc kin trc my tnh von-Neumann v kin trc Harvard. Khi nim v cc h m v cch t chc d liu trn my tnh cng c trnh by trong chng ny. Chng 2 gii thiu v khi x l trung tm, nguyn tc hot ng v cc thnh phn ca n. Khi x l trung tm l thnh phn quan trng v phc tp nht trong my tnh, ng vai tr l b no ca my tnh. Thng qua vic thc hin cc lnh ca chng trnh bi khi x l trung tm, my tnh c th thc thi cc yu cu ca ngi s dng. Chng 3 gii thiu v tp lnh ca my tnh, bao gm cc khi nim v lnh, dng lnh, cc thnh phn ca lnh; cc dng a ch v cc ch a ch. Chng cng gii thiu mt s dng lnh thng dng km v d minh ho. Ngoi ra, c ch ng lnh x l xen k cc lnh cng c cp. Chng 4 trnh by v b nh trong: khi qut v h thng b nh v cu trc phn cp ca h thng nh; gii thiu cc loi b nh ROM v RAM. Mt phn rt quan trng ca chng l phn gii thiu v b nh cache - mt b nh c bit c kh nng gip tng tc h thng nh ni ring v c h thng my tnh ni chung. Chng 5 gii thiu v b nh ngoi, bao gm cc loi a t, a quang, cc h thng RAID, NAS v SAN. B nh ngoi l dng b nh thng c dung lng ln v dng lu tr thng tin n nh, khng ph thuc ngun in nui.

1

Chng 6 trnh by v h thng bus v cc thit b ngoi vi. Phn trnh by v h thng bus cp n cc loi bus nh ISA, EISA, PCI, AGP v PCI-Express. Phn gii thiu cc thit b vo ra cp n nguyn l hot ng ca mt s thit b vo ra thng dng, nh bn phm, chut, mn hnh v my in. Ti liu c bin son da trn kinh nghim ging dy mn hc Kin trc my tnh trong nhiu nm ca tc gi ti Hc vin Cng ngh Bu chnh Vin thng, kt hp tip thu cc ng gp ca ng nghip v phn hi t sinh vin. Ti liu c th c s dng lm ti liu hc tp cho sinh vin h i hc v cao ng cc ngnh cng ngh thng tin v in t vin thng. Trong qu trnh bin son, mc d tc gi rt c gng song khng th trnh khi c nhng thiu st. Tc gi rt mong mun nhn c kin phn hi v cc gp cho cc thiu st, cng nh kin v vic cp nht, hon thin ni dung ca ti liu. H ni, thng 8 nm 2010 Tc gi

TS. Hong Xun Du Email: dauhx@ptit.edu.vn

2

MC LCCHNG 1 GII THIU CHUNG .......................................................................................... 5 1.1 KHI NIM V KIN TRC V T CHC MY TNH .......................................... 5 1.2 CU TRC V CHC NNG cc thnh phN CA MY TNH ............................. 5 1.2.1 S khi chc nng ................................................................................................ 5 1.2.2 Cc thnh phn ca my tnh ..................................................................................... 6 1.3 LCH S PHT TRIN MY TNH ............................................................................. 8 1.3.1 Th h 1 (1944-1959) ................................................................................................ 8 1.3.2 Th h 2 (1960-1964) ................................................................................................ 8 1.3.3 Th h 3 (1964-1975) ................................................................................................ 8 1.3.4 Th h 4 (1975-1989) ................................................................................................ 8 1.3.5 Th h 5 (1990 - nay) ................................................................................................ 8 1.4 KIN TRC MY TNH VON-NEUMANN................................................................. 9 1.4.1 S kin trc my tnh von-Neumann .................................................................... 9 1.4.2 Cc c im ca kin trc von-Neumann ................................................................ 9 1.5 KIN TRC MY TNH HARVARD ......................................................................... 10 1.6 CC H S M V T CHC D LIU TRN MY TNH ............................... 10 1.6.1 Cc h s m .......................................................................................................... 10 1.6.2 T chc d liu trn my tnh ................................................................................. 11 1.6.3 S c du v s khng du ...................................................................................... 12 1.6.4 Bng m ASCII ....................................................................................................... 13 1.7 CU HI N TP ........................................................................................................ 14 CHNG 2 KHI X L TRUNG TM ............................................................................. 15 2.1 S KHI TNG QUT V chu trnh x L LNH ........................................... 15 2.1.1 S khi tng qut ca CPU ................................................................................ 15 2.1.2 Chu trnh x l lnh ................................................................................................. 16 2.2 CC THANH GHI ......................................................................................................... 16 2.2.1 Gii thiu v thanh ghi ............................................................................................ 16 2.3 KHI IU KHIN ...................................................................................................... 18 2.4 KHI S HC V LOGIC ........................................................................................... 19 2.5 BUS TRONG CPU ......................................................................................................... 20 2.6 CU HI N TP ........................................................................................................ 20 CHNG 3 TP LNH MY TNH ..................................................................................... 21 3.1 GII THIU V TP LNH MY TNH ................................................................... 21 3.1.1 Lnh my tnh l g? ................................................................................................ 21 3.1.2 Chu k thc hin lnh .............................................................................................. 21 3.2 DNG V CC THNH PHN CA LNH............................................................. 21 3.3 CC DNG A CH / TON HNG ......................................................................... 22 3.3.1 Ton hng dng 3 a ch ......................................................................................... 22 3.3.2 Ton hng dng 2 a ch ......................................................................................... 22 3.3.3 Ton hng dng 1 a ch ......................................................................................... 22 3.3.4 Ton hng dng 1,5 a ch ...................................................................................... 23 3.3.5 Ton hng dng 0 a ch ......................................................................................... 23 3.4 CC CH A CH ................................................................................................ 23 3.4.1 Gii thiu v ch a ch ..................................................................................... 23 3.4.2 Cc ch a ch .................................................................................................... 24 3.5 MT S DNG LNH THNG DNG ..................................................................... 27 3.5.1 Cc lnh vn chuyn d liu.................................................................................... 27 3.5.2 Cc lnh ton hc v logic ....................................................................................... 271

3.5.3 Cc lnh iu khin chng trnh ............................................................................ 28 3.5.4 Cc lnh vo ra ........................................................................................................ 29 3.6 GII THIU C CH NG LNH (PIPELINE) ......................................................... 30 3.6.1 Gii thiu c ch ng lnh ....................................................................................... 30 3.6.2 Cc vn ca c ch ng lnh v hng gii quyt .............................................. 31 3.7 CU HI N TP ........................................................................................................ 35 CHNG 4 B NH TRONG ............................................................................................... 36 4.1 PHN LOI B NH MY TNH .............................................................................. 36 4.1.1 Phn loi b nh ...................................................................................................... 36 4.1.2 T chc mch nh ................................................................................................... 36 4.2 CU TRC PHN CP B NH MY TNH .......................................................... 37 4.2.1 Gii thiu cu trc phn cp h thng nh .............................................................. 37 4.2.2 Vai tr ca cu trc phn cp h thng nh ............................................................ 38 4.3 B NH rom V ram ............................................................