Sie sind auf Seite 1von 24

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-OPERATING SYSTEMS

UNIT I
1. What is an Operating s ste!" An #perating s ste! is a pr#gra! that !anages the $#!p%ter har&'are. It a(s# pr#)i&es a *asis +#r app(i$ati#n pr#gra!s an& a$t as an inter!e&iar *et'een a %ser #+ a $#!p%ter an& the $#!p%ter har&'are. It $#ntr#(s an& $##r&inates the %se #+ the har&'are a!#ng the )ari#%s app(i$ati#n pr#gra!s +#r the )ari#%s %sers. 2. Wh is the Operating S ste! )ie'e& as a res#%r$e a((#$ at#r , $#ntr#( pr#gra!" A $#!p%ter s ste! has !an res#%r$es - har&'are , s#+t'are that !a *e re.%ire& t# s#()e a pr#*(e!/ (i0e CPU ti!e/ !e!#r spa$e/ +i(est#rage spa$e/ I1O &e)i$es , s# #n. The OS a$ts as a !anager +#r these res#%r$es s# it is )ie'e& as a res#%r$e a((#$at#r. The OS is )ie'e& as a $#ntr#( pr#gra! *e$a%se it !anages the e2e$%ti#n #+ %ser pr#gra!s t# pre)ent err#rs , i!pr#per %se #+ the $#!p%ter. 3. What is the 4erne(" A !#re $#!!#n &e+initi#n is that the OS is the #ne pr#gra! r%nning at a(( ti!es #n the $#!p%ter/ %s%a(( $a((e& the 0erne(/ 'ith a(( e(se *eing app(i$ati#n pr#gra!s. 5. What are 6at$h s ste!s" 6at$h s ste!s are .%ite appr#priate +#r e2e$%ting (arge 7#*s that nee& (itt(e intera$ti#n. The %ser $an s%*!it 7#*s an& ret%rn (ater +#r the res%(ts. It is n#t ne$essar t# 'ait 'hi(e the 7#* is pr#$esse&. Operat#rs *at$he& t#gether 7#*s 'ith si!i(ar nee&s an& ran the! thr#%gh the $#!p%ter as a gr#%p. 5. What is the a&)antage #+ M%(tipr#gra!!ing" M%(tipr#gra!!ing in$reases CPU %ti(i8ati#n * #rgani8ing 7#*s s# that the CPU a('a s has #ne t# e2e$%te. Se)era( 7#*s are p(a$e& in the !ain !e!#r an& the pr#$ess#r is s'it$he& +r#! 7#* t# 7#* as nee&e& t# 0eep

se)era( 7#*s a&)an$ing 'hi(e 0eeping the periphera( &e)i$es in %se.

9. What is an Intera$ti)e $#!p%ter s ste!" Intera$ti)e $#!p%ter s ste! pr#)i&es &ire$t $#!!%ni$ati#n *et'een the %ser an& the s ste!. The %ser gi)es instr%$ti#ns t# the #perating s ste! #r t# a pr#gra! &ire$t( / %sing a 0e *#ar& #r !#%se /an& 'aits +#r i!!e&iate res%(ts. :. What &# #% !ean * Ti!e-sharing s ste!s" is a #r !%(titas0ing #+ (#gi$a( e2tensi#n Ti!e-sharing It a((#'s !an %sers t# share the $#!p%ter !%(tipr#gra!!ing. si!%(tane#%s( . The CPU e2e$%tes !%(tip(e 7#*s * s'it$hing a!#ng the!/ *%t the s'it$hes #$$%r s# +re.%ent( that the %sers $an intera$t 'ith ea$h pr#gra! 'hi(e it is r%nning.

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems ;. What are !%(tipr#$ess#r s ste!s , gi)e their a&)antages" M%(tipr#$ess#r s ste!s a(s# 0n#'n as para((e( s ste!s #r tight( $#%p(e&

s ste!s are s ste!s that ha)e !#re than #ne pr#$ess#r in $(#se
In$rease& thr#%ghp%t E$#n#! #+ s$a(e In$rease& re(ia*i(it

$#!!%ni$ati#n/ sharing the $#!p%ter *%s/ the $(#$0 an& s#!eti!es !e!#r , periphera( &e)i$es. Their !ain a&)antages are

<. What are the &i++erent t pes #+ !%(tipr#$essing" Symmetric multiprocessing (SMP): In SMP ea$h pr#$ess#r r%ns an i&enti$a( $#p #+ the Os , these $#pies $#!!%ni$ate 'ith #ne an#ther as nee&e&. A(( pr#$ess#rs are peers. E2a!p(es are Win&#'s NT/ S#(aris/ =igita( UNI>/ OS12 , ?in%2.

Asymmetric multiprocessing @ Ea$h pr#$ess#r is assigne& a spe$i+i$ tas0. A !aster pr#$ess#r $#ntr#(s the s ste!A the #ther pr#$ess#rs (##0 t# the !aster +#r instr%$ti#ns #r pre&e+ine& tas0s. It &e+ines a !aster-s(a)e re(ati#nship. E2a!p(e S%nOS Bersi#n 5.
1C. What is gra$e+%( &egra&ati#n"

In !%(tipr#$ess#r s ste!s/ +ai(%re #+ #ne pr#$ess#r 'i(( n#t ha(t the s ste!/ *%t #n( s(#' it &#'n. I+ there are ten pr#$ess#rs , i+ #ne +ai(s the re!aining nine pr#$ess#rs pi$0 %p the '#r0 #+ the +ai(e& pr#$ess#r. This a*i(it t# $#ntin%e pr#)i&ing ser)i$e is pr#p#rti#na( t# the s%r)i)ing har&'are is $a((e& gra$e+%( &egra&ati#n. 11. What is =%a(- M#&e Operati#n" The &%a( !#&e #perati#n pr#)i&es %s 'ith the !eans +#r pr#te$ting the #perating s ste! +r#! 'r#ng %sers an& 'r#ng %sers +r#! #ne an#ther. User !#&e an& !#nit#r !#&e are the t'# !#&es. M#nit#r !#&e is a(s# $a((e& s%per)is#r !#&e/ s ste! !#&e #r pri)i(ege& !#&e. M#&e *it is atta$he& t# the har&'are #+ the $#!p%ter t# in&i$ate the $%rrent !#&e. M#&e *it is DCE +#r
12. What are pri)i(ege& instr%$ti#ns" S#!e #+ the !a$hine instr%$ti#ns that !a $a%se har! t# a s ste! are &esignate& as pri)i(ege& instr%$ti#ns. The har&'are a((#'s the pri)i(ege& instr%$ti#ns t# *e e2e$%te& #n( in !#nit#r !#&e.

13. F#' $an a %ser pr#gra! &isr%pt the n#r!a( #perati#ns #+ a s ste!" A %ser pr#gra! !a &isr%pt the n#r!a( #perati#n #+ a s ste! * Iss%ing i((ega( I1O #perati#ns 6 a$$essing !e!#r (#$ati#ns 'ithin the OS itse(+ Re+%sing t# re(in.%ish the CPU 15. F#' is the pr#te$ti#n +#r !e!#r pr#)i&e&" The pr#te$ti#n against i((ega( !e!#r a$$ess is &#ne * %sing t'#

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems

s!a((est (ega( ph si$a( a&&ressA the (i!it register $#ntains the si8e #+ the range. The *ase an& (i!it registers $an *e (#a&e& #n( * the OS %sing spe$ia( pri)i(ege& instr%$ti#ns.
15. What are the )ari#%s OS $#!p#nents" The )ari#%s s ste! $#!p#nents are Pr#$ess !anage!ent Main-!e!#r !anage!ent Gi(e !anage!ent I1O-s ste! !anage!ent Se$#n&ar -st#rage !anage!ent Net'#r0ing Pr#te$ti#n s ste! C#!!an&-interpreter s ste! 19. What is a pr#$ess" A pr#$ess is a pr#gra! in e2e$%ti#n. It is the %nit #+ '#r0 in a !#&ern #perating s ste!. A pr#$ess is an a$ti)e entit 'ith a pr#gra! $#%nter
spe$i+ ing the ne2t instr%$ti#ns t# e2e$%te an& a set #+ ass#$iate& res#%r$es.

It a(s# in$(%&es the pr#$ess sta$0/ $#ntaining te!p#rar &ata an& a &ata se$ti#n $#ntaining g(#*a( )aria*(es.

1:. What is a pr#$ess state an& !enti#n the )ari#%s states #+ a pr#$ess" As a pr#$ess e2e$%tes/ it $hanges state. The state #+ a pr#$ess is &e+ine& in part * the $%rrent a$ti)it #+ that pr#$ess. Ea$h pr#$ess !a *e in #ne #+ the +#((#'ing states@ Ne' R%nning Waiting Rea& Ter!inate& 1;. What is pr#$ess $#ntr#( *(#$0" Ea$h pr#$ess is represente& in the #perating s ste! * a pr#$ess It $#ntains the +#((#'ing in+#r!ati#n@ Pr#$ess state Pr#gra! $#%nter CPU registers CPU-s$he&%(ing in+#r!ati#n Me!#r -!anage!ent in+#r!ati#n A$$#%nting in+#r!ati#n I1O stat%s in+#r!ati#n 1<. What are the %se #+ 7#* .%e%es/ rea& .%e%es , &e)i$e .%e%es" As a pr#$ess enters a s ste!/ the are p%t int# a 7#* .%e%e. This .%e%e $#nsists #+ a(( 7#*s in the s ste!. The pr#$esses that are resi&ing in !ain !e!#r an& are rea& , 'aiting t# e2e$%te are 0ept #n a (ist $a((e&

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems rea& .%e%e. The (ist #+ pr#$esses 'aiting +#r a parti$%(ar I1O &e)i$e is 0ept in the &e)i$e .%e%e. 2C. What is !eant * $#nte2t s'it$h" S'it$hing the CPU t# an#ther pr#$ess re.%ires sa)ing the state #+ the #(& pr#$ess an& (#a&ing the sa)e& state +#r the ne' pr#$ess. This tas0 is 0n#'n as $#nte2t s'it$h. The $#nte2t #+ a pr#$ess is represente& in the PC6 #+ a pr#$ess. UNIT II 21. What is a threa&" A threa& #ther'ise $a((e& a (ight'eight pr#$ess H?WPI is a *asi$ %nit #+ CPU %ti(i8ati#n/ it $#!prises #+ a threa& i&/ a pr#gra! $#%nter/ a register set an& a sta$0. It shares 'ith #ther threa&s *e(#nging t# the sa!e pr#$ess its $#&e se$ti#n/ &ata se$ti#n/ an& #perating s ste! res#%r$es s%$h as #pen +i(es an& signa(s. 22. What are the *ene+its #+ !%(tithrea&e& pr#gra!!ing" The *ene+its #+ !%(tithrea&e& pr#gra!!ing $an *e *r#0en &#'n int# +#%r !a7#r $ateg#ries@ Resp#nsi)eness Res#%r$e sharing E$#n#! Uti(i8ati#n #+ !%(tipr#$ess#r ar$hite$t%res 23. C#!pare %ser threa&s an& 0erne( threa&s.

User threads
User threa&s are s%pp#rte& a*#)e the 0erne( an& are i!p(e!ente& * a threa& (i*rar at the %ser (e)e(
Threa& $reati#n , s$he&%(ing are &#ne

Kernel threads 4erne( threa&s are s%pp#rte& &ire$t( * the #perating s ste! Threa& $reati#n/ s$he&%(ing !anage!ent are &#ne * the #perating

inter)enti#n. There+#re the are +ast t# $reate an& !anage


entire pr#$ess t# *(#$0

in the %ser spa$e/ 'ith#%t 0erne(

an&

6(#$0ing s ste! $a(( 'i(( $a%se the

*(#$0ing s ste! $a((/ the 0erne( $an s$he&%(e an#ther threa& in the app(i$ati#n +#r e2e$%ti#n

I+ the threa& per+#r!s

25. What is the %se #+ +#r0 an& e2e$ s ste! $a((s" G#r0 is a s ste! $a(( * 'hi$h a ne' pr#$ess is $reate&. E2e$ is a(s# a s ste! $a((/ 'hi$h is %se& a+ter a +#r0 * #ne #+ the t'# pr#$esses t# rep(a$e the pr#$ess !e!#r spa$e 'ith a ne' pr#gra!. 25. =e+ine threa& $an$ e((ati#n , target threa&. The threa& $an$e((ati#n is the tas0 #+ ter!inating a threa& *e+#re it has $#!p(ete&. A threa& that is t# *e $an$e((e& is #+ten re+erre& t# as the target threa&.

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems G#r e2a!p(e/ i+ !%(tip(e threa&s are $#n$%rrent( sear$hing thr#%gh a &ata*ase an& #ne threa& ret%rns the res%(t/ the re!aining threa&s !ight *e $an$e((e&. 29. What are the &i++erent 'a s in 'hi$h a threa& $an *e $an$e((e&" Can$e((ati#n #+ a target threa& !a #$$%r in t'# &i++erent s$enari#s@ Async"ronous cancellation: One threa& i!!e&iate( ter!inates the target threa& is $a((e& as n$hr#n#%s $an$e((ati#n. &e'erre( cancellation: The target threa& $an peri#&i$a(( $he$0 i+ it sh#%(& ter!inate/ a((#'ing the target threa& an #pp#rt%nit t# ter!inate itse(+ in an #r&er( +ashi#n. 2:. =e+ine CPU s$he&%(ing.

CPU s$he&%(ing is the pr#$ess #+ s'it$hing the CPU a!#ng )ari#%s

pr#$esses. CPU s$he&%(ing is the *asis #+ !%(tipr#gra!!e& #perating s ste!s. 6 s'it$hing the CPU a!#ng pr#$esses/ the #perating s ste! $an !a0e the $#!p%ter !#re pr#&%$ti)e. 2;. What is pree!pti)e an& n#npree!pti)e s$he&%(ing" Un&er n#npree!pti)e s$he&%(ing #n$e the CPU has *een a((#$ate& t# a pr#$ess/ the pr#$ess 0eeps the CPU %nti( it re(eases the CPU either * ter!inating #r s'it$hing t# the 'aiting state. Pree!pti)e s$he&%(ing $an pree!pt a pr#$ess 'hi$h is %ti(i8ing the CPU in *et'een its e2e$%ti#n an& gi)e the CPU t# an#ther pr#$ess. 2<. What is a =ispat$her" The &ispat$her is the !#&%(e that gi)es $#ntr#( #+ the CPU t# the pr#$ess se(e$te& * the sh#rt-ter! s$he&%(er. This +%n$ti#n in)#()es@ S'it$hing $#nte2t S'it$hing t# %ser !#&e J%!ping t# the pr#per (#$ati#n in the %ser pr#gra! t# restart that pr#gra!. 3C. What is &ispat$h (aten$ " The ti!e ta0en * the &ispat$her t# st#p #ne pr#$ess an& start an#ther r%nning is 0n#'n as &ispat$h (aten$ . thr#%ghp%t" The )ari#%s s$he&%(ing $riteria are

CPU %ti(i8ati#n Thr#%ghp% t T%rnar#%n & ti!e Waiting ti!e


Resp#nse ti!e 32. =e+ine

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

Thr#%ghp%t in CPU s$he&%(ing is the n%!*er #+ pr#$esses that are $#!p(ete&


per %nit ti!e. G#r (#ng pr#$esses/ this rate !a *e #ne pr#$ess per h#%rA +#r sh#rt

transa$ti#ns/ thr#%ghp%t !ight *e 1C pr#$esses per se$#n&.

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems 33. What is t%rnar#%n& ti!e" T%rnar#%n& ti!e is the inter)a( +r#! the ti!e #+ s%*!issi#n t# the ti!e #+ $#!p(eti#n #+ a pr#$ess. It is the s%! #+ the peri#&s spent 'aiting t# get int# !e!#r / 'aiting in the rea& .%e%e/ e2e$%ting #n the CPU/ an& &#ing I1O. 35. =e+ine ra$e $#n&iti#n. When se)era( pr#$ess a$$ess an& !anip%(ate sa!e &ata $#n$%rrent( / then the #%t$#!e #+ the e2e$%ti#n &epen&s #n parti$%(ar #r&er in 'hi$h the a$$ess ta0es p(a$e is $a((e& ra$e $#n&iti#n. T# a)#i& ra$e $#n&iti#n/ #n( #ne pr#$ess at a ti!e $an !anip%(ate the share& )aria*(e. 35. What is $riti$a( se$ti#n pr#*(e!" C#nsi&er a s ste! $#nsists #+ DnD pr#$esses. Ea$h pr#$ess has seg!ent #+ $#&e $a((e& a $riti$a( se$ti#n/ i n 'hi$h the pr#$ess !a *e $hanging $#!!#n )aria*(es/ %p&ating a ta*(e/ 'riting a +i(e. When #ne pr#$ess is e2e$%ting in its $riti$a( se$ti#n/ n# #ther pr#$ess $an a((#'e& t# e2e$%te in its $riti$a( se$ti#n.

39. What are the re.%ire!ents that a s#(%ti#n t# the $ri ti$a( se$ti#n pr#*(e! !%st satis+ " The three re.%ire!ents are M%t%a( e2$(%si#n Pr#gress 6#%n&e& 'aiting
3:. =e+ine entr se$ti#n an& e2it se$ti#n. The $riti$a( se$ti#n pr#*(e! is t# &esign a pr#t#$#( that the pr#$esses $an %se t# $##perate. Ea$h pr#$ess !%st re.%est per!issi#n t# enter its $riti$a( se$ti#n. The se$ti#n #+ the $#&e i!p(e!enting this re.%est is the entr se$ti#n. The $riti$a( se$ti#n is +#((#'e& * an e2it se$ti#n. The re!aining $#&e is the re!ain&er se$ti#n.

3;. Gi)e t'# har&'are instr%$ti#ns an& their &e+initi#ns 'hi$h $an *e %se& + # r i!p(e!enting !%t%a( e2$(%si#n. TestAn&Set
L

target K tr%eA ret%rn r)A

S'ap

)#i& S'ap H*##(ean ,a/ *##(ean ,*I


L

*##(ean te!p K aA a K *A * K te!pA


M

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems 3<. What is se!aph#res" A se!aph#re DSE is a s n$hr#ni8ati#n t##( 'hi$h is an integer )a(%e that/ apart
+r#! initia(i8ati#n/ is a$$esse& #n( thr#%gh t'# stan&ar& at#!i$ #perati#nsA 'ait an& signa(. Se!aph#res $an *e %se& t# &ea( 'ith the n-pr#$ess $riti$a( se$ti#n pr#*(e!.

It $an *e a(s# %se& t# s#()e )ari#%s s n$hr#ni8ati#n pr#*(e!s. The $(assi$ &e+initi#n #+ D'aitE 'ait HSI
L

'hi(e HSNKCI

S--A
M

The $(assi$ &e+initi#n #+ Dsigna(E signa( HSI


L M

SOOA

5C. =e+ine *%s 'aiting an& spin(#$0.


When a pr#$ess is in its $riti$a( se$ti#n/ an #ther pr#$ess that tries t# enter

its $riti$a( se$ti#n !%st (##p $#ntin%#%s( in the entr $#&e. This is $a((e& as *%s 'aiting an& this t pe #+ se!aph#re is a(s# $a((e& a spin(#$0/ *e$a%se the pr#$ess 'hi(e 'aiting +#r the (#$0. UNIT III 51. =e+ine &ea&(#$0.
A pr#$ess re.%ests res#%r$esA i+ the res#%r$es are n#t a)ai(a*(e at that

ti!e/ the pr#$ess enters a 'ait state. Waiting pr#$esses !a ne)er again
$hange state/ *e$a%se the res#%r$es the ha)e re.%este& are he(& * #ther

'aiting pr#$esses. This sit%ati#n is $a((e& a &ea&(#$0. 52. What is the se.%en$e in 'hi$h res#%r$es !a *e %ti(i8e&" Un&er n#r!a( !#&e #+ #perati#n/ a pr#$ess !a %ti(i8e a res#%r$e in the +#((#'ing se.%en$e@

Use@ The pr#$ess $an #perate #n the res#%r$e. Re(ease@ The pr#$ess re(eases the res#%r$e. 53. What are $#n&iti#ns %n&er 'hi$h a &ea&(#$0 sit%ati#n !a arise" A &ea&(#$0 sit%ati#n $an arise i+ the +#((#'ing +#%r $#n&iti#ns h#(& si!%(tane#%s( in a s ste!@ a. M%t%a( e2$(%si#n *. F#(& an& 'ait $. N# pre-e!pti#n &. Cir$%(ar 'ait

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

55. What is a res#%r$e-a((#$ati#n graph" =ea&(#$0s $an *e &es$ri*e& !#re pre$ise( in ter!s #+ a &ire$te& graph $a((e& a s ste! res#%r$e a((#$ati#n graph. This graph $#nsists #+ a set #+ )erti$es B an& a set #+ e&ges E. The set #+ )erti$es B is partiti#ne& int# t'# &i++erent t pes #+ n#&esA P the set $#nsisting #+ a(( a$ti)e pr#$esses in the s ste! an& R the set $#nsisting #+ a(( res#%r$e t pes in the s ste!.

CS1252-Operating Systems

55. =e+ine re.%est e&ge an& assign!ent e&ge. A &ire$te& e&ge +r#! pr#$ess Pi t# res#%r$e t pe R7 is &en#te& * Pi R7A it signi+ies that pr#$ess Pi re.%este& an instan$e #+ res#%r$e t pe R7 an& is $%rrent( 'aiting +#r that res#%r$e. A &ire$te& e&ge +r#! res#%r$e t pe R7 t# pr#$ess Pi is &en#te& * R7 Pi/ it signi+ies that an instan$e #+ res#%r$e t pe has *een a((#$ate& t# a pr#$ess Pi. A &ire$te& e&ge Pi R7 is $a((e& a re.%est e&ge. A &ire$te& e&ge R7 Pi is $a((e& an assign!ent e&ge. 59. What are the !eth#&s +#r han&(ing &ea&(#$0s" The &ea&(#$0 pr#*(e! $an *e &ea(t 'ith in #ne #+ the three 'a s@ a. Use a pr#t#$#( t# pre)ent #r a)#i& &ea&(#$0s/ ens%ring that the s ste! 'i(( ne)er enter a &ea&(#$0 state. *. A((#' the s ste! t# enter the &ea&(#$0 state/ &ete$t it an& then re$#)er. $. Ign#re the pr#*(e! a(( t#gether/ an& preten& that &ea&(#$0s ne)er #$$%r in the s ste!. 5:. =e+ine &ea&(#$0 pre)enti#n. =ea&(#$0 pre)enti#n is a set #+ !eth#&s +#r ens%ring that at (east #ne #+ the +#%r ne$essar $#n&iti#ns (i0e !%t%a( e2$(%si#n/ h#(& an& 'ait/ n# pree!pti#n an& $ir$%(ar 'ait $ann#t h#(&. 6 ens%ring that that at (east #ne #+ these $#n&iti#ns $ann#t h#(&/ the #$$%rren$e #+ a &ea&(#$0 $an *e pre)ente&. 5;. =e+ine &ea&(#$0 a)#i&an$e. An a(ternati)e !eth#& +#r a)#i&ing &ea&(#$0s is t# re.%ire a&&iti#na( in+#r!ati#n a*#%t h#' res#%r$es are t# *e re.%este&. Ea$h re.%es t re.%ires the s ste! $#nsi&er the res#%r$es $%rrent( a)ai(a*(e/ the res#%r$es $%rrent( a((#$ate& t# ea$h pr#$ess/ an& the +%t%re re.%ests an& re(eases #+ ea$h p#ssi*(e +%t%re &ea&(#$0. 5<. What are a sa+e state an& an %nsa+e state" A state is sa+e i+ the s ste! $an a((#$ate res#%r$es t# ea$h pr#$ess in s#!e #r&er an& sti(( a)#i& a &ea&(#$0. A s ste! is in sa+e state #n( i+ there e2ists a sa+e se.%en$e. A se.%en$e #+ pr#$esses NP1/P2/P.PnQ is a sa+e se.%en$e +#r the $%rrent a((#$ati#n state i+/ +#r ea$h Pi/ the res#%r$e that Pi $an sti(( re.%est $an *e satis+ie& * the $%rrent a)ai( a*(e res#%r$e p(%s the res#%r$e he(& * a(( the P7/ 'ith 7Ni. i+ n# s%$h se.%en$e e2ists/ then the s ste! state is sai& t# *e %nsa+e.

5C. What is *an0erEs a(g#rith!"

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems 6an0erEs a(g#rith! is a &ea&(#$0 a)#i&an$e a(g#rith! that is app(i$a*(e t# a res#%r$e-a((#$ati#n s ste! 'ith !%(tip(e instan$es #+ ea$h res#%r$e t pe. The t'# a(g#rith!s %se& +#r its i!p(e!entati#n are@ a. Sa+et a(g#rith!@ The a(g#rith! +#r +in&ing #%t 'hether #r n#t a s ste! is in a sa+e state. *. Res#%r$e-re.%est a(g#rith!@ i+ the res%(ting res#%r$e-a((#$ati#n is sa+e/ the transa$ti#n is $#!p(ete& an& pr#$ess Pi is a((#$ate& its res#%r$es. I+ the ne' state is %nsa+e Pi !%st 'ait an& the #(& res#%r$e-a((#$ati#n state is rest#re&. 51. =e+ine (#gi$a( a&&ress an& ph si$a( a&&ress. An a&&ress generate& * the CPU is re+erre& as (#gi$a( a&&ress. An a&&ress seen * the !e!#r %nit that is the #ne (#a&e& int# the !e!#r a&&ress register #+ the !e!#r is $#!!#n( re+erre& t# as ph si$a( a&&ress. 52. What is (#gi$a( a&&ress spa$e an& ph si$a( a&&ress spa$e" The set #+ a(( (#gi$a( a&&resses generate& * a pr#gra! is $a((e& a (#gi$a( a&&ress spa$eA the set #+ a(( ph si$a( a&&resses $#rresp#n&ing t# these (#gi$a( a&&resses is a ph si$a( a&&ress spa$e. 53. What is the !ain +%n$ti#n #+ the !e!#r -!anage!ent %nit" The r%nti!e !apping +r#! )irt%a( t# ph si$a( a&&resses is &#ne * a har&'are &e)i$e $a((e& a !e!#r !anage!ent %nit HMMUI. 55. =e+ine & na!i$ (#a&ing. T# #*tain *etter !e!#r -spa$e %ti(i8ati#n & na!i$ (#a&ing is %se&. With & na!i$ (#a&ing/ a r#%tine is n#t (#a&e& %nti( it is $a((e&. A(( r#%tines are 0ept #n &is0 in a re(#$ata*(e (#a& +#r!at. The !ain pr#gra! is (#a&e& int# !e!#r an& e2e$%te&. I+ the r#%tine nee&s an#ther r#%tine/ the $a((ing r#%tine $he$0s 'hether the r#%tine has *een (#a&e&. I+ n#t/ the re(#$ata*(e (in0ing (#a&er is $a((e& t# (#a& the &esire& pr#gra! int# !e!#r . 55. =e+ine & na!i$ (in0ing. = na!i$ (in0ing is si!i(ar t# & na!i$ (#a&ing/ rather that (#a&ing *eing p#stp#ne& %nti( e2e$%ti#n ti!e/ (in0ing is p#stp#ne&. This +eat%re is %s%a(( (i*rar r#%tine/ #r h#' t# (#a& the (i*rar i+ the r#%tine is n#t a(rea& present. 59. What are #)er(a s" T# ena*(e a pr#$ess t# *e (arger than the a!#%nt #+ !e!#r a((#$ate& t# it/ #)er(a s are %se&. The i&ea #+ #)er(a s is t# 0eep in !e!#r #n( th#se instr%$ti#ns an& &ata that are nee&e& at a gi)en ti!e. When #ther instr%$ti#ns are nee&e&/ the are (#a&e& int# spa$e #$$%pie& pre)i#%s( * instr%$ti#ns that are n# (#nger nee&e&. 5:. =e+ine s'apping. A pr#$ess nee&s t# *e in !e!#r t# *e e2e$%te&. F#'e)er a pr#$ess $an *e s'appe& te!p#rari( #%t #+ !e!#r t# a *a$0ing st#re an& then *r#%ght *a$0 int# !e!#r +#r $#ntin%e& e2e$%ti#n. This pr#$ess is $a((e&

<

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

s'apping.

CS1252-Operating Systems

5;. What are the $#!!#n strategies t# se(e$t a +ree h#(e +r#! a set #+ a)ai(a*(e h#(es" The !#st $#!!#n strategies are a. Girst +it *. 6est +it $. W#rst +it
5<. What &# #% !ean * *est +it" 6est +it a((#$ates the s!a((est h#(e that is *ig en#%gh. The entire (ist has t# *e sear$he&/ %n(ess it is s#rte& * si8e. This strateg pr#&%$es the s!a((est (e+t#)er h#(e. 9C. What &# #% !ean * +irst +it"
Girst +it a((#$ates the +irst h#(e that is *ig en#%gh. Sear$hing $an either

start at the *eginning #+ the set #+ h#(es #r 'here the pre)i#%s +irst-+it sear$h
en&e&. Sear$hing $an *e st#ppe& as s##n as a +ree h#(e that is *ig en#%gh is

+#%n&.

UNIT IB 91. What is )irt%a( !e!#r " Birt%a( !e!#r is a te$hni.%e that a((#'s the e2e$%ti#n #+ pr#$esses that !a n#t *e $#!p(ete( in !e!#r . It is the separati#n #+ %ser (#gi$a( !e!#r +r#! ph si$a( !e!#r . This separati#n pr#)i&es an e2tre!e( (arge )irt%a( !e!#r / 'hen #n( a s!a((er ph si$a( !e!#r is a)ai(a*(e. 92. What is =e!an& paging" Birt%a( !e!#r is $#!!#n( i!p(e!ente& * &e!an& paging. In &e!an& paging/ the pager *rings #n( th#se ne$essar pages int# !e!#r instea& #+ s'apping in a 'h#(e pr#$ess. Th%s it a)#i&s rea&ing int# !e!#r pages that 'i(( n#t *e %se& an 'a / &e$reasing the s'ap ti!e an& the a!#%nt #+ ph si$a( !e!#r nee&e&. 93. =e+ine (a8 s'apper. s'apper is %se&. A (a8 s'apper ne)er s'aps a page int# !e!#r %n(ess that page 'i(( *e nee&e&. 95. What is a p%re &e!an& paging" When starting e2e$%ti#n #+ a pr#$ess 'ith n# pages in !e!#r / the #perating s ste! sets the instr%$ti#n p#inter t# the +irst instr%$ti#n #+ the pr#$ess/ 'hi$h is #n a n#n-!e!#r resi&ent page/ the pr#$ess i!!e&iate( +a%(ts +#r the page. A+ter this page is *r#%ght int# !e!#r / the pr#$ess $#ntin%es t# e2e$%te/ +a%(ting as ne$essar %nti( e)er page that it nee&s is in !e!#r . At that p#int/ it $an e2e$%te 'ith n# !#re +a%(ts. This s$he!a is p%re &e!an& paging. 95. =e+ine e++e$ti)e a$$ess ti!e.

1C

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems

p 1I. The )a(%e #+ p is ?et p *e the pr#*a*i(it #+ a page +a%(t HC e2pe$te& t# *e $(#se t# CA that is/ there 'i(( *e #n( a +e' page +a%(ts. The e++e$ti)e a$$ess ti!e is E++e$ti)e a$$ess ti!e K H1-pI R !a O p R page +a%(t ti!e. !a @ !e!#r -a$$ess ti!e
99. =e+ine se$#n&ar !e!#r . This !e!#r h#(&s th#se pages that are n#t present in !ain !e!#r . The se$#n&ar !e!#r is %s%a(( a high spee& &is0. It is 0n#'n as the s'ap &e)i$e/ an& the se$ti#n #+ the &is0 %se& +#r this p%rp#se is 0n#'n as s'ap spa$e. 9:. What is the *asi$ appr#a$h #+ page rep(a$e!ent" I+ n# +ra!e is +ree is a)ai(a*(e/ +in& #ne that is n#t $%rrent( *eing %se& an& +ree it. A +ra!e $an *e +ree& * 'riting its $#ntents t# s'ap spa$e/ an& $hanging the page ta*(e t# in&i$ate that the page is n# (#nger in !e!#r . N#' the +ree& +ra!e $an *e %se& t# h#(& the page +#r 'hi$h the pr#$ess +a%(te&. 9;. What are the )ari#%s page rep(a$e!ent a(g#rith!s %se& +#r page rep(a$e!ent" GIGO page rep(a$e!ent Opti!a( page rep(a$e!ent ?RU page rep(a$e!ent ?RU appr#2i!ati#n page rep(a$e!ent C#%nting *ase& page rep(a$e!ent Page *%++ering a(g#rith!. 9<. What are the !a7#r pr#*(e!s t# i!p(e!ent &e!an& paging" The t'# !a7#r pr#*(e!s t# i!p(e!ent &e!an& paging is &e)e(#ping a. Gra!e a((#$ati#n a(g#rith! *. Page rep(a$e!ent a(g#rith! :C. What is a re+eren$e string" re+eren$e is $a((e& a re+eren$e string. :1. What is a +i(e" A +i(e is a na!e& $#((e$ti#n #+ re(ate& in+#r!ati#n that is re$#r&e& #n se$#n&ar st#rage. A +i(e $#ntains either pr#gra!s #r &ata. A +i(e has $ertain Sstr%$t%reT *ase& #n its t pe.

Gi(e attri*%tes@ Na!e/ i&enti+ier/ t pe/ si8e/ (#$ati#n/ pr#te$ti#n/ ti!e/ &ate Gi(e #perati#ns@ $reati#n/ rea&ing/ 'riting/ rep#siti#ning/ &e(eting/ tr%n$ating/ appen&ing/ rena!ing Gi(e t pes@ e2e$%ta*(e/ #*7e$t/ (i*rar / s#%r$e $#&e et$.
:2. ?ist the )ari#%s +i(e attri*%tes.

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

11

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems A +i(e has $ertain #ther attri*%tes/ 'hi$h )ar +r#! #ne #perating s ste! t# an#ther/ *%t t pi$a(( $#nsist #+ these@ Na!e/ i&enti+ier/ t pe/ (#$ati#n/ si8e/ pr#te$ti#n/ ti!e/ &ate an& %ser i&enti+i$ati#n :3. What are the )ari#%s +i(e #perati#ns" The si2 *asi$ +i(e #perati#ns are Creating a +i(e Writing a +i(e Rea&ing a +i(e Rep#siti#ning 'ithin a +i(e =e(eting a +i(e Tr%n$ating a +i(e :5. What are the in+#r!ati#n ass#$iate& 'ith an #pen +i(e" Se)era( pie$es #+ in+#r!ati#n are ass#$iate& 'ith an #pen +i(e 'hi$h !a *e@ Gi(e p#inter Gi(e #pen $#%nt =is0 (#$ati#n #+ the +i(e A$$ess rights :5. What are the &i++erent a$$essing !eth#&s #+ a +i(e" The &i++erent t pes #+ a$$essing a +i(e are@ Se.%entia( a$$ess@ In+#r!ati#n in the +i(e is a$$esse& se.%entia(( =ire$t a$$ess@ In+#r!ati#n in the +i(e $an *e a$$esse& 'ith#%t an parti$%(ar #r&er. Other a$$ess !eth#&s@ Creating in&e2 +#r the +i(e/ in&e2e& se.%entia( a$$ess !eth#& HISAMI et$. :9. What is =ire$t#r "
The &e)i$e &ire$t#r #r si!p( 0n#'n as &ire$t#r re$#r&s in+#r!ati#n-

s%$h as na!e/ (#$ati#n/ si8e/ an& t pe +#r a(( +i(es #n that parti$%(ar partiti#n. The &ire$t#r $an *e )ie'e& as a s !*#( ta*(e that trans(ates +i(e na!es int# their &ire$t#r entries. Sear$h +#r a +i(e Create a +i(e =e(ete a +i(e Rena!e a +i(e ?ist &ire$t#r Tra)erse the +i(e s ste!

:;. What are the !#st $#!!#n s$he!es +#r &e+ining the (#gi$a( str%$t%re #+ a &ire$t#r " The !#st $#!!#n s$he!es +#r &e+ining the (#gi$a( str%$t%re #+ a &ire$t#r Sing(e-?e)e( =ire$t#r T'#-(e)e( =ire$t#r Tree-Str%$t%re& =ire$t#ries Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

12

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

A$ $(i$-Graph =ire$t#ries Genera( Graph =ire$t#r

CS1252-Operating Systems

:<. =e+ine UG= an& MG=. In the t'#-(e)e( &ire$t#r str%$t%re/ ea$h %ser has her #'n %ser +i(e
&ire$t#r HUG=I. Ea$h UG= has a si!i(ar str%$t%re/ *%t (ists #n( the +i(es #+ a

sing(e %ser. When a 7#* starts the s ste!Es !aster +i(e &ire$t#r HMG=I is sear$he&. The MG= is in&e2e& * the %ser na!e #r a$$#%nt n%!*er/ an& ea$h entr p#ints t# the UG= +#r that %ser.

;C. What is a path na!e" A pathna!e is the path +r#! the r##t thr#%gh a(( s%*&ire$t#ries t# a spe$i+ie& +i(e. In a t'#-(e)e( &ire$t#r str%$t%re a %ser na!e an& a +i(e na!e &e+ine a path na!e.

UNIT B
;1. What are the )ari#%s (a ers #+ a +i(e s ste!" The +i(e s ste! is $#!p#se& #+ !an &i++erent (e)e(s. Ea$h (e)e( in the &esign %ses the +eat%re #+ the (#'er (e)e(s t# $reate ne' +eat%res +#r %se * higher (e)e(s. App(i$ati#n pr#gra!s ?#gi$a( +i(e s ste! Gi(e-#rgani8ati#n !#&%(e 6asi$ +i(e s ste! I1O $#ntr#( =e)i$es ;2. What are the str%$t%res %se& in +i(e-s ste! i!p(e!entati#n" Se)era( #n-&is0 an& in-!e!#r str%$t%res are %se& t# i!p(e!ent a +i(e s ste! a. On-&is0 str%$t%re in$(%&e 6##t $#ntr#( *(#$0 Partiti#n *(#$0

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

*. In-!e!#r str%$t%re in$(%&e In-!e!#r partiti#n ta*(e In-!e!#r &ire$t#r str%$t%re S ste!-'i&e #pen +i(e ta*(e Per-pr#$ess #pen ta*(e ;3. What are the +%n$ti#ns #+ )irt%a( +i(e s ste! HBGSI" It has t'# +%n$ti#ns a. It separates +i(e-s ste!-generi$ #perati#ns +r#! their i!p(e!entati#n

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

+i(e s ste!s !#%nte& (#$a(( . *. BGS is *ase& #n a +i(e representati#n str%$t%re/ $a((e& a )n#&e. It $#ntains a n%!eri$a( )a(%e +#r a net'#r0-'i&e %ni.%e +i(e .The 0erne( !aintains #ne )n#&e str%$t%re +#r ea$h a$ti)e +i(e #r &ire$t#r .

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

13

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems ;5. =e+ine see0 ti!e an& (aten$ ti!e. The ti!e ta0en * the hea& t# !#)e t# the appr#priate $ (in&er #r tra$0 is $a((e& see0 ti!e. On$e the hea& is at right tra$0/ it !%st 'ait %nti( the &esire& *(#$0 r#tates %n&er the rea&- 'rite hea&. This &e(a is (aten$ ti!e. ;5. What are the a((#$ati#n !eth#&s #+ a &is0 spa$e" Three !a7#r !eth#&s #+ a((#$ating &is0 spa$e 'hi$h are 'i&e( in %se are a. C#ntig%#%s a((#$ati#n *. ?in0e& a((#$ati#n $. In&e2e& a((#$ ati#n ;9. What are the a&)antages #+ C#ntig%#%s a((#$ati#n" The a&)antages are a. S%pp#rts &ire$t a$$ess *. S%pp#rts se.%entia( a$$ess $. N%!*er #+ &is0 see0s is !ini!a(. ;:. What are the &ra'*a$0s #+ $#ntig%#%s a((#$ati#n #+ &is0 spa$e" The &isa&)antages are a. S%++ers +r#! e2terna( +rag!entati#n *. S%++ers +r#! interna( +rag!entati#n $. =i++i$%(t in +in&ing spa$e +#r a ne' +i(e &. Gi(e $ann#t *e e2ten&e& e. Si8e #+ the +i(e is t# *e &e$(are& in a&)an$e ;;. What are the a&)antages #+ ?in0e& a((#$ati#n" The a&)antages are a. N# e2terna( +rag!entati#n *. Si8e #+ the +i(e &#es n#t nee& t# *e &e$(are& ;<. What are the &isa&)antages #+ (in0e& a((#$ati#n" The &isa&)antages are a. Use& #n( +#r se.%entia( a$$ess #+ +i(es. <C. What are the a&)antages #+ In&e2e& a((#$ati#n" The a&)antages are a. N# e2terna(-+rag!entati#n pr#*(e! *. S#()es the si8e-&e$(arati#n pr#*(e!s. $. S%pp#rts &ire$t a$$ess <1. F#' $an the in&e2 *(#$0s *e i!p(e!ente& in the in&e2e& a((#$ati#n s$he!e" The in&e2 *(#$0 $an *e i!p(e!ente& as +#((#'s a. ?in0e& s$he!e *. M%(ti(e)e( s$he!e $. C#!*ine& s$he!e

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

15

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems <2. =e+ine r#tati#na( (aten$ an& &is0 *an&'i&th. R#tati#na( (aten$ is the a&&iti#na( ti!e 'aiting +#r the &is0 t# r#tate the &esire& se$t#r t# the &is0 hea&. The &is0 *an&'i&th is the t#ta( n%!*er #+
* tes trans+erre&/ &i)i&e& * the ti!e *et'een the +irst re.%est +#r ser)i$e an&

the $#!p(eti#n #+ the (ast trans+er. <3. F#' +ree-spa$e is !anage& %sing *it )e$t#r i!p(e!entati#n" The +ree-spa$e (ist is i!p(e!ente& as a *it !ap #r *it )e$t#r. Ea$h *(#$0 is represente& * 1 *it. I+ the *(#$0 is +ree/ the *it is 1A i+ the *(#$0 is a((#$ate&/ the *it is C. <5. =e+ine *%++ering. A *%++er i s a !e!#r area that st#res &ata 'hi(e the are trans+erre& *et'een t'# &e)i$es #r *et'een a &e)i$e an& an app(i$ati#n. 6%++ering is &#ne +#r three reas#ns a. T# $#pe 'ith a spee& !is!at$h *et'een the pr#&%$er an& $#ns%!er #+ a &ata strea! *. T# a&apt *et'een &e)i$es that ha)e &i++erent &ata-trans+er si8es $. T# s%pp#rt $#p se!anti$s +#r app(i$ati#n I1O <5. =e+ine $a$hing. A $a$he is a regi#n #+ +ast !e!#r that h#(&s $#pies #+ &ata. A$$ess t# the $a$he& $#p is !#re e++i$ient than a$$ess t# the #rigina(. Ca$hing an& *%++ering are &istin$t +%n$ti#ns/ *%t s#!eti!es a regi#n #+ !e!#r $an *e %se& +#r *#th p%rp#ses. <9. =e+ine sp##(ing. A sp##( is a *%++er that h#(&s #%tp%t +#r a &e)i$e/ s%$h as printer/ that $ann#t a$$ept inter(ea)e& &ata strea!s. When an app(i$ati#n +inishes printing/ the sp##(ing s ste! .%e%es the $#rresp#n&ing sp##( +i(e +#r #%tp%t t# the printer. The sp##(ing s ste! $#pies the .%e%e& sp##( +i(es t# the printer #ne at a ti!e. <:. What are the )ari#%s &is0-s$he&%(ing a(g#rith!s" $. SCAN S$he&%(ing &. C-SCAN S$he&%(ing e. ?OO4 s$he&%(ing <;. What is (#'-(e)e( +#r!atting" 6e+#re a &is0 $an st#re &ata/ it !%st *e &i)i&e& int# se$t#rs that the &is0 $#ntr#((er $an rea& an& 'rite. This pr#$ess is $a((e& (#'-(e)e( +#r!atting #r ph si$a( +#r!atting. ?#'-(e)e( +#r!atting +i((s the &is0 'ith a spe$ia( &ata str%$t%re +#r ea$h se$t#r. The &ata str%$t%re +#r a se$t#r $#nsists #+ a hea&er/ a &ata area/ an& a trai(er. <<. What is the %se #+ *##t *(#$0"

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

15

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems G#r a $#!p%ter t# start r%nning 'hen p#'ere& %p #r re*##te& it nee&s t# ha)e an initia( pr#gra! t# r%n. This *##tstrap pr#gra! ten&s t# *e si!p(e. It +in&s the #perating s ste! #n the &is0 (#a&s that 0erne( int# !e!#r an& 7%!ps t# an initia( a&&ress t# *egin the #perating s ste! e2e$%ti#n. The +%(( *##tstrap pr#gra! is st#re& in a partiti#n $a((e& the *##t *(#$0s/ at +i2e& (#$ati#n #n the &is0. A &is0 that has *##t partiti#n is $a((e& *##t &is0 #r s ste! &is0. 1CC.What is se$t#r sparing" ?#'-(e)e( +#r!atting a(s# sets asi&e spare se$t#rs n#t )isi*(e t# the #perating s ste!. The $#ntr#((er $an *e t#(& t# rep(a$e ea$h *a& se$t#r (#gi$a(( 'ith #ne #+ the spare se$t#rs. This s$he!e is 0n#'n as se$t#r sparing #r +#r'ar&ing.

S I>TEEN MAR4 UUESTIONS WITF FINTS


1. E2p(ain the )ari#%s t pes #+ $#!p%ter s ste!s. Main+ra!e s ste!s =es0t#p s ste!s M%(tipr#$ess#r s ste!s =istri*%te& s ste!s C(%stere& s ste!s Rea(-ti!e s ste!s Fan&he(& s ste!s

2. E2p(ain h#' pr#te$ti#n is pr#)i&e& +#r the har&'are res#%r$es * the #perating s ste!. =%a( !#&e #perati#n I1O pr#te$ti#n 'ith &iagra! Me!#r pr#te$ti#n 'ith &iagra! CPU pr#te$ti#n
3. What are the s ste! $#!p#nents #+ an #perating s ste! an& e2p(ain the!" I1O !anage!ent Se$#n&ar st#rage !anage!ent Net'#r0ing Pr#te$ti#n s ste! C#!!an&-interpreter s ste! 5. Write a*#%t the )ari#%s s ste! $a((s. Pr#$ess $#ntr#( Gi(e !anage!ent =e)i$e !anage!ent In+#r!ati#n !aintenan$e C#!!%ni$ati#n

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

19

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

5. What are the )ari#%s pr#$ess s$he&%(ing $#n$epts S$he&%(ing .%e%es 'ith &iagra! U%e%eing &iagra! S$he&%(ers C#nte2t s'it$h 'ith &iagra! 9. E2p(ain a*#%t interpr#$ess $#!!%ni$ati#n. Message-passing s ste! Na!ing =ire$t $#!!%ni$ati#n In&ire$t $#!!%ni$ati#n S n$hr#ni8ati#n 6%++ering :. Gi)e an #)er)ie' a*#%t threa&s. Threa& &e+initi#n M#ti)ati#n =iagra! 6ene+its User an& 0erne( threa&s ;. E2p(ain in &etai( a*#%t the threa&ing iss%es. The +#r0 an& e2e$ s ste! $a((s Can$e((ati#n Signa( han&(ing Threa&s p##(s Threa&-spe$i+i$ &ata <. Write a*#%t the )ari#%s CPU s$he&%(ing a(g#rith!s. Girst-$#!e/ +irst-ser)e& s$he&%(ing Sh#rtest-7#*-+irst s$he&%(ing Pri#rit S$he&%(ing R#%n&-r#*in s$he&%(ing M%(ti(e)e( .%e%e s$he&%(ing F#!#gene#%s s ste!s ?#a& sharing Se(+-s$he&%(ing Res#%r$e reser)ati#n Pri#rit in)ersi#n Pri#rit inheritan$e pr#t#$#( =ispat$h (aten$ 'ith &iagra!

CS1252-Operating Systems

11. What is $riti$a( se$ti#n pr#*(e! an& e2p(ain t'# pr#$ess s#(%ti#ns an& !%(tip(e pr#$ess s#(%ti#ns" Criti$a( se$ti#n pr#*(e! &e+initi#n T'# pr#$ess s#(%ti#ns A(g#rith! 1/ 2 , 3 Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

1:

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems

12. E2p(ain 'hat se!aph#res are/ their %sage/ i!p(e!entati#n gi)en t# a)#i& *%s 'aiting an& *inar se!aph#res. Se!aph#re &e+initi#n Usage +#r !%t%a( e2$(%si#n an& pr#$ess s n$hr#ni8ati#n I!p(e!entati#n t# a)#i& spin(#$0 %sing *(#$0 an& 'a0e%p 6inar se!aph#res
13. E2p(ain the $(assi$ pr#*(e!s #+ s n$hr#ni8ati#n. The *#%n&e&-*%++er pr#*(e! 'ith str%$t%re The rea&ers-'riters pr#*(e! 'ith str%$t%re The &ining-phi(#s#phers pr#*(e! 'ith str%$t%re 15. Write a*#%t $riti$a( regi#ns an& !#nit#rs. Criti$a( regi#n &e+initi#n I!p(e!entati#n #+ the $#n&iti#na(-regi#n $#nstr%$t M#nit#r &e+initi#n S nta2 #+ !#nit#r S$he!ati$ )ie' #+ !#nit#rs M#nit#r 'ith $#n&iti#n )aria*(es M#nit#r s#(%ti#n t# &ining-phi(#s#pher pr#*(e! 15. Gi)e a &etai(e& &es$ripti#n a*#%t &ea&(#$0s an& its $hara$teri8ati#n =ea&(#$0 &e+initi#n =ea&(#$0 $#n&iti#ns M%t%a( e2$(%si#n F#(& an& 'ait N# pre-e!pti#n Cir$%(ar 'ait Res#%r$e a((#$ati#n graph 19. E2p(ain a*#%t the !eth#&s %se& t# pre)ent &ea&(#$0s Ens%re that at (east #ne #+ the +#((#'ing &#es n#t h#(& Cir$%(ar 'ait 1:. Write in &etai( a*#%t &ea&(#$0 a)#i&an$e. Sa+e state an& sa+e se.%en$e =iagra! +#r sa+e/ %nsa+e , &ea&(#$0 states Res#%r$e-a((#$ati#n graph a(g#rith! 1;. E2p(ain the 6an0erEs a(g#rith! +#r &ea&(#$0 a)#i&an$e. =ea&(#$0 a)#i&an$e &e+initi#n =ata str%$t%res %se& Sa+et a(g#rith! Res#%r$e re.%est a(g#rith! E2a!p(e

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

1;

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems 1<. Gi)e an a$$#%nt a*#%t &ea&(#$0 &ete$ti#n. Sing(e instan$e #+ ea$h res#%r$e t pe Wait-+#r graph Se)era( instan$es #+ a res#%r$e t pe =ete$ti#n-a(g#rith! %sage 2C. What are the !eth#&s in)#() e& in re$#)er +r#! &ea&(#$0s" Pr#$ess ter!inati#n Res#%r$e pre-e!pti#n 21. E2p(ain a*#%t $#ntig%#%s !e!#r a((#$ati#n. C#ntig%#%s a((#$ati#n Me!#r pr#te$ti#n 'ith &iagra! Me!#r a((#$ati#n Girst +it 6est +it W#rst +it Grag!entati#n 22. Gi)e the *asi$ $#n$epts a*#%t paging. Paging &e+initi#n 6asi$ !eth#&- page/ +ra!e/ page ta*(e/ page n%!*er , page #++set Paging har&'are &iagra! T?6 'ith &iagra! Pr#te$ti#n- pr#te$ti#n *its , )a(i&-in)a(i& *its 23. Write a*#%t the te$hni.%es +#r str%$t%ring the page ta*(e. Fierar$hi$a( paging- t'#-(e)e( , !%(ti-(e)e( 'ith &iagra! Fashe& page ta*(e 'ith &iagra! In)erte& page ta*(e 'ith &iagra! 25. E2p(ain the *asi$ $#n$epts #+ seg!entati#n. User )ie' #+ pr#gra! Grag!entati#n 25. What is &e!an& paging an& 'hat is its %se" =e!an& paging &e+initi#n Birt%a( !e!#r i!p(e!entati#n ?a8 s'apper/ page +a%(t/ p%re &e!an& paging/ )a(i&-in)a(i& *it =iagra!s 29. E2p(ain the )ari#%s page rep(a$e!ent strategies. Page rep(a$e!ent-*asi$ s$he!e 'ith &iagra! GIGO page rep(a$e!ent Opti!a( page rep(a$e!ent ?RU page rep(a$e!ent

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

1<

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

CS1252-Operating Systems ?RU appr#2i!ati#n page rep(a$e!ent C#%nting-*ase& page rep(a$e!ent Page *%++ering a(g#rith! 2:. What is thrashing an& e2p(ain the !eth#&s t# a)#i& thrashing" Thrashing &e+initi#n Ca%se #+ thrashing W#r0ing set !#&e( Page-+a%(t +re.%en$ 2;. What are +i(es an& e2p(ain the a$$ess !eth#&s +#r +i(es" Gi(e &e+initi#n Attri*%tes/ #perati#ns an& t pes Se.%entia( a$$ess 'ith &iagra! =ire$t a$$ess Other a$$ess !eth#&s-in&e2 'ith &iagra! 2<. E2p(ain the s$he!es +#r &e+ining the (#gi$a( str%$t%re #+ a &ire$t#r . Sing(e (e)e( &ire$t#r 'ith &iagra! T'# (e)e( &ire$t#r 'ith &iagra! Tree str%$t%re& &ire$t#r 'ith &iagra! A$ $(i$-graph &ire$t#r 'ith &iagra! Genera( graph &ire$t#r 'ith &iagra! 3C. Write n#tes a*#%t the pr#te$ti#n strategies pr#)i&e& +#r +i(es. T pes #+ a$$ess A$$ess $#ntr#(-A$$ess $#ntr#( (ist HAC?I Three $(assi+i$ati#ns-#'ner/ gr#%p , %ni)erse Other pr#te$ti#n appr#a$hes-pass'#r&s 31. E2p(ain the a((#$ati#n !eth#&s +#r &is0 spa$e. C#ntig%#%s a((#$ati#n a&)antage/ &isa&)antage , &iagra! ?in0e& a((#$ati#n a&)antage/ &isa&)antage , &iagra! In&e2e& a((#$ati#n a&)antage/ &isa&)antage , &iagra! 6it )e$t#r 'ith e2a!p(e ?in0e& (ist 'ith &iagra! Gr#%ping C#%nting 33. Write a*#%t the 0erne( I1O s%*s ste!. I1O s$he&%(ing 6%++ering Ca$hing Sp##(ing , &e)i$e reser)ati#n Err#r han&(ing 4erne( &ata str%$t%res

Two Mar !uestions wit" Answers # Si$teen Mar !uestions wit" %ints

2C

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

VVCET-DEPARTMENT OF INFORMATION TECHNOLOGY-OPERATING SYSTEM/II/CSE/IV SEMESTER

35. E2p(ain the )ari#%s &is0 s$he&%(ing te$hni.%es GCGS s$he&%(ing SSTG s$he&%(ing SCAN s$he&%(ing C-SCAN s$he&%(ing ?OO4 s$he&%(ing

CS1252-Operating Systems

35. Write n#tes a*#%t &is0 !anage!ent an& s'ap-spa$e !anage!ent. =is0 +#r!atting-(#' (e) e( +#r!atting 6##t *(#$0 -*##tstrap (#a&er/ *##t *(#$0/ *##t &is0 , s ste! &is0 6a& *(#$0s-se$t#r sparing/ se$t#r s(ipping S'ap-spa$e %se S'ap-spa$e (#$ati#n S'ap-spa$e !anage!ent

21

DEDICATED TO MY BELOVED STUDENTS AND TO MY DEPARTMENT V.RAMESH M.E.,MBA., AP/IT

Das könnte Ihnen auch gefallen