ch12
DESCRIPTION
Software EngineeringTRANSCRIPT
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 1/12
Import Settings:Base Settings: Brownstone DefaultHighest Answer Letter: DMultiple Keywords in Same Paragraph: No
hapter: hapter !"
Multiple hoi#e
!$ %ransfers &etween memory and dis' are performed a (((($
A) &yte at a timeB) *le at a time) &lo#' at a timeD) se#tor at a time
Ans: +eed&a#': !"$!Di,#ulty: Medium
"$ -rder the following *le system layers in order of lowest le.el to highestle.el$
/!0 I1- #ontrol/"0 logi#al *le system/20 &asi# *le system/30 *le4organi5ation module/60 de.i#esA) !7 27 67 37 "B) 67 !7 27 "7 3) !7 67 27 37 "
D) 67 !7 27 37 "
Ans: D+eed&a#': !"$!Di,#ulty: Di,#ult
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 2/12
2$ A .olume #ontrol &lo#' (((($A) #an #ontain information needed &y the system to &oot an operatingsystem from that partitionB) is a dire#tory stru#ture used to organi5e the *les) #ontains many of the *le8s details7 in#luding *le permissions7 ownership7
si5e7 and lo#ation of the data &lo#'sD) #ontains information su#h as the num&er of &lo#'s in a partition7 si5e ofthe &lo#'s7 and free4&lo#' and +B #ount and pointers
Ans: D+eed&a#': !"$"Di,#ulty: Medium
3$ 9hi#h of the following is the simplest method for implementing a
dire#toryA) tree data stru#tureB) linear list) hash ta&leD) nonlinear list
Ans: B+eed&a#': !"$2$!Di,#ulty: Medium
6$ In the Linu; <+S ar#hite#ture7 a=n) (((( o&>e#t represents an indi.idual *le$A) inodeB) *le) super&lo#'D) dentry
Ans: A+eed&a#': !"$"$2Di,#ulty: Medium
?$ 9hi#h of the following allo#ation methods ensures that only one a##ess isneeded to get a dis' &lo#' using dire#t a##essA) lin'ed allo#ationB) inde;ed allo#ation) hashed allo#ationD) #ontiguous allo#ation
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 3/12
Ans: D+eed&a#': !"$3$!Di,#ulty: Medium
@$ %he free4spa#e list #an &e implemented using a &it .e#tor approa#h$9hi#h of the following is a draw&a#' of this te#hniueA) %o tra.erse the list7 ea#h &lo#' must &e read on the dis'$B) It is not feasi&le to 'eep the entire list in main memory for large dis's$) %he te#hniue is more #ompli#ated than most other te#hniues$D) %his te#hniue is not feasi&le for small dis's$
Ans: B+eed&a#': !"$6$!
Di,#ulty: Medium
$ Page #a#hing (((($A) uses .irtual memory te#hniues to #a#he *le data as system4oriented&lo#'s as opposed to pagesB) uses .irtual memory te#hniues to #a#he *le data as pages as opposed tosystem4oriented &lo#'s$) is used in 9indows N% &ut not in 9indows "CCC$D) #annot &e used to #a#he &oth pro#ess pages and *le data$
Ans: B+eed&a#': !"$?$"Di,#ulty: Medium
$ N+S .iews a set of inter#onne#ted wor'stations as a set of (((($A) independent ma#hines with independent *le systemsB) dependent ma#hines with independent *le systems) dependent ma#hines with dependent *le systems
D) independent ma#hines with dependent *le systems
Ans: A+eed&a#': !"$Di,#ulty: Medium
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 4/12
!C$ %he N+S mount proto#ol (((($A) does not allow a remote dire#tory to &e a##essi&le in a transparentmannerB) e;hi&its a transiti.ity property in terms of #lient a##ess to other *lesystems
) esta&lishes the initial logi#al #onne#tion &etween a ser.er and a #lientD) pro.ides a set of E+s for remote *le operations
Ans: +eed&a#': !"$$"Di,#ulty: Medium
!!$ A dis' with free &lo#'s C7!7677!6 would &e represented with what &itmap
A) CC!!!C!!!C!!!!!CB) !!CCC!CCC!CCCCC!) C!CCC!CCC!CCCCC!D) !!CCC!CCC!CCCCCC
Ans: B+eed&a#': !"$6$!Di,#ulty: Medium
!"$ A ((((( is a .iew of a *le system &efore the last update too' pla#e$A) transa#tionB) &a#'up) #onsisten#y #he#'erD) snapshot
Ans: D+eed&a#': !"$@$2Di,#ulty: Medium
!2$ (((((( in#ludes all of the *le system stru#ture7 minus the a#tual #ontentsof *les$A) MetadataB) Logi#al *le system) Basi# *le systemD) +ile4organi5ation module
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 5/12
Ans: A+eed&a#': !"$!Di,#ulty: Medium
!3$ %he *le4allo#ation ta&le =+A%) used in MS4D-S is an e;ample of ((((($A) #ontiguous allo#ationB) inde;ed allo#ation) lin'ed allo#ationD) multile.el inde;
Ans: +eed&a#': !"$3$"Di,#ulty: Medium
!6$ How many dis' a##esses are ne#essary for dire#t a##ess to &yte "C?Cusing lin'ed allo#ation and assuming ea#h dis' &lo#' is 3 KB in si5eA) !B) ?) @D) 6
Ans: B+eed&a#': !"$3$"
Di,#ulty: Medium
!?$ A #ontiguous #hun' of dis' &lo#'s is 'nown as a=n) ((((($A) e;tentB) dis' &lo#' group) inodeD) *le4allo#ation ta&le =+A%)
Ans: A
+eed&a#': !"$3$!Di,#ulty: Medium
!@$ -n FNIG systems7 the data stru#ture for maintaining information a&out a*le is a=n) ((((($A) super&lo#'
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 6/12
B) inode) *le4#ontrol &lo#' =+B)D) master *le ta&le
Ans: B
+eed&a#': !"$!Di,#ulty: Medium
!$ 9hi#h algorithm is #onsidered reasona&le for managing a &uer #a#heA) least4re#ently4used =LEF)B) *rst4in4*rst4out =+I+-)) most4re#ently4usedD) least4freuently4used =L+F)
Ans: A+eed&a#': !"$?$"Di,#ulty: asy
!$ 9hi#h of the following statements regarding the 9A+L *le system isin#orre#tA) lones are similar to snapshots$B) 9A+L is used e;#lusi.ely on networ'ed *le ser.ers$) Part of #a#hing uses non4.olatile EAM =N<EAM$)
D) It pro.ides little repli#ation$
Ans: D+eed&a#': !"$Di,#ulty: Medium
"C$ onsider a system #rash on a log4stru#tured *le system$ 9hi#h one ofthe following e.ents must o##urA) -nly a&orted transa#tions must &e #ompleted$
B) All transa#tions in the log must &e #ompleted$) All transa#tions in the log must &e mar'ed as in.alid$D) +ile #onsisten#y #he#'ing must &e performed$
Ans: B+eed&a#': !"$@$"Di,#ulty: Di,#ult
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 7/12
"!$ A (((((((((( #ontains the same pages for memory4mapped I- as well asordinary I-$A) dou&le #a#he
B) uni*ed .irtual memory) page #ah#eD) uni*ed &uer #a#he
Ans: D+eed&a#': !"$?$"Di,#ulty:
ssay
""$ BrieJy des#ri&e the in4memory stru#tures that may &e used toimplement a *le system$
Ans: An in4memory mount ta&le #ontains information a&out ea#h mounted.olume$ An in4memory dire#tory4stru#ture #a#he holds the dire#toryinformation of re#ently a##essed dire#tories$ %he system4wide open4*le ta&le#ontains a #opy of the +B of ea#h open *le$ %he per4pro#ess open4*le ta&le#ontains a pointer to the appropriate entry in the system4wide open4*le
ta&le$+eed&a#': !"$"Di,#ulty: Di,#ult
"2$ %o #reate a new *le7 an appli#ation program #alls the logi#al *le system$Des#ri&e the steps the logi#al *le system ta'es to #reate the *le$
Ans: %he logi#al *le system allo#ates a new +B$ Alternati.ely7 if the *le4system implementation #reates all +Bs at *le4system #reation time7 an +B
is allo#ated from the set of free +Bs$ %he system then reads the appropriatedire#tory into memory7 updates it with the new *le name and +B7 andwrites it &a#' to the dis'$+eed&a#': !"$"Di,#ulty: Di,#ult
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 8/12
"3$ 9hat do the terms raw and #oo'ed mean when used to des#ri&e apartition
Ans: A raw dis' is used where no *le system is appropriate$ Eaw partitions#an &e used for a FNIG swap spa#e as it does not need a *le system$ -n the
other hand7 a #oo'ed dis' is a dis' that #ontains a *le system$+eed&a#': !"$"$"Di,#ulty: Medium
"6$ 9hat are the two most important fun#tions of the <irtual +ile System=<+S) layer
Ans: %he <+S separates the *le4system4generi# operations from theirimplementation &y de*ning a #lean <+S interfa#e$ Se.eral of these
implementations may #oe;ist on the same ma#hine allowing transparenta##ess to dierent types of lo#ally mounted *le systems$ %he other importantfeature of <+S is that it is &ased on a *le4representation stru#ture that#ontains a numeri#al designator for a networ'4wide uniue *le$ %his networ'4wide uniueness is reuired for support of networ' *le systems$+eed&a#': !"$"$2Di,#ulty: Medium
"?$ 9hat is the main disad.antage to using a linear list to implement a
dire#tory stru#ture 9hat steps #an &e ta'en to #ompensate for thispro&lem
Ans: Linear lists are slow to sear#h$ %his slowness would &e noti#ea&le tousers as dire#tory information is used freuently in #omputer systems$ Manyoperating systems implement a software #a#he to store the most re#entlyused dire#tory information$ A sorted list may also &e used to de#rease thea.erage sear#h time due to a &inary sear#h$+eed&a#': !"$2$!Di,#ulty: Medium
"@$ How is a hash ta&le superior to a simple linear list stru#ture 9hat issuemust &e handled &y a hash ta&le implementation
Ans: A hash ta&le implementation uses a linear list to store dire#tory entries$Howe.er7 a hash data stru#ture is also used in order to speed up the sear#hpro#ess$ %he hash data stru#ture allows the *le name to &e used to help
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 9/12
#ompute the *le8s lo#ation within the linear list$ ollisions7 whi#h o##ur whenmultiple *les map to the same lo#ation7 must &e handled &y thisimplementation$+eed&a#': !"$2$"Di,#ulty: Medium
"$ 9hat are the pro&lems asso#iated with lin'ed allo#ation of dis' spa#eroutines
Ans: %he ma>or pro&lem is that a lin'ed allo#ation #an &e used ee#ti.elyonly for seuential4a##ess *les$ Another disad.antage is the spa#e reuiredfor the pointers$ et another pro&lem of lin'ed allo#ation is the de#reasedrelia&ility due to lost or damaged pointers$+eed&a#': !"$3$"
Di,#ulty: Medium
"$ Des#ri&e the #ounting approa#h to free spa#e management$Ans: %he #ounting approa#h ta'es ad.antage of the fa#t that7 generally7se.eral #ontiguous &lo#'s may &e allo#ated or freed simultaneously$ %hus7rather than 'eeping a list of n free dis' addresses7 we #an 'eep the addressof the *rst free &lo#' and the num&er n of free #ontiguous &lo#'s that followthe *rst &lo#'$ a#h entry in the free4spa#e list then #onsists of a dis'address and a #ount$
+eed&a#': !"$6$3Di,#ulty: Medium
2C$ ;plain how a snapshot is ta'en in the 9A+L *le system$
Ans: %o ta'e a snapshot7 9A+L #reates a dupli#ate root inode$ Any *le ormetadata updates after that go to new &lo#'s rather than o.erwriting theire;isting &lo#'s$ %he new root inode points to metadata and data #hanged asa result of these writes7 while the old root inode still points to the old &lo#'s7
whi#h ha.e not &een updated$+eed&a#': !"$Di,#ulty: Medium
2!$ ;plain the &ene*t if using a uni*ed &uer #a#he$
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 10/12
Ans: 9ithout a uni*ed &uer #a#he7 memory4mapped I- uses a page #a#he7and ordinary I- uses a &uer #a#he$ %he &uer #a#he will also #a#he thesame #ontents as in the page #a#he$ %his is 'nown as dou&le #a#hing of *lesystem data twi#e$ A uni*ed &uer #a#he uses the same7 single &uer #a#hefor #a#hing pages for &oth memory4mapped I- as well as ordinary I-$
+eed&a#': !"$?$"Di,#ulty: Medium
%rue1+alse
2"$ Metadata in#ludes all of the *le4system stru#ture7 in#luding the a#tualdata =or #ontents of the *le)$
Ans: +alse+eed&a#': !"$!Di,#ulty: Medium
22$ In N%+S7 the .olume #ontrol &lo#' =per .olume) and the dire#torystru#ture =per *le system) is stored in the master *le ta&le$
Ans: %rue
+eed&a#': !"$"$!Di,#ulty: Medium
23$ Inde;ed allo#ation may reuire su&stantial o.erhead for its inde; &lo#'$
Ans: %rue+eed&a#': !"$3$2Di,#ulty: Medium
26$ %he N+S proto#ol pro.ides #on#urren#y4#ontrol me#hanisms$
Ans: +alse+eed&a#': !"$Di,#ulty: Medium
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 11/12
2?$ -n log4stru#tured *le systems7 all metadata and *le data updates arewritten seuentially to a log$
Ans: +alse+eed&a#': !"$@$"Di,#ulty: Medium
2@$ <+S allows dissimilar *le systems to &e a##essed similarly$
Ans: %rue+eed&a#': !"$"$2Di,#ult: Medium
2$ Lin'ed allo#ation suers from e;ternal fragmentation$
Ans: +alse+eed&a#': !"$3$"Di,#ulty: Medium
2$ %he 9A+L *le system #an &e used in #on>un#tion with N+S$
Ans: %rue+eed&a#': !"$Di,#ulty: asy
3C$ -n log4stru#tured *le systems7 a transa#tion is #onsidered only when it iswritten to dis'$
Ans: +alse+eed&a#': !"$@$"Di,#ulty: Medium
3!$ A uni*ed &uer #a#he uses the same #a#he for ordinary dis' I1- as wellas memory4mapped I1-$
7/17/2019 ch12
http://slidepdf.com/reader/full/ch12563db87e550346aa9a9439a9 12/12
Ans: %rue+eed&a#': !"$?$"Di,#ulty: Medium
3"$ A #onsisten#y #he#'er only #he#'s for in#onsisten#ies7 it #annot *; anythat it may *nd$
Ans: +alse+eed&a#': !"$@$!Di,#ulty: asy
32$ Asyn#hronous writes to a *le system are generally more e,#ient thansyn#hronous writes$
Ans: %rue+eed&a#': !"$?$"Di,#ulty: Medium