Anda di halaman 1dari 20

OPERATINGSYSTEM

PARTA
1.WhatisanOperatingsystem?
Anoperatingsystemisaprogramthatmanagesthecomputer
hardware.Italsoprovidesabasisforapplicationprogramsand
actasanintermediarybetweenauserofacomputerandthe
computerhardware.Itcontrolsandcoordinatestheuseofthe
hardwareamongthevariousapplicationprogramsforthevarious
users.
2.WhyistheOperatingSystemviewedasaresourceallocator&control
program?
Acomputersystemhasmanyresourceshardware&software
thatmayberequiredtosolveaproblem,likeCPUtime,memory
space,filestoragespace,I/Odevices&soon.TheOSactsasa
managerfortheseresourcessoitisviewedasaresource
allocator.TheOSisviewedasacontrolprogrambecauseit
managestheexecutionofuserprogramstopreventerrors&
improperuseofthecomputer.
3.WhatistheKernel?
AmorecommondefinitionisthattheOSistheoneprogram
runningatalltimesonthecomputer,usuallycalledthekernel,
withallelsebeingapplicationprograms.
4.WhatareBatchsystems?
Batchsystemsarequiteappropriateforexecutinglarge
jobsthatneedlittleinteraction.Theusercansubmitjobsand
returnlaterfortheresults.Itisnotnecessarytowaitwhile
thejobisprocessed.Operatorsbatchedtogetherjobswith
similarneedsandranthemthroughthecomputerasagroup.
5.WhatistheadvantageofMultiprogramming?
MultiprogrammingincreasesCPUutilizationbyorganizing
jobssothattheCPUalwayshasonetoexecute.Severaljobsare
placedinthemainmemoryandtheprocessorisswitchedfromjob
tojobasneededtokeepseveraljobsadvancingwhilekeepingthe
peripheraldevicesinuse.Multiprogrammingisthefirstinstance
wheretheOperatingsystemmustmakedecisionsfortheusers.
Thereforetheyarefairlysophisticated.
6.WhatisanInteractivecomputersystem?
Interactivecomputersystemprovidesdirectcommunication
betweentheuserandthesystem.Theusergivesinstructionsto
theoperatingsystemortoaprogramdirectly,usingakeyboard
ormouse,andwaitsforimmediateresults.
7.WhatdoyoumeanbyTimesharingsystems?
Timesharingormultitaskingisalogicalextensionof
multiprogramming.Itallowsmanyuserstosharethecomputer
simultaneously.TheCPUexecutesmultiplejobsbyswitchingamong

them,buttheswitchesoccursofrequentlythattheuserscan
interactwitheachprogramwhileitisrunning.
8.Whataremultiprocessorsystems&givetheiradvantages?
Multiprocessorsystemsalsoknownasparallelsystemsor
tightlycoupledsystemsaresystemsthathavemorethanone
processorinclosecommunication,sharingthecomputerbus,the
clockandsometimesmemory&peripheraldevices.Theirmain
advantagesare
Increasedthroughput
Economyofscale
Increasedreliability
9.Whatarethedifferenttypesofmultiprocessing?
Symmetricmultiprocessing(SMP):InSMPeachprocessorruns
anidenticalcopyoftheOs&thesecopiescommunicatewithone
anotherasneeded.Allprocessorsarepeers.ExamplesareWindows
NT,Solaris,DigitalUNIX,OS/2&Linux.
Asymmetricmultiprocessing:Eachprocessorisassigneda
specifictask.Amasterprocessorcontrolsthesystem;theother
processorslooktothemasterforinstructionsorpredefined
tasks.Itdefinesamasterslaverelationship.ExampleSunOS
Version4.
10.Whatisgracefuldegradation?
Inmultiprocessorsystems,failureofoneprocessorwill
nothaltthesystem,butonlyslowitdown.Ifthereareten
processors&ifonefailstheremainingnineprocessorspickup
theworkofthefailedprocessor.Thisabilitytocontinue
providingserviceisproportionaltothesurvivinghardwareis
calledgracefuldegradation.
11.WhatisDualModeOperation?
Thedualmodeoperationprovidesuswiththemeansfor
protectingtheoperatingsystemfromwrongusersandwrongusers
fromoneanother.Usermodeandmonitormodearethetwomodes.
Monitormodeisalsocalledsupervisormode,systemmodeor
privilegedmode.Modebitisattachedtothehardwareofthe
computertoindicatethecurrentmode.Modebitis'0'for
monitormodeand'1'forusermode.
12.Whatareprivilegedinstructions?
Someofthemachineinstructionsthatmaycauseharmtoa
systemaredesignatedasprivilegedinstructions.Thehardware
allowstheprivilegedinstructionstobeexecutedonlyinmonitor
mode.
13.Howcanauserprogramdisruptthenormaloperationsofasystem?
Auserprogrammaydisruptthenormaloperationofasystem
by
IssuingillegalI/Ooperations
ByaccessingmemorylocationswithintheOSitself

RefusingtorelinquishtheCPU
14.Howistheprotectionformemoryprovided?
Theprotectionagainstillegalmemoryaccessisdoneby
usingtworegisters.Thebaseregisterandthelimitregister.
Thebaseregisterholdsthesmallestlegalphysicaladdress;the
limitregistercontainsthesizeoftherange.Thebaseandlimit
registerscanbeloadedonlybytheOSusingspecialprivileged
instructions.
15.WhatarethevariousOScomponents?
Thevarioussystemcomponentsare
Processmanagement
Mainmemorymanagement
Filemanagement
I/Osystemmanagement
Secondarystoragemanagement
Networking
Protectionsystem
Commandinterpretersystem
16.Whatisaprocess?
Aprocessisaprograminexecution.Itistheunitofwork
inamodernoperatingsystem.Aprocessisanactiveentitywith
aprogramcounterspecifyingthenextinstructionstoexecuteand
asetofassociatedresources.Italsoincludestheprocess
stack,containingtemporarydataandadatasectioncontaining
globalvariables.
17.Whatisaprocessstateandmentionthevariousstatesofaprocess?
Asaprocessexecutes,itchangesstate.Thestateofa
processisdefinedinpartbythecurrentactivityofthat
process.Eachprocessmaybeinoneofthefollowingstates:
New
Running
Waiting
Ready
Terminated
18.Whatisprocesscontrolblock?
Eachprocessisrepresentedintheoperatingsystembya
processcontrolblockalsocalledataskcontrolblock.It
containsmanypiecesofinformationassociatedwithaspecific
process.Itsimplyactsasarepositoryforanyinformationthat
mayvaryfromprocesstoprocess.Itcontainsthefollowing
information:
Processstate
Programcounter
CPUregisters
CPUschedulinginformation
Memorymanagementinformation

Accountinginformation
I/Ostatusinformation
19.Whataretheuseofjobqueues,readyqueues&devicequeues?
Asaprocessentersasystem,theyareputintoajob
queue.Thisqueueconsistsofalljobsinthesystem.The
processesthatareresidinginmainmemoryandareready&
waitingtoexecutearekeptonalistcalledreadyqueue.The
listofprocesseswaitingforaparticularI/Odeviceiskeptin
thedevicequeue.
20.Whatismeantbycontextswitch?
SwitchingtheCPUtoanotherprocessrequiressavingthe
stateoftheoldprocessandloadingthesavedstateforthenew
process.Thistaskisknownascontextswitch.Thecontextofa
processisrepresentedinthePCBofaprocess.
21.Whatisathread?
Athreadotherwisecalledalightweightprocess(LWP)isa
basicunitofCPUutilization,itcomprisesofathreadid,a
programcounter,aregistersetandastack.Itshareswithother
threadsbelongingtothesameprocessitscodesection,data
section,andoperatingsystemresourcessuchasopenfilesand
signals.
22.Whatarethebenefitsofmultithreadedprogramming?
Thebenefitsofmultithreadedprogrammingcanbebroken
downintofourmajorcategories:
Responsiveness
Resourcesharing
Economy
Utilizationofmultiprocessorarchitectures
23.Compareuserthreadsandkernelthreads.
Userthreads
Userthreadsaresupportedabovethekernelandare
implementedbyathreadlibraryattheuserlevel.Thread
creation&schedulingaredoneintheuserspace,without
kernelintervention.Thereforetheyarefasttocreateand
manageblockingsystemcallwillcausetheentireprocess
toblock
Kernelthreads
Kernelthreadsaresupporteddirectlybythe
operatingsystem.Threadcreation,schedulingand
managementaredonebytheoperatingsystem.Thereforetheyare
slowertocreate&managecomparedtouserthreads.Ifthethread
performsablockingsystemcall,thekernelcanschedule
anotherthreadintheapplicationforexecution
24.Whatistheuseofforkandexecsystemcalls?
Forkisasystemcallbywhichanewprocessiscreated.
Execisalsoasystemcall,whichisusedafteraforkbyoneof

thetwoprocessestoreplacetheprocessmemoryspacewithanew
program.
25.Definethreadcancellation&targetthread.
Thethreadcancellationisthetaskofterminatingathread
beforeithascompleted.Athreadthatistobecancelledis
oftenreferredtoasthetargetthread.
Forexample,ifmultiplethreadsareconcurrentlysearching
throughadatabaseandonethreadreturnstheresult,the
remainingthreadsmightbecancelled.
26.Whatarethedifferentwaysinwhichathreadcanbecancelled?
Cancellationofatargetthreadmayoccurintwodifferent
scenarios:
Asynchronouscancellation:Onethreadimmediately
terminatesthetargetthreadiscalledasynchronouscancellation.
Deferredcancellation:Thetargetthreadcanperiodically
checkifitshouldterminate,allowingthetargetthreadan
opportunitytoterminateitselfinanorderlyfashion.
27.DefineCPUscheduling.
CPUschedulingistheprocessofswitchingtheCPUamong
variousprocesses.CPUschedulingisthebasisofmultiprogrammed
operatingsystems.ByswitchingtheCPUamongprocesses,the
operatingsystemcanmakethecomputermoreproductive.
28.Whatispreemptiveandnonpreemptivescheduling?
UndernonpreemptiveschedulingoncetheCPUhasbeen
allocatedtoaprocess,theprocesskeepstheCPUuntilit
releasestheCPUeitherbyterminatingorswitchingtothe
waitingstate.Preemptiveschedulingcanpreemptaprocesswhich
isutilizingtheCPUinbetweenitsexecutionandgivetheCPUto
anotherprocess.
29.WhatisaDispatcher?
ThedispatcheristhemodulethatgivescontroloftheCPU
totheprocessselectedbytheshorttermscheduler.This
functioninvolves:
Switchingcontext
Switchingtousermode
Jumpingtotheproperlocationintheuserprogramtorestart
thatprogram.
30.Whatisdispatchlatency?
Thetimetakenbythedispatchertostoponeprocessand
startanotherrunningisknownasdispatchlatency.
31.WhatarethevariousschedulingcriteriaforCPUscheduling?
Thevariousschedulingcriteriaare
CPUutilization
Throughput
Turnaroundtime
Waitingtime

Responsetime
32.Definethroughput?
ThroughputinCPUschedulingisthenumberofprocesses
thatarecompletedperunittime.Forlongprocesses,thisrate
maybeoneprocessperhour;forshorttransactions,throughput
mightbe10processespersecond.
33.Whatisturnaroundtime?
Turnaroundtimeistheintervalfromthetimeofsubmission
tothetimeofcompletionofaprocess.Itisthesumofthe
periodsspentwaitingtogetintomemory,waitingintheready
queue,executingontheCPU,anddoingI/O.
34.Defineracecondition.
Whenseveralprocessaccessandmanipulatesamedata
concurrently,thentheoutcomeoftheexecutiondependson
particularorderinwhichtheaccesstakesplaceiscalledrace
condition.Toavoidracecondition,onlyoneprocessatatime
canmanipulatethesharedvariable.
35.Whatiscriticalsectionproblem?
Considerasystemconsistsof'n'processes.Eachprocess
hassegmentofcodecalledacriticalsection,inwhichthe
processmaybechangingcommonvariables,updatingatable,
writingafile.Whenoneprocessisexecutinginitscritical
section,nootherprocesscanallowedtoexecuteinitscritical
section.
36.Whataretherequirementsthatasolutiontothecriticalsection
problemmustsatisfy?
Thethreerequirementsare
Mutualexclusion
Progress
Boundedwaiting
37.Defineentrysectionandexitsection.
Thecriticalsectionproblemistodesignaprotocolthat
theprocessescanusetocooperate.Eachprocessmustrequest
permissiontoenteritscriticalsection.Thesectionofthecode
implementingthisrequestistheentrysection.Thecritical
sectionisfollowedbyanexitsection.Theremainingcodeisthe
remaindersection.
38.Givetwohardwareinstructionsandtheirdefinitionswhichcanbe
usedforimplementingmutualexclusion.
TestAndSet
booleanTestAndSet(boolean&target)
{
booleanrv=target;
target=true;
returnrv;
}

Swap
voidSwap(boolean&a,boolean&b)
{
booleantemp=a;
a=b;
b=temp;
}
39.Whatissemaphores?
Asemaphore'S'isasynchronizationtoolwhichisan
integervaluethat,apartfrominitialization,isaccessedonly
throughtwostandardatomicoperations;waitandsignal.
Semaphorescanbeusedtodealwiththenprocesscritical
sectionproblem.Itcanbealsousedtosolvevarious
synchronizationproblems.Theclassicdefinitionof'wait'
wait(S)
{
while(S<=0)
;
S;
}
Theclassicdefinitionof'signal'
signal(S)
{
S++;
}
40.Definebusywaitingandspinlock.
Whenaprocessisinitscriticalsection,anyother
processthattriestoenteritscriticalsectionmustloop
continuouslyintheentrycode.Thisiscalledasbusy
waitingandthistypeofsemaphoreisalsocalledaspinlock,
becausetheprocesswhilewaitingforthelock.
41.Definedeadlock.
Aprocessrequestsresources;iftheresourcesarenot
availableatthattime,theprocessentersawaitstate.Waiting
processesmayneveragainchangestate,becausetheresources
theyhaverequestedareheldbyotherwaitingprocesses.This
situationiscalledadeadlock.
42.Whatisthesequenceinwhichresourcesmaybeutilized?
Undernormalmodeofoperation,aprocessmayutilizea
resourceinthefollowingsequence:
Request:Iftherequestcannotbegrantedimmediately,
thentherequestingprocessmustwaituntilitcanacquirethe
resource.
Use:Theprocesscanoperateontheresource.
Release:Theprocessreleasestheresource.
43.Whatareconditionsunderwhichadeadlocksituationmayarise?

Adeadlocksituationcanariseifthefollowingfour
conditionsholdsimultaneouslyinasystem:
a.Mutualexclusion
b.Holdandwait
c.Nopreemption
44.Whatisaresourceallocationgraph?
Deadlockscanbedescribedmorepreciselyintermsofa
directedgraphcalledasystemresourceallocationgraph.This
graphconsistsofasetofverticesVandasetofedgesE.The
setofverticesVispartitionedintotwodifferenttypesof
nodes;Pthesetconsistingofallactiveprocessesinthe
systemandRthesetconsistingofallresourcetypesinthe
system.
45.Definerequestedgeandassignmentedge.
AdirectededgefromprocessPitoresourcetypeRjis
denotedbyPiRj;itsignifiesthatprocessPirequestedan
instanceofresourcetypeRjandiscurrentlywaitingforthat
resource.AdirectededgefromresourcetypeRjtoprocessPiis
denotedbyRjPi,itsignifiesthataninstanceofresourcetype
hasbeenallocatedtoaprocessPi.AdirectededgePiRjis
calledarequestedge.AdirectededgeRjPiiscalledan
assignmentedge.
46.Whatarethemethodsforhandlingdeadlocks?
Thedeadlockproblemcanbedealtwithinoneofthethree
ways:
a.Useaprotocoltopreventoravoiddeadlocks,ensuringthat
thesystemwillneverenteradeadlockstate.
b.Allowthesystemtoenterthedeadlockstate,detectitand
thenrecover.
c.Ignoretheproblemalltogether,andpretendthatdeadlocks
neveroccurinthesystem.
47.Definedeadlockprevention.
Deadlockpreventionisasetofmethodsforensuringthat
atleastoneofthefournecessaryconditionslikemutual
exclusion,holdandwait,nopreemptionandcircularwaitcannot
hold.Byensuringthatthatatleastoneoftheseconditions
cannothold,theoccurrenceofadeadlockcanbeprevented.
48.Definedeadlockavoidance.
Analternativemethodforavoidingdeadlocksistorequire
additionalinformationabouthowresourcesaretoberequested.
Eachrequestrequiresthesystemconsidertheresourcescurrently
available,theresourcescurrentlyallocatedtoeachprocess,and
thefuturerequestsandreleasesofeachprocess,todecide
whetherthecouldbesatisfiedormustwaittoavoida
possiblefuturedeadlock.
49.Whatareasafestateandanunsafestate?

Astateissafeifthesystemcanallocateresourcesto
eachprocessinsomeorderandstillavoidadeadlock.Asystem
isinsafestateonlyifthereexistsasafesequence.Asequence
ofprocesses<P1,P2,....Pn>isasafesequenceforthecurrent
allocationstateif,foreachPi,theresourcethatPicanstill
requestcanbesatisfiedbythecurrentavailableresourceplus
theresourceheldbyallthePj,withj<i.ifnosuchsequence
exists,thenthesystemstateissaidtobeunsafe.
50.Whatisbanker'salgorithm?
Banker'salgorithmisadeadlockavoidancealgorithmthat
isapplicabletoaresourceallocationsystemwithmultiple
instancesofeachresourcetype.
Thetwoalgorithmsusedforitsimplementationare:
a.Safetyalgorithm:Thealgorithmforfindingoutwhether
ornotasystemisinasafestate.
b.Resourcerequestalgorithm:iftheresultingresource
allocationissafe,thetransactioniscompletedandprocessPi
isallocateditsresources.IfthenewstateisunsafePimust
waitandtheoldresourceallocationstateisrestored.
51.Definelogicaladdressandphysicaladdress.
AnaddressgeneratedbytheCPUisreferredaslogical
address.Anaddressseenbythememoryunitthatistheone
loadedintothememoryaddressregisterofthememoryiscommonly
referredtoasphysicaladdress.
52.Whatislogicaladdressspaceandphysicaladdressspace?
Thesetofalllogicaladdressesgeneratedbyaprogramis
calledalogicaladdressspace;thesetofallphysicaladdresses
correspondingtotheselogicaladdressesisaphysicaladdress
space.
53.Whatisthemainfunctionofthememorymanagementunit?
Theruntimemappingfromvirtualtophysicaladdressesis
donebyahardwaredevicecalledamemorymanagementunit(MMU).
54.Definedynamicloading.
Toobtainbettermemoryspaceutilizationdynamicloading
isused.Withdynamicloading,aroutineisnotloadeduntilit
iscalled.Allroutinesarekeptondiskinarelocatableload
format.Themainprogramisloadedintomemoryandexecuted.If
theroutineneedsanotherroutine,thecallingroutinechecks
whethertheroutinehasbeenloaded.Ifnot,therelocatable
linkingloaderiscalledtoloadthedesiredprogramintomemory.
55.Definedynamiclinking.
Dynamiclinkingissimilartodynamicloading,ratherthat
loadingbeingpostponeduntilexecutiontime,linkingis
postponed.Thisfeatureisusuallyusedwithsystemlibraries,
suchaslanguagesubroutinelibraries.Astubisincludedinthe
imageforeachlibraryroutinereference.Thestubisasmall

pieceofcodethatindicateshowtolocatetheappropriate
memoryresidentlibraryroutine,orhowtoloadthelibraryif
theroutineisnotalreadypresent.
56.Whatareoverlays?
Toenableaprocesstobelargerthantheamountofmemory
allocatedtoit,overlaysareused.Theideaofoverlaysisto
keepinmemoryonlythoseinstructionsanddatathatareneeded
atagiventime.Whenotherinstructionsareneeded,theyare
loadedintospaceoccupiedpreviouslybyinstructionsthatareno
longerneeded.
57.Defineswapping.
Aprocessneedstobeinmemorytobeexecuted.Howevera
processcanbeswappedtemporarilyoutofmemorytoabacking
storeandthenbroughtbackintomemoryforcontinuedexecution.
Thisprocessiscalledswapping.
58.Whatarethecommonstrategiestoselectafreeholefromasetof
availableholes?
Themostcommonstrategiesare
a.Firstfit
b.Bestfit
c.Worstfit
59.Whatdoyoumeanbybestfit?
Bestfitallocatesthesmallestholethatisbigenough.
Theentirelisthastobesearched,unlessitissortedbysize.
Thisstrategyproducesthesmallestleftoverhole.
60.Whatdoyoumeanbyfirstfit?
Firstfitallocatesthefirstholethatisbigenough.
Searchingcaneitherstartatthebeginningofthesetofholes
orwherethepreviousfirstfitsearchended.Searchingcanbe
stoppedassoonasafreeholethatisbigenoughisfound.
61.Whatisvirtualmemory?
Virtualmemoryisatechniquethatallowstheexecutionof
processesthatmaynotbecompletelyinmemory.Itisthe
separationofuserlogicalmemoryfromphysicalmemory.This
separationprovidesanextremelylargevirtualmemory,whenonly
asmallerphysicalmemoryisavailable.
62.WhatisDemandpaging?
Virtualmemoryiscommonlyimplementedbydemandpaging.In
demandpaging,thepagerbringsonlythosenecessarypagesinto
memoryinsteadofswappinginawholeprocess.Thusitavoids
readingintomemorypagesthatwillnotbeusedanyway,
decreasingtheswaptimeandtheamountofphysicalmemory
needed.
63.Definelazyswapper.
Ratherthanswappingtheentireprocessintomainmemory,a
lazyswapperisused.Alazyswapperneverswapsapageinto

memoryunlessthatpagewillbeneeded.
64.Whatisapuredemandpaging?
Whenstartingexecutionofaprocesswithnopagesin
memory,theoperatingsystemsetstheinstructionpointertothe
firstinstructionoftheprocess,whichisonanonmemory
residentpage,theprocessimmediatelyfaultsforthepage.After
thispageisbroughtintomemory,theprocesscontinuesto
execute,faultingasnecessaryuntileverypagethatitneedsis
inmemory.Atthatpoint,itcanexecutewithnomorefaults.
Thisschemaispuredemandpaging.
65.Defineeffectiveaccesstime.
Letpbetheprobabilityofapagefault(0p1).Thevalue
ofpisexpectedtobecloseto0;thatis,therewillbeonlya
fewpagefaults.Theeffectiveaccesstimeis
Effectiveaccesstime=(1p)*ma+p*pagefaulttime.
ma:memoryaccesstime
66.Definesecondarymemory.
Thismemoryholdsthosepagesthatarenotpresentinmain
memory.Thesecondarymemoryisusuallyahighspeeddisk.Itis
knownastheswapdevice,andthesectionofthediskusedfor
thispurposeisknownasswapspace.
67.Whatisthebasicapproachofpagereplacement?
Ifnoframeisfreeisavailable,findonethatisnot
currentlybeingusedandfreeit.Aframecanbefreedbywriting
itscontentstoswapspace,andchangingthepagetableto
indicatethatthepageisnolongerinmemory.
Nowthefreedframecanbeusedtoholdthepageforwhich
theprocessfaulted.
68.Whatarethevariouspagereplacementalgorithmsusedforpage
replacement?
FIFOpagereplacement
Optimalpagereplacement
LRUpagereplacement
LRUapproximationpagereplacement
Countingbasedpagereplacement
Pagebufferingalgorithm.
69.Whatarethemajorproblemstoimplementdemandpaging?
Thetwomajorproblemstoimplementdemandpagingis
developing
a.Frameallocationalgorithm
b.Pagereplacementalgorithm
70.Whatisareferencestring?
Analgorithmisevaluatedbyrunningitonaparticular
stringofmemoryreferencesandcomputingthenumberofpage
faults.Thestringofmemoryreferenceiscalledareference
string.

71.Whatisafile?
Afileisanamedcollectionofrelatedinformationthatis
recordedonsecondarystorage.Afilecontainseitherprogramsor
data.Afilehascertain"structure"basedonitstype.
Fileattributes:Name,identifier,type,size,location,
protection,time,dateFileoperations:creation,reading,
writing,repositioning,deleting,truncating,appending,renaming
Filetypes:executable,object,library,sourcecodeetc.
72.Listthevariousfileattributes.
Afilehascertainotherattributes,whichvaryfromone
operatingsystemtoanother,buttypicallyconsistofthese:
Name,identifier,type,location,size,protection,time,date
anduseridentification
73.Whatarethevariousfileoperations?
Thesixbasicfileoperationsare
Creatingafile
Writingafile
Readingafile
Repositioningwithinafile
Deletingafile
Truncatingafile
74.Whataretheinformationassociatedwithanopenfile?
Severalpiecesofinformationareassociatedwithanopen
filewhichmaybe:
Filepointer
Fileopencount
Disklocationofthefile
Accessrights
75.Whatarethedifferentaccessingmethodsofafile?
Thedifferenttypesofaccessingafileare:
Sequentialaccess:Informationinthefileisaccessed
sequentially
Directaccess:Informationinthefilecanbeaccessedwithout
anyparticularorder.
Otheraccessmethods:Creatingindexforthefile,indexed
sequentialaccessmethod(ISAM)etc.
76.WhatisDirectory?
Thedevicedirectoryorsimplyknownasdirectoryrecords
informationsuchasname,location,size,andtypeforallfiles
onthatparticularpartition.Thedirectorycanbeviewedasa
symboltablethattranslatesfilenamesintotheirdirectory
entries.
77.Whataretheoperationsthatcanbeperformedonadirectory?
Theoperationsthatcanbeperformedonadirectoryare
SearchforafileCreateafileDeleteRenameListdirectoryTraversethefilesystem
78.Whatarethemostcommonschemesfordefiningthelogicalstructure

ofadirectory?
Themostcommonschemesfordefiningthelogicalstructure
ofadirectory
SingleLevelDirectory
TwolevelDirectory
TreeStructuredDirectories
AcyclicGraphDirectories
GeneralGraphDirectory
79.DefineUFDandMFD.
Inthetwoleveldirectorystructure,eachuserhasherown
userfiledirectory(UFD).EachUFDhasasimilarstructure,but
listsonlythefilesofasingleuser.Whenajobstartsthe
system'smasterfiledirectory(MFD)issearched.TheMFDis
indexedbytheusernameoraccountnumber,andeachentrypoints
totheUFDforthatuser.
80.Whatisapathname?
Apathnameisthepathfromtherootthroughall
subdirectoriestoaspecifiedfile.Inatwoleveldirectory
structureausernameandafilenamedefineapathname.
81.Whatarethevariouslayersofafilesystem?
Thefilesystemiscomposedofmanydifferentlevels.Each
levelinthedesignusesthefeatureofthelowerlevelsto
createnewfeaturesforusebyhigherlevels.
Applicationprograms
Logicalfilesystem
Fileorganizationmodule
Basicfilesystem
I/Ocontrol
Devices
82.Whatarethestructuresusedinfilesystemimplementation?
Severalondiskandinmemorystructuresareusedto
implementafilesystem
a.Ondiskstructureinclude
Bootcontrolblock
Partitionblock
Directorystructureusedtoorganizethefiles
Filecontrolblock(FCB)
b.Inmemorystructureinclude
Inmemorypartitiontable
Inmemorydirectorystructure
Systemwideopenfiletable
Perprocessopentable
83.Whatarethefunctionsofvirtualfilesystem(VFS)?
Ithastwofunctions
a.Itseparatesfilesystemgenericoperationsfromtheir
implementationdefiningacleanVFSinterface.Itallows

transparentaccesstodifferenttypesoffilesystemsmountedlocally.
b.VFSisbasedonafilerepresentationstructure,calleda
vnode.Itcontainsanumericalvalueforanetworkwideunique
file.Thekernelmaintainsonevnodestructureforeachactive
fileordirectory.
84.Defineseektimeandlatencytime.
Thetimetakenbytheheadtomovetotheappropriate
cylinderortrackiscalledseektime.Oncetheheadisatright
track,itmustwaituntilthedesiredblockrotatesunderthe
readwritehead.Thisdelayislatencytime.
85.Whataretheallocationmethodsofadiskspace?
Threemajormethodsofallocatingdiskspacewhichare
widelyinuseare
a.Contiguousallocation
b.Linkedallocation
c.Indexedallocation
86.WhataretheadvantagesofContiguousallocation?
Theadvantagesare
a.Supportsdirectaccess
b.Supportssequentialaccess
c.Numberofdiskseeksisminimal.
87.Whatarethedrawbacksofcontiguousallocationofdiskspace?
Thedisadvantagesare
a.Suffersfromexternalfragmentation
b.Suffersfrominternalfragmentation
c.Difficultyinfindingspaceforanewfile
d.Filecannotbeextended
e.Sizeofthefileistobedeclaredinadvance
88.WhataretheadvantagesofLinkedallocation?
Theadvantagesare
a.Noexternalfragmentation
b.Sizeofthefiledoesnotneedtobedeclared
89.Whatarethedisadvantagesoflinkedallocation?
Thedisadvantagesare
a.Usedonlyforsequentialaccessoffiles.
b.Directaccessisnotsupported
c.Memoryspacerequiredforthepointers.
d.Reliabilityiscompromisedifthepointersarelostordamaged
90.WhataretheadvantagesofIndexedallocation?
Theadvantagesare
a.Noexternalfragmentationproblem
b.Solvesthesizedeclarationproblems.
c.Supportsdirectaccess
91.Howcantheindexblocksbeimplementedintheindexedallocation
scheme?
Theindexblockcanbeimplementedasfollows

a.Linkedscheme
b.Multilevelscheme
c.Combinedscheme
92.Definerotationallatencyanddiskbandwidth.
Rotationallatencyistheadditionaltimewaitingforthe
disktorotatethedesiredsectortothediskhead.Thedisk
bandwidthisthetotalnumberofbytestransferred,dividedby
thetimebetweenthefirstrequestforserviceandthecompletion
ofthelasttransfer.
93.Howfreespaceismanagedusingbitvectorimplementation?
Thefreespacelistisimplementedasabitmaporbit
vector.Eachblockisrepresentedby1bit.Iftheblockisfree,
thebitis1;iftheblockisallocated,thebitis0.
94.Definebuffering.
Abufferisamemoryareathatstoresdatawhiletheyare
transferredbetweentwodevicesorbetweenadeviceandan
application.Bufferingisdoneforthreereasons
a.Tocopewithaspeedmismatchbetweentheproducerand
consumerofadatastream
b.Toadaptbetweendevicesthathavedifferentdata
transfersizes
c.TosupportcopysemanticsforapplicationI/O
95.Definecaching.
Acacheisaregionoffastmemorythatholdscopiesof
data.Accesstothecachedcopyismoreefficientthanaccessto
theoriginal.Cachingandbufferingaredistinctfunctions,but
sometimesaregionofmemorycanbeusedforbothpurposes.
96.Definespooling.
Aspoolisabufferthatholdsoutputforadevice,suchas
printer,thatcannotacceptinterleaveddatastreams.Whenan
applicationfinishesprinting,thespoolingsystemqueuesthe
correspondingspoolfileforoutputtotheprinter.Thespooling
systemcopiesthequeuedspoolfilestotheprinteroneata
time.
97.Whatarethevariousdiskschedulingalgorithms?
Thevariousdiskschedulingalgorithmsare
a.FirstComeFirstServedScheduling
b.ShortestSeekTimeFirstScheduling
c.SCANScheduling
d.CSCANScheduling
f.LOOKscheduling
98.Whatislowlevelformatting?
Beforeadiskcanstoredata,itmustbedividedinto
sectorsthatthediskcontrollercanreadandwrite.Thisprocess
iscalledlowlevelformattingorphysicalformatting.Lowlevel
formattingfillsthediskwithaspecialdatastructureforeach

sector.Thedatastructureforasectorconsistsofaheader,
adataarea,andatrailer.
99.Whatistheuseofbootblock?
Foracomputertostartrunningwhenpowereduporrebooted
itneedstohaveaninitialprogramtorun.Thisbootstrap
programtendstobesimple.Itfindstheoperatingsystemonthe
diskloadsthatkernelintomemoryandjumpstoaninitial
addresstobegintheoperatingsystemexecution.Thefull
bootstrapprogramisstoredinapartitioncalledtheboot
blocks,atfixedlocationonthedisk.Adiskthathasboot
partitioniscalledbootdiskorsystemdisk.
100.Whatissectorsparing?
Lowlevelformattingalsosetsasidesparesectorsnot
visibletotheoperatingsystem.Thecontrollercanbetoldto
replaceeachbadsectorlogicallywithoneofthesparesectors.
Thisschemeisknownassectorsparingorforwarding.
PARTB,C
1.Explainthevarioustypesofcomputersystems.
Mainframesystems
Desktopsystems
Multiprocessorsystems
Distributedsystems
Clusteredsystems
Realtimesystems
Handheldsystems
2.Explainhowprotectionisprovidedforthehardwareresourcesbytheoperating
system.
Dualmodeoperation
I/Oprotectionwithdiagram
Memoryprotectionwithdiagram
CPUprotection
3.Whatarethesystemcomponentsofanoperatingsystemandexplainthem?
Processmanagement
Mainmemorymanagement
Filemanagement
I/Omanagement
Secondarystoragemanagement
Networking
Protectionsystem
Commandinterpretersystem
4.Writeaboutthevarioussystemcalls.
Processcontrol
Filemanagement
Devicemanagement
Informationmaintenance

Communication
5.Whatarethevariousprocessschedulingconcepts
Schedulingqueueswithdiagram
Queueingdiagram
Schedulers
Contextswitchwithdiagram
6.Explainaboutinterprocesscommunication.
Messagepassingsystem
Naming
Directcommunication
Indirectcommunication
Synchronization
Buffering
7.Giveanoverviewaboutthreads.
Threaddefinition
Motivation
Diagram
Benefits
Userandkernelthreads
8.Explainindetailaboutthethreadingissues.
Theforkandexecsystemcalls
Cancellation
Signalhandling
Threadspools
Threadspecificdata
9.WriteaboutthevariousCPUschedulingalgorithms.
Firstcome,firstservedscheduling
Shortestjobfirstscheduling
PriorityScheduling
Roundrobinscheduling
Multilevelqueuescheduling
Multilevelfeedbackqueuescheduling
10.Writenotesaboutmultipleprocessorschedulingandrealtimescheduling.
Homogeneoussystems
Loadsharing
Selfscheduling
Resourcereservation
Priorityinversion
Priorityinheritanceprotocol
Dispatchlatencywithdiagram
11.Whatiscriticalsectionproblemandexplaintwoprocesssolutionsand
multipleprocesssolutions?
Criticalsectionproblemdefinition
Twoprocesssolutions
Algorithm1,2&3
Multipleprocesssolutionwithalgorithm

12.Explainwhatsemaphoresare,theirusage,implementationgiventoavoid
busywaitingandbinarysemaphores.
Semaphoredefinition
Usageformutualexclusionandprocesssynchronization
Implementationtoavoidspinlockusingblockandwakeup
Binarysemaphores
13.Explaintheclassicproblemsofsynchronization.
Theboundedbufferproblemwithstructure
Thereaderswritersproblemwithstructure
Thediningphilosophersproblemwithstructure
14.Writeaboutcriticalregionsandmonitors.
Criticalregiondefinition
Implementationoftheconditionalregionconstruct
Monitordefinition
Syntaxofmonitor
Schematicviewofmonitors
Monitorwithconditionvariables
Monitorsolutiontodiningphilosopherproblem
15.Giveadetaileddescriptionaboutdeadlocksanditscharacterization
Deadlockdefinition
Deadlockconditions
Mutualexclusion
Holdandwait
Nopreemption
Circularwait
Resourceallocationgraph
16.Explainaboutthemethodsusedtopreventdeadlocks
Ensurethatatleastoneofthefollowingdoesnothold
Mutualexclusion
Holdandwait
Nopreemption
Circularwait
17.Writeindetailaboutdeadlockavoidance.
Safestateandsafesequence
Diagramforsafe,unsafe&deadlockstates
Resourceallocationgraphalgorithm
18.ExplaintheBanker'salgorithmfordeadlockavoidance.
Deadlockavoidancedefinition
Datastructuresused
Safetyalgorithm
Resourcerequestalgorithm
19.Giveanaccountaboutdeadlockdetection.
Singleinstanceofeachresourcetype
Waitforgraph
Severalinstancesofaresourcetype
Detectionalgorithmusage

20.Whatarethemethodsinvolvedinrecoveryfromdeadlocks?
Processtermination
Resourcepreemption
21.Explainaboutcontiguousmemoryallocation.
Contiguousallocation
Memoryprotectionwithdiagram
Memoryallocation
Firstfit
Bestfit
Worstfit
Fragmentation
22.Givethebasicconceptsaboutpaging.
Pagingdefinition
Basicmethodpage,frame,pagetable,pagenumber&pageoffset
Paginghardwarediagram
TLBwithdiagram
Protectionprotectionbits&validinvalidbits
23.Writeaboutthetechniquesforstructuringthepagetable.
Hierarchicalpagingtwolevel&multilevelwithdiagram
Hashedpagetablewithdiagram
Invertedpagetablewithdiagram
24.Explainthebasicconceptsofsegmentation.
Userviewofprogram
Segmentationdefinition
Hardwareusedwithdiagramsegmenttable,base,limit&offset
Protectionandsharingwithdiagram
Fragmentation
25.Whatisdemandpagingandwhatisitsuse?
Demandpagingdefinition
Virtualmemoryimplementation
Lazyswapper,pagefault,puredemandpaging,validinvalidbit
Diagrams
26.Explainthevariouspagereplacementstrategies.
Pagereplacementbasicschemewithdiagram
FIFOpagereplacement
Optimalpagereplacement
LRUpagereplacement
LRUapproximationpagereplacement
Countingbasedpagereplacement
Pagebufferingalgorithm
27.Whatisthrashingandexplainthemethodstoavoidthrashing?
Thrashingdefinition
Causeofthrashing
Workingsetmodel
Pagefaultfrequency
28.Whatarefilesandexplaintheaccessmethodsforfiles?

Filedefinition
Attributes,operationsandtypes
Sequentialaccesswithdiagram
Directaccess
Otheraccessmethodsindexwithdiagram
29.Explaintheschemesfordefiningthelogicalstructureofadirectory.
Singleleveldirectorywithdiagram
Twoleveldirectorywithdiagram
Treestructureddirectorywithdiagram
Acyclicgraphdirectorywithdiagram
Generalgraphdirectorywithdiagram
30.Writenotesabouttheprotectionstrategiesprovidedforfiles.
Typesofaccess
Accesscontrollist(ACL)
Threeclassificationsowner,group&universe
Otherprotectionapproachespasswords
31.Explaintheallocationmethodsfordiskspace.
Contiguousallocationadvantage,disadvantage&diagram
Linkedallocationadvantage,disadvantage&diagram
Indexedallocationadvantage,disadvantage&diagram
Performance
32.Whatarethevariousmethodsforfreespacemanagement?
Bitvectorwithexample
Linkedlistwithdiagram
Grouping
Counting
33.WriteaboutthekernelI/Osubsystem.
I/Oscheduling
Buffering
Caching
Spooling&devicereservation
Errorhandling
Kerneldatastructures
34.Explainthevariousdiskschedulingtechniques
FCFSscheduling
SSTFscheduling
SCANscheduling
CSCANscheduling
LOOKscheduling
35.Writenotesaboutdiskmanagementandswapspacemanagement.
Diskformattinglowlevelformatting
Bootblockbootstraploader,bootblock,bootdisk&systemdisk
Badblockssectorsparing,sectorslipping
Swapspaceuse
Swapspacelocation
Swapspacemanagement