comp3511_spring16_hw4

November 30, 2018 | Author: Wu Dickson | Category: File System, Computer File, Computer Data Storage, Computer Hardware, Computer Engineering
Share Embed Donate


Short Description

Sources...

Description

Spring 2016 COMP 3511 Homework Assignment #4 Handout ate ! Apri" 2

ue ate! Ma$ 11

 Name: Wu Bing Shu_____ ID: __20111271_______E-Mail:[email protected]___  __20111271_______E-Mail:[email protected]___  P"ease read t%e &o""owing instru'tions 'are&u""$ (e&ore answering t%e )uestions! !"u !"u sh"ul# $inish the h"mew"% h" mew"% assignment indi*idua""$ . • &he%e a%e a t"tal "$ 4 'uesti"ns. • When ("u w%ite ("u% answe%s) *lease t%( t" b e *%e+ise an# +"n+ise. • ,ill in ("u% name) stu#ent ID) email an# Se+ti"n numbe% at the t"* "$ ea+h *age. • lease $ill in ("u% answe%s in the s*a+e *%"i#e#) "% ("u +an t(*e ("u% answe%s in the • MS W"%# $ile. •

1.

Homework Homework Co""e'tion! t%e %ard'op$ is %e'ui%e# an# the h"mew"% is +"lle+te# in +"lle+ti"n +"lle+ti"n b"/ 1. &he +"lle+ti"n +"lle+ti"n b"/es l"+ate "utsi#e ""m 210) nea% li$t 21 3the%e 3the%e a%e labels atta+he# "n the b"/es4.

320 320 *"i *"int nts4 s4 Mult Multi* i*le le +h"i +h"i+e +ess 14 _____B___ _____B___ is the +"n+e*t +"n+e*t in whi+h whi+h a *%"+ess *%"+ess is +"*ie# +"*ie# int" int" main main mem"%( mem"%( $%"m $%"m the se+"n#a%( mem"%( a++"%#ing t" the %e'ui%ement. 54 aging B4 Deman# *aging 64 Segmentati"n D4 Swa**ing 24 When a *%"g%am *%"g%am t%ies t%ies t" a++ess a *age that is is ma**e# ma**e# in a##%es a##%esss s*a+e s*a+e but n"t n"t l"a#e# in *h(si+al mem"%() then ____6_____. 54 segmentati"n $ault "++u%s B4 $atal e%%"% "++u%s 64 *age $ault "++u%s D4 n" e%%"% "++u%s 4 5 *%"+es *%"+esss is th%ash th%ashing ing i$ ____ ________ ____5__ 5_____. ___. 54 it is s*en#ing m"%e time *aging than e/e+uting B4 it is s*en#ing less time *aging than e/e+u ting 64 *age $ault "++u%s D4 swa**ing +an n"t tae *la+e 4 &he abilit( abilit( t" t" e/e+ute e/e+ute a *%"g%am *%"g%am that is "nl( *a%tiall( *a%tiall( in in mem"%( has bene$its bene$its lie: A ①&he am"unt "$ *h(si+al mem"%( +ann"t *ut a +"nst%aint "n the *%"g%am ②%"g%ams $"% an e/t%emel( la%ge i%tual s*a+e +an be +%eate# ③68 utili9ati"n #e+%eases ④&h%"ugh*ut in+%eases ⑤es*"nse time is n"t a$$e+te# 1

⑥&u%na%"un# time in+%eases ⑦ess I;< will be nee#e# t" l"a# "% swa* ea+h use% *%"g%am in mem"%( 54 ①②④⑤⑦ B4 ②③④⑤ 64 ①②④⑦ D4 ①②④⑥ =4 In the w"%ing set m"#el) $"%: 2>1=7777=1>21212 i$  DELTA ? 10) then the w"%ing set at time t1 3.7 = 14 is ___6________. 54 A1) 2) ) =) > B4 A2) 1) >) 7)  64 A1) >) =) 7) 2 D4 A1) 2) ) ) = >4 &he "*en $ile table has a;an __6_____ ass"+iate# with ea+h $ile. 54 $ile +"ntent B4 $ile *e%missi"n 64 "*en +"unt D4 +l"se +"unt 74 Whi+h "ne "$ the $"ll"wing e/*lains the se'uential $ile a++ess meth"#C + 54 %an#"m a++ess a++"%#ing t" the gien b(te numbe%  B4 %ea# b(tes "ne at a time) in "%#e%  64 %ea#;w%ite se'uentiall( b( %e+"%# D4 %ea#;w%ite %an#"ml( b( %e+"%# 4 Whi+h "$ the $"ll"wing is t%ue "$ the t%ee-st%u+tu%e# #i%e+t"%( st%u+tu%eC  54 8se%s +ann"t +%eate thei% "wn sub#i%e+t"%ies. B4 8se%s +ann"t a+'ui%e *e%missi"n t" a++ess the $iles "$ "the% use%s. 64 Di%e+t"%ies +an sha%e sub#i%e+t"%ies an# $iles. D4 It is the m"st +"mm"n #i%e+t"%( st%u+tu%e. 4 In whi+h t(*e "$ all"+ati"n meth"# ea+h $ile "++u*( a set "$ +"ntigu"us bl"+ "n the #isC A 54 6"ntigu"us all"+ati"n B4 D(nami+-st"%age all"+ati"n 64 ine# all"+ati"n D4 In#e/e# all"+ati"n 104 5 m"unt *"int is _D____. 54 a %""t "$ the $ile s(stem B4 a l"+ati"n "$ a sha%e# $ile s(stem 64 "nl( a**%"*%iate $"% sha%e# $ile s(stems D4 the l"+ati"n within the $ile st%u+tu%e whe%e the $ile s(stem is t" be atta+he#.

2

2.

30 *"ints4 FG5. 14 3= *"ints4 5ssume we hae a #eman#-*age# mem"%(. &he *age table is hel# in %egiste%s. It taes  millise+"n#s t" se%i+e a *age $ault i$ an em*t( *age is aailable "% the %e*la+e# *age is n"t m"#i$ie#) an# 20 millise+"n#s i$ the %e*la+e#  *age is m"#i$ie#. Mem"%( a++ess time is 100 nan"se+"n#s. 5ssume that the *age t" be %e*la+e# is m"#i$ie# 70 *e%+ent "$ the time. What is the ma/imum a++e*table *age-$ault %ate $"% an e$$e+tie a++ess time "$ n" m"%e than 200 nan"se+"n#sC

24 3> *"ints4 5ssume that ("u a%e m"nit"%ing the %ate at whi+h the *"inte% in the +l"+ alg"%ithm 3whi+h in#i+ates the +an#i#ate *age $"% %e*la+ement4 m"es. What +an ("u sa( ab"ut the s(stem i$ ("u n"ti+e the $"ll"wing behai"%: a4 *"inte% is m"ing $ast  b4 *"inte% is m"ing sl"w



4 3 *"ints4 Is it *"ssible $"% a *%"+ess t" hae tw" w"%ing sets) "ne %e*%esenting #ata an# an"the% %e*%esenting +"#eC lease b%ie$l( e/*lain ("u% answe%.

4 3= *"ints4 6"nsi#e% a 8NIH $ile s(stem that uses in"#es t" %e*%esent $iles. &he l"gi+al a##%ess has 2 bits) an# #is bl"+ si9e is B. &he +"mbine# s+heme is use# $"% #is all"+ati"n) with 10 #i%e+t #is bl"+s) *lus "ne single) "ne #"uble) an# "ne t%i*le in#i%e+t #is bl"+s. What is the ma/imum $ile si9e that +an be su**"%te# in this $ile s(stemC

=4 3= *"ints4 What is the a#antage an# #isa#antage "$ using a a+(+li+ g%a*h #i%e+t"%(C



>4

.

3= *"ints4 Su**"se that a #is %"tates at 7200 M. What is the ae%age %"tati"nal laten+( "$ this #is #%ieC

30 *"ints4 6"nsi#e% the $"ll"wing *age %e$e%en+e st%ing: 2) 0) 1) =) 0) ) 2) ) 0) 2) 1) =) 2) ) 0) =) 1) 1) 2) 0 5ssuming #eman# *aging with &our $%ames all"+ate# t" a *%"+ess with l"+al all"+ati"n s+heme use#. lease illust%ate ea+h ste* that the $"ll"wing %e*la+ement alg"%ithms w"% $"% this %e$e%en+e st%ing an# +"m*ute the *age $aults in ea+h alg"%ithm. 14 ,I,< %e*la+ement 24 8 %e*la+ement 4 =-J27=-J00-J17=0-J201=-J=0-J=>-J-J=07 &"tal: 1>1

 b4

SS&, 2=02-J27=-J201=-J17=0-J=0-J2>=-J=07-J=>-J00-J &"tal: 7>7

+4

S65N 2=02-J27=-J=07-J=>-J00-J-J-J201=-J17=0-J=0 &"tal: 721 #4 6-S65N 2=02-J27=-J=07-J=>-J00-J-J-J0-J2=>-J=0J17=0-J201= &"tal: =11

e4

= &"tal 701

$4

6--J=0-J17=0-J201= &"tal 7>

>

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF