Bai Tap Chuong May Tinh Va Mang (1)

  • Published on
    08-Jul-2015

  • View
    214

  • Download
    0

Transcript

BI TP CHNGMn: My tnh v mng Lp: -TK7 --------------------------------------------------------------------------------------------------------Phn 1: My tnh Chng 1: Tng quan h thng my tnh Bi 1.1: S nh phn 8 bit (11001100)2, s ny tng ng vi s nguyn thp phn c du l bao nhiu nu s ang c biu din trong cch biu din: a. Du v tr tuyt i. b. S b 1. c. S b 2 Bi 1.2: i cc s sau y: a. (011011)2 ra s thp phn. b. (-2005)10 ra s nh phn 16 bits. c. (55.875)10 ra s nh phn. Bi 1.3: Biu din s thc sau (31.75)10 di dng s c du chm ng chnh xc n 32 bit. a. (31.75)10 b. (+23,5)10. c. (-156,25)10. Bi 1.4: Trnh by lch s hnh thnh h thng my tnh. Bi 1.5: a. 2 bin 16 bit P,Q: P=1000 0011 0000 1101 ; Q=0001 0001 1111 1110. Tnh gi tr P,Q h 10 trong 2 trng hp: s nguyn c du v khng du. b. Bin P ct bt u t byte nh c a ch 5008(16); Q 500A(16). Hy cho bit ni dung ca cc byte nh lu tr theo kiu u nh(little-endian) Bi 1.6: Cho hai t nh 32 bit sau y

1100 0001 1000 0100 1010 1011 0000 0000 0100 0011 0011 1111 1000 0010 0000 0000Tng ca hai t ny s l chui bit nh th no nu s dng kiu biu din l: a. Hai s nguyn b 2 b. Hai s nguyn theo m nh phn t nhin c. hai s thc theo chun IEEE 754?

1

Chng 2: Kin trc b vi x l Bi 2.1: Trnh by cu trc ca b vi x l 8086 Bi 2.2: S khc bit gia CPU RISC v CPU CISC? Bi 2.3: Gii thch cc lnh sau v hy ch ra trng thi ca cc c trong thanh ghi c sau khi thc hin cc lnh a. MOV AL,5Bh MOV BL,0ADh ADD AL,BL b. MOV AX,170Fh MOV BX,80EBh ADD AX,BX c. MOV AL,41h MOV BL,50h CMP AL,BL

d.

MOV AX,3D85h MOV BX,2CFEh CMP AX,BX Bi 2.4: Gii thch cch xc nh a ch vt l ca mt nh trong b nh. Gi s a ch mt nh c xc nh qua thanh ghi on DS v thanh ghi lch BX vi DS=0F35h, BX=150Dh. Hy xc nh a ch vt l v a ch logic ca nh trn. nh trn thuc on no trong b nh. Gi s a ch mt nh c xc nh qua thanh ghi on CS v thanh ghi lch IP vi CS=4530h, IP=49A6h. Hy xc nh a ch vt l v a ch logic ca nh trn. nh trn thuc on no trong b nh. Gi s a ch mt nh c xc nh qua thanh ghi on ES v thanh ghi lch DI vi ES=1793h, DI=2004h. Hy xc nh a ch vt l v a ch logic ca nh trn. nh trn thuc on no trong b nh. Bi 2.5: Gi s c mt ngn xp c a ch y l FFFEh. - Hy gii thch v xc nh a ch nh ca ngn xp sau khi thc hin y vo cc gi tr sau: 05F3h, 4D3Ch,796Ah,418Bh - Gii thch v xc nh a ch nh ca ngn xp v gi tr ca cc thanh ghi AX, BX, CX, DX sau khi thc hin cc lnh: POP DX POP AX POP BX POP CX2

Bi 2.6: Hy gii thch v ch ra ch a ch ca cc lnh sau: a/ MOV AX,058Dh f/ ADD DX,53h[BX][SI] b/ MOV AL,[BX] g/ ADD AL,3Bh[SI] c/ MOV AX,[BP]+[SI]+0100h h/ MOV BX,7Ch[BP] d/ MOV BL,[0653h] i/ SUB AL,BL e/ MOV AX,[SI]+50 j/ AND AX,[BX+10] k/ OR CX,[DI+30h] Bi 2.7 Cho on chng trnh sau: MOV AL,41H MOV AH,2 L1: MOV DL,AL INT 21H INC AL CMP AL,5AH JNG L1 a. Gii thch ngha cc lnh trong on chng trnh trn. b. V lu thut ton ca chng trnh. c. on chng trnh trn thc hin nhim v g? Bi 2.8: M ha cc lnh sau: a. MOV AX,BX b. MOV CX,1000 c. MOV AX,CS d. MOV BX,[BX+SI+1] e. MOV [SI+1234],BL Bi 2.9: Gii m cc lnh sau: a. 8CD8 b. A33412 c. B44C d. 8B4113 Bi 2.10 Lp trinh Assembly: c t bn phm mt s h hai, kt qu lu trong thanh ghi BX. Hin th thanh ghi DX

3

Chng 3: B nh v cc thit b ngoi vi Bi 3.1 a. Nu nguyn tc hot ng ca b nh cache. b. Trnh by cc nguyn nhn chnh gy tht bi cache? c. S khc bit gia cache v b nh o? Bi 3.2 a. M t vn hnh ca a cng. Cch lu tr thng tin trong a cng. b. Nguyn tc vn hnh ca a quang. u khuyt im ca cc loi a quang. Bi 3.3 a. Thit k module nh 16K x 8 bit t cc chip nh 4K x 8 b. Thit k module nh 32K x 8 bit t cc chip nh 4K x 8 c. Thit k module nh 8K x 8 bit t cc chip nh 4K x 4 d. Thit k module nh 32M x 32 bit t cc chip nh 4M x 32 Bi 3.4 a. Trnh by cu to COM b. Phn tch nguyn l truyn/nhn d liu trn cng COM c. Vit chng trnh m phng iu khin cng COM: iu khin ng c bc s dng my tnh.

4

Phn 2: Mng my tnhBi 1: a. Trnh by cc i lng o lng c bn ca mt h thng truyn thng b. Trnh by cc nhim vu c bn ca h thng truyn thng c. Trnh by vn tt v giao thc v giao din d. Trnh by chc nng ca cc lp trong m hnh OSI Bi 2: Gi thit c 2 nt mng A v B c kt ni vi nhu bng 1 ng truyn c tc truyn dn r bit/s. Khong cch gia hai nt mng bng d(m), tc truyn tn hiu trn ng truyn bng p m/s. My A truyn n B mt gi tin c kch thc S bit. a. Tnh tr trn ng truyn(propagation delay) tpr? b. Tnh tr truyn ca gi tin (transmission delay) ttr? c. B qua tt c cc tr hng i v tr x l, cho bit tr du cui (end to- end) d. Nu A bt u truyn gi tin ti thi im t = 0 cho bit v tr ca gi tin ti thi im t = ttr? e. Gi thit tpr>ttr. Xc nh v tr ca bit u tin ca gi tin ti thi im t = ttr. f. Gi thit tpr>ttr. Xc nh v tr ca bit u tin ca gi tin ti thi im t = ttr. Bi 3: Gi thit ng truyn di 1000miles, tc truyn dn 1 Gb/s, chiu di gi tin c nh bng 1250 byte, bn pht lun c d liu truyn v cc gi tin c truyn khng b suy hoa hay mt. a. Xc nh hiu sut ca knh truyn khi s dng phng php StopAnd_Wait (SAW) b. Cho bit kch thc ca s thch hp t hiu sut 100% khi s dng phng php ca s trt (Slidding Window SW) Bi 4: gi s hai nt mng n1 v n2 s dng chung mt knh truyn slotted ALOHA. Dung lng knh truyn l 10Mbps. Gi thit mi nt mng c s lng gi tin cn truyn l hu hn. Kh nng nt 1 truyn gi tin trong cc khe thi gian l p1=0.8. Cho bit xc sut truyn ca nt 2 (p2) nu nt ny mun t c thng lng truyn trn knh truyn ny l 1Mbps. Trong trng hp ny, tnh thng lng ca mng. Bi 5: Gi s truyn gi d liu kch thc 1500 byte vo ng truyn c MTU l 500 byte. Gi s gi tin ban u c dn nhn vi s ID = 1 (gi tin IP v4) a. Phn mnh gi tin v ti hp gi tin IP xy ra o u? b. Gi tin ban u c phn thnh bao nhiu gi tin? c. Trong gi tin IP, cc thnh phn no nh hng n vic phn mnh gi tin. 5

d. Cho bit gi tr ca cc thnh phn (cu c) trong cc gi tin b phn mnh. e. nh hng g nu s dng gi tin Ipv6 Bi 6: Tr li cc cu hi v lp mng a. Trnh by mc ch v dch v c bn ca lp mng b. Trnh by cc tham s c th c s dng tnh chi ph (cost) trong cc thut ton nh tuyn. Cc tham s no c th gy ra vn v s n nh ca cc tuyn ng ( v d nh s thay i hoc ph hy cc tuyn ng xc nh). Gii thch. c. Cho hnh mng c 6 nt mng cng cost ca cc tuyn ng nh hnh v. Tm tuyn ng i ngn nht t nt A n nut F s dng thut ton Dijkstra. Yu cu m t tng bc trong qu trnh xc nh tuyn ng.

Bi 7: Hon thnh bng nh tuyn, s dng gii thut Dijkstra xc nh tuyn ng ngn nht i t nt X n tt c cc nt khc trong mng

Bi 8: a. Mng LAN l g? M t. b. Cc loi mi trng truyn c s dng trong mng LAN 6

c. Trnh by nhc im ca mng LAN c dy. Gii thch ti sao mng c dy hnh sao li gii quyt c nhc im ca mng LAN c dy. d. Xc nh kch thc kch thc khung d liu nh nht khi s dng giao thc CSMA/CD vi cc thng s nh sau: Chiu di ti a l 5000m (tn hiu truyn trn ng truyn c tc 5ns / 1m) v tc tryn dn l 100Mbps e. Xc nh hiu nng ca mng Token ring khi tt c cc trm u c cng cc thng s nh sau: Chiu di ca vng 5000m (tc truyn dn tn hiu trn ng truyn l 5ns/1m), s lng cc trm l 25, chiu di trung bnh ca cc khung d liu l 100 byte, tc truyn dn 100Mbps. C th tng c hiu nng ca mng ny khng, nu c cho bit phng thc? Bi 9: a. Trnh by cc thng s nh gi cht lng ca mt mi trng truyn dn b. Nu tn hiu b suy hao 10 ln th suy hao ny bng bao nhiu bB? c. Trnh by hai u im ca m Manchester so vi phng php m ha n gin NRZ. Trnh by nhc im ca m. d. Trnh by mc ch ca chun RS-232 Bi 10: Cho m hnh mng nh hnh. a. Xc nh ni dung ca bng chuyn mch ca cc bridge (gi thit tt c u s dng theo chun IEEE 802.1, tt c cc trm u ni vi nhau ngoi tr vic my A khng bao gi truyn d liu i. Gi thit cc k t A,B,C tng ng cng l a ch MAC ca cc my.

b. M t ngn gn gii thut xy dng bng chuyn ca cc Bridge (S dng phng php Transparent Bridging (TB) Bi 11: Gi s gi tin bao gm P byte d liu v 18 byte Header. Bit rng bn pht m ha tn hiu m thanh 128kb/s. Gi thit phn d liu c in y trc khi c gi i. Thi gian in y d liu ny c gi l thi gian tr ng gi d liu (packetization delay) a. Xc nh thi gian tr ng gi d liu trong hai trng hp P = 46byte v P=1500byte. b. Xc nh tr truyn dn ca cc gi tin vi P=46byte v P=1500 byte trn ng truyn 10Mb/s c. Gii thch kt qu tnh thi gian tr cu a v cu b 7

Bi 12: Di y l 60 byte u tin ca gi tin TCP/IP trong mng LAN. Yu cu gii m cc thng tin sau: - a ch MAC ngun v MAC ch (s Hexa) - a ch IP ngun/ch - S hiu cng TCP ngun/ch - Kiu ca on TCP (v d nh SYN,FIN,ACK, vv) - Giao thc lp ng dng

8