Giao trinh mang may tinh (Toan tap)

  • Published on
    10-Nov-2014

  • View
    542

  • Download
    6

Embed Size (px)

DESCRIPTION

Tm hiu mng my tnh l ti dnah2 cho nhng ai yu thch v ang mun tm ti hc v Mng. (su tm)

Transcript

<ul><li> 1. wWw.VietLion.Com GGIIOO TTRRNNHH MMNNGG MMYY TTNNHH H ni 11-2000 </li> <li> 2. wWw.VietLion.Com Chng 1 S lc lch s pht trin ca mng my tnh Vo gia nhng nm 50 khi nhng th h my tnh u tin c a vo hot ng thc t vi nhng bng n in t th chng c kch thc rt cng knh v tn nhiu nng lng. Hi vic nhp d liu vo cc my tnh c thng qua cc tm ba m ngi vit chng trnh c l sn. Mi tm ba tng ng vi mt dng lnh m mi mt ct ca n c cha tt c cc k t cn thit m ngi vit chng trnh phi c l vo k t mnh la chn. Cc tm ba c a vo mt "thit b" gi l thit b c ba m qua cc thng tin c a vo my tnh (hay cn gi l trung tm x l) v sau khi tnh ton kt qu s c a ra my in. Nh vy cc thit b c ba v my in c th hin nh cc thit b vo ra (I/O) i vi my tnh. Sau mt thi gian cc th h my mi c a vo hot ng trong mt my tnh trung tm c th c ni vi nhiu thit b vo ra (I/O) m qua n c th thc hin lin tc ht chng trnh ny n chng trnh khc. Cng vi s pht trin ca nhng ng dng trn my tnh cc phng php nng cao kh nng giao tip vi my tnh trung tm cng c u t nghin cu rt nhiu. Vo gia nhng nm 60 mt s nh ch to my tnh nghin cu thnh cng nhng thit b truy cp t xa ti my tnh ca h. Mt trong nhng phng php thm nhp t xa c thc hin bng vic ci t mt thit b u cui mt v tr cch xa trung tm tnh ton, thit b u cui ny c lin kt vi trung tm bng vic s dng ng dy in thoi v vi hai thit b x l tn hiu (thng gi l Modem) gn hai u v tn hiu c truyn thay v trc tip th thng qua dy in thoi. Hnh 1.1. M hnh truyn d liu t xa u tin Nhng dng u tin ca thit b u cui bao gm my c ba, my in, thit b x l tn hiu, cc thit b cm nhn. Vic lin kt t xa c th thc hin thng qua nhng vng khc nhau v l nhng dng u tin ca h thng mng. Trong lc a ra gii thiu nhng thit b u cui t xa, cc nh khoa hc trin khai mt lot nhng thit b iu khin, nhng thit b u cui c bit cho php ngi s dng nng cao c kh nng tng tc vi my tnh. Mt trong nhng sn phm quan trng l h thng thit b u cui 3270 ca IBM. H thng bao gm cc mn hnh, cc h thng iu khin, cc thit b truyn thng c lin kt vi cc trung tm tnh ton. H thng 3270 c gii thiu vo nm 1971 v c s dng dng m rng kh nng tnh ton ca trung tm my tnh ti cc vng xa. lm gim nhim v truyn thng ca my tnh trung tm v s lng cc lin kt gia my tnh trung tm vi cc thit b u cui, IBM v cc cng ty my tnh khc sn xut mt s cc thit b sau: Thit b kim sot truyn thng: c nhim v nhn cc bit tn hiu t cc knh truyn thng, gom chng li thnh cc byte d liu v chuyn nhm cc byte ti my tnh trung tm x l, thit b ny cng thc hin cng vic ngc li chuyn tn hiu tr li ca my tnh trung tm ti cc trm xa. Thit b trn cho php gim bt c thi gian x l trn my tnh trung tm v xy dng cc thit b logic c trng. Thit b kim sot nhiu u cui: cho php cng mt lc kim sot nhiu thit b u cui. My tnh trung tm ch cn lin kt vi mt thit b nh vy l c th phc v cho tt c cc thit b u cui </li> <li> 3. wWw.VietLion.Com ang c gn vi thit b kim sot trn. iu ny c bit c ngha khi thit b kim sot nm cch xa my tnh v ch cn s dng mt ng in thoi l c th phc v cho nhiu thit b u cui. Hnh 1.2: M hnh trao i mng ca h thng 3270 Vo gia nhng nm 1970, cc thit b u cui s dng nhng phng php lin kt qua ng cp nm trong mt khu vc c ra i. Vi nhng u im t nng cao tc truyn d liu v qua kt hp c kh nng tnh ton ca cc my tnh li vi nhau. thc hin vic nng cao kh nng tnh ton vi nhiu my tnh cc nh sn xut bt u xy dng cc mng phc tp. Vo nhng nm 1980 cc h thng ng truyn tc cao c thit lp Bc M v Chu u v t cng xut hin cc nh cung cp cc dnh v truyn thng vi nhng ng truyn c tc cao hn nhiu ln so vi ng dy in thoi. Vi nhng chi ph thu bao chp nhn c, ngi ta c th s dng c cc ng truyn ny lin kt my tnh li vi nhau v bt u hnh thnh cc mng mt cch rng khp. y cc nh cung cp dch v xy dng nhng ng truyn d liu lin kt gia cc thnh ph v khu vc vi nhau v sau cung cp cc dch v truyn d liu cho nhng ngi xy dng mng. Ngi xy dng mng lc ny s khng cn xy dng li ng truyn ca mnh m ch cn s dng mt phn cc nng lc truyn thng ca cc nh cung cp. Vo nm 1974 cng ty IBM gii thiu mt lot cc thit b u cui c ch to cho lnh vc ngn hng v thng mi, thng qua cc dy cp mng cc thit b u cui c th truy cp cng mt lc vo mt my tnh dng chung. Vi vic lin kt cc my tnh nm trong mt khu vc nh nh mt ta nh hay l mt khu nh th tin chi ph cho cc thit b v phn mm l thp. T vic nghin cu kh nng s dng chung mi trng truyn thng v cc ti nguyn ca cc my tnh nhanh chng c u t. Vo nm 1977, cng ty Datapoint Corporation bt u bn h iu hnh mng ca mnh l "Attached Resource Computer Network" (hay gi tt l Arcnet) ra th trng. Mng Arcnet cho php lin kt cc my tnh v cc trm u cui li bng dy cp mng, qua tr thnh l h iu hnh mng cc b u tin. T n nay c rt nhiu cng ty a ra cc sn phm ca mnh, c bit khi cc my tnh c nhn c s dng mt cnh rng ri. Khi s lng my vi tnh trong mt vn phng hay c quan c tng ln nhanh chng th vic kt ni chng tr nn v cng cn thit v s mang li nhiu hiu qu cho ngi s dng. Ngy nay vi mt lng ln v thng tin, nhu cu x l thng tin ngy cng cao. Mng my tnh hin nay tr nn qu quen thuc i vi chng ta, trong mi lnh vc nh khoa hc, qun s, quc phng, thng mi, dch v, gio dc... Hin nay nhiu ni mng tr thnh mt nhu cu khng th thiu c. Ngi ta thy c vic kt ni cc my tnh thnh mng cho chng ta nhng kh nng mi to ln nh: S dng chung ti nguyn: Nhng ti nguyn ca mng (nh thit b, chng trnh, d liu) khi c tr thnh cc ti nguyn chung th mi thnh vin ca mng u c th tip cn c m khng quan tm ti nhng ti nguyn u. </li> <li> 4. wWw.VietLion.Com Tng tin cy ca h thng: Ngi ta c th d dng bo tr my mc v lu tr (backup) cc d liu chung v khi c trc trc trong h thng th chng c th c khi phc nhanh chng. Trong trng hp c trc trc trn mt trm lm vic th ngi ta cng c th s dng nhng trm khc thay th. Nng cao cht lng v hiu qu khai thc thng tin: Khi thng tin c th c s dng chung th n mang li cho ngi s dng kh nng t chc li cc cng vic vi nhng thay i v cht nh: p ng nhng nhu cu ca h thng ng dng kinh doanh hin i. Cung cp s thng nht gia cc d liu. Tng cng nng lc x l nh kt hp cc b phn phn tn. Tng cng truy nhp ti cc dch v mng khc nhau ang c cung cp trn th gii. Vi nhu cu i hi ngy cng cao ca x hi nn vn k thut trong mng l mi quan tm hng u ca cc nh tin hc. V d nh lm th no truy xut thng tin mt cch nhanh chng v ti u nht, trong khi vic x l thng tin trn mng qu nhiu i khi c th lm tc nghn trn mng v gy ra mt thng tin mt cch ng tic. Hin nay vic lm sao c c mt h thng mng chy tht tt, tht an ton vi li ch kinh t cao ang rt c quan tm. Mt vn t ra c rt nhiu gii php v cng ngh, mt gii php c rt nhiu yu t cu thnh, trong mi yu t c nhiu cch la chn. Nh vy a ra mt gii php hon chnh, ph hp th phi tri qua mt qu trnh chn lc da trn nhng u im ca tng yu t, tng chi tit rt nh. gii quyt mt vn phi da trn nhng yu cu t ra v da trn cng ngh gii quyt. Nhng cng ngh cao nht cha chc l cng ngh tt nht, m cng ngh tt nht l cng ngh ph hp nht. </li> <li> 5. wWw.VietLion.Com Chng 2 Nhng khi nim c bn ca mng my tnh Vi s pht trin ca khoa hc v k thut, hin nay cc mng my tnh pht trin mt cch nhanh chng v a dng c v quy m, h iu hnh v ng dng. Do vy vic nghin cu chng ngy cng tr nn phc tp. Tuy nhin cc mng my tnh cng c cng cc im chung thng qua chng ta c th nh gi v phn loi chng. I. nh ngha mng my tnh Mng my tnh l mt tp hp cc my tnh c ni vi nhau bi ng truyn theo mt cu trc no v thng qua cc my tnh trao i thng tin qua li cho nhau. ng truyn l h thng cc thit b truyn dn c dy hay khng dy dng chuyn cc tn hiu in t t my tnh ny n my tnh khc. Cc tn hiu in t biu th cc gi tr d liu di dng cc xung nh phn (on - off). Tt c cc tn hiu c truyn gia cc my tnh u thuc mt dng sng in t. Ty theo tn s ca sng in t c th dng cc ng truyn vt l khc nhau truyn cc tn hiu. y ng truyn c kt ni c th l dy cp ng trc, cp xon, cp quang, dy in thoi, sng v tuyn ... Cc ng truyn d liu to nn cu trc ca mng. Hai khi nim ng truyn v cu trc l nhng c trng c bn ca mng my tnh. Hnh 2.1: Mt m hnh lin kt cc my tnh trong mng Vi s trao i qua li gia my tnh ny vi my tnh khc phn bit mng my tnh vi cc h thng thu pht mt chiu nh truyn hnh, pht thng tin t v tinh xung cc trm thu th ng... v ti y ch c thng tin mt chiu t ni pht n ni thu m khng quan tm n c bao nhiu ni thu, c thu tt hay khng. c trng c bn ca ng truyn vt l l gii thng. Gii thng ca mt ng chuyn chnh l o phm vi tn s m n c th p ng c. Tc truyn d liu trn ng truyn cn c gi l thng </li> <li> 6. wWw.VietLion.Com lng ca ng truyn - thng c tnh bng s lng bit c truyn i trong mt giy (Bps). Thng lng cn c o bng n v khc l Baud (ly t tn nh bc hc - Emile Baudot). Baud biu th s lng thay i tn hiu trong mt giy. y Baud v Bps khng phi bao gi cng ng nht. V d: nu trn ng dy c 8 mc tn hiu khc nhau th mi mc tn hiu tng ng vi 3 bit hay l 1 Baud tng ng vi 3 bit. Ch khi c 2 mc tn hiu trong mi mc tn hiu tng ng vi 1 bit th 1 Baud mi tng ng vi 1 bit. II. Phn loi mng my tnh Do hin nay mng my tnh c pht trin khp ni vi nhng ng dng ngy cng a dng cho nn vic phn loi mng my tnh l mt vic rt phc tp. Ngi ta c th chia cc mng my tnh theo khong cch a l ra lm hai loi: Mng din rng v Mng cc b. Mng cc b (Local Area Networks - LAN) l mng c thit lp lin kt cc my tnh trong mt khu vc nh trong mt to nh, mt khu nh. Mng din rng (Wide Area Networks - WAN) l mng c thit lp lin kt cc my tnh ca hai hay nhiu khu vc khc nhau nh gia cc thnh ph hay cc tnh. S phn bit trn ch c tnh cht c l, cc phn bit trn cng tr nn kh xc nh vi vic pht trin ca khoa hc v k thut cng nh cc phng tin truyn dn. Tuy nhin vi s phn bit trn phng din a l a ti vic phn bit trong nhiu c tnh khc nhau ca hai loi mng trn, vic nghin cu cc phn bit cho ta hiu r hn v cc loi mng. III. S phn bit gia mng cc b v mng din rng Mng cc b v mng din rng c th c phn bit bi: a phng hot ng, tc ng truyn v t l li trn ng truyn, ch qun ca mng, ng i ca thng tin trn mng, dng chuyn giao thng tin. a phng hot ng: Lin quan n khu vc a l th mng cc b s l mng lin kt cc my tnh nm trong mt khu vc nh. Khu vc c th bao gm mt ta nh hay l mt khu nh... iu hn ch bi khong cch ng dy cp c dng lin kt cc my tnh ca mng cc b (Hn ch cn l hn ch ca kh nng k thut ca ng truyn d liu). Ngc li mng din rng l mng c kh nng lin kt cc my tnh trong mt vng rng ln nh l mt thnh ph, mt min, mt t nc, mng din rng c xy dng ni hai hoc nhiu khu vc a l ring bit. Tc ng truyn v t l li trn ng truyn: Do cc ng cp ca mng cc b c xy dng trong mt khu vc nh cho nn n t b nh hng bi tc ng ca thin nhin (nh l sm chp, nh sng...). iu cho php mng cc b c th truyn d liu vi tc cao m ch chu mt t l li nh. Ngc li vi mng din rng do phi truyn nhng khong cch kh xa vi nhng ng truyn dn di c khi ln ti hng ngn km. Do vy mng din rng khng th truyn vi tc qu cao v khi t l li s tr nn kh chp nhn c. Mng cc b thng c tc truyn d liu t 4 n 16 Mbps v t ti 100 Mbps nu dng cp quang. Cn phn ln cc mng din rng cung cp ng truyn c tc thp hn nhiu nh T1 vi 1.544 Mbps hay E1 vi 2.048 Mbps. </li> <li> 7. wWw.VietLion.Com ( y bps (Bit Per Second) l mt n v trong truyn thng tng ng vi 1 bit c truyn trong mt giy, v d nh tc ng truyn l 1 Mbps tc l c th truyn ti a 1 Megabit trong 1 giy trn ng truyn ). Thng thng trong mng cc b t l li trong truyn d liu vo khong 1/107 -108 cn trong mng din rng th t l vo khong 1/106 - 107 Ch qun v iu hnh ca mng: Do s phc tp trong vic xy dng, qun l, duy tr cc ng truyn dn nn khi xy dng mng din rng ngi ta thng s dng cc ng truyn c thu t cc cng ty vin thng hay cc nh cung cp dch v truyn s liu. Ty theo cu trc ca mng nhng ng truyn thuc c quan qun l khc nhau nh cc nh cung cp ng truyn ni ht, lin tnh, lin quc gia. Cc ng truyn phi tun th cc quy nh ca chnh ph cc khu vc c ng dy i qua nh: tc , vic m ha. Cn i vi mng cc b th cng vic n gin hn nhiu, khi mt c quan ci t mng cc b th ton b mng s thuc quyn qun l ca c quan . ng i ca thng tin trn mng: Trong mng cc b thng tin c i theo con ng xc nh bi cu trc ca mng. Khi ngi ta xc nh cu trc ca mng th thng tin s lun lun i theo cu trc xc nh . Cn vi mng din rng d liu cu trc c th phc tp hn nhiu do vic s dng cc dch v truyn d liu. Trong qu trnh hot ng cc im nt c th thay i ng i ca cc thng tin khi pht hin ra c trc trc trn ng truyn hay khi pht hin c qu nhiu thng tin cn truyn gia hai im nt no . Trn mng din rng thng tin c th c cc con ng i khc nhau, iu cho php c th s dng ti a cc nng lc ca ng truyn hay nng cao iu kin an ton trong truyn d liu. Dng chuyn giao thng tin: Phn ln cc mng din rng hin nay c pht trin cho vic truyn ng thi trn ng truyn nhiu dng thng tin khc nhau nh: video, ting ni, d liu... Trong khi cc mng cc b ch yu pht trin trong vic truyn d liu thng thng. iu ny c th gii thch do vic truyn cc dng thng tin nh video, ting ni trong mt khu vc nh t c quan tm hn nh khi truyn qua nhng khong cch ln. Cc h thng mng hin nay ngy cng phc tp v cht lng, a dng v chng loi v pht trin rt nhanh v cht. Trong s pht trin s lng nhng nh sn xut t phn mm, phn cng my tnh, cc sn phm vin thng cng tng nhanh vi nhiu sn phm a dng. Chnh v vy vai tr chun ha cng mang nhng ngha quan trng. Ti cc nc cc c quan chun quc gia a ra cc nhng chun v phn cng v cc quy nh v giao tip nhm gip cho cc nh sn xut c th lm ra cc sn phm c th kt ni vi cc sn phm do hng khc sn xut. </li> <li> 8. wWw.VietLion.Com Chng 3 M hnh truyn thng I. S cn thit phi c m hnh truyn thng mt mng my tnh tr mt mi trng truyn d liu th n cn phi c nhng yu t sau: Mi my tnh cn phi c mt a ch phn bit trn mng. Vic chuyn d liu t my tnh ny n my tnh khc do mng thc hin thng qua nhng quy nh thng nht gi l giao thc ca mng. Khi cc my tnh trao i d liu vi nhau th mt qu trnh truyn giao d liu c thc hin hon chnh. V d nh thc hin vic truyn mt file gia mt my tnh vi mt my tnh khc cng c gn trn mt mng cc cng vic sau y phi c thc hin: My tnh cn truyn cn bit a ch ca my nhn. My tnh cn truyn phi xc nh c my tnh nhn san sng nhn thng tin Chng trnh gi file trn my truyn cn xc nh c rng chng trnh nhn file trn my nhn san sng tip nhn file. Nu cu trc file trn hai my khng ging nhau th mt my phi lm nhim v chuyn i file t dng ny sang dng kia. Khi truyn file my tnh truyn cn thng bo cho mng bit a ch ca my nhn cc thng tin c mng a ti ch. iu trn cho thy gia hai my tnh c mt s phi hp hot ng mc cao. By gi thay v chng ta xt c qu trnh trn nh l mt qu trnh chung th chng ta s chia qu trnh trn ra thnh mt s cng on v mi cng on con hot ng mt cch c lp vi nhau. y chng trnh truyn nhn file ca mi my tnh c chia thnh ba module l: Module truyn v nhn File, Module truyn thng v Module tip cn mng. Hai module tng ng s thc hin vic trao i vi nhau trong : Module truyn v nhn file cn c thc hin tt c cc nhim v trong cc ng dng truyn nhn file. V d: truyn nhn thng s v file, truyn nhn cc mu tin ca file, thc hin chuyn i file sang cc dng khc nhau nu cn. Module truyn v nhn file khng cn thit phi trc tip quan tm ti vic truyn d liu trn mng nh th no m nhim v c giao cho Module truyn thng. Module truyn thng quan tm ti vic cc my tnh ang hot ng v san sng trao i thng tin vi nhau. N cn kim sot cc d liu sao cho nhng d liu ny c th trao i...</li></ul>