ccs335-cc-unit-ii-cloud-computing-unit-2-notes
ccs335-cc-unit-ii-cloud-computing-unit-2-notes
computerscience(AnnaUniversity)
Scantoopenon Studocu
UNITIIVIRTUALIZATION
BASICS
VirtualMachineBasics:
1.ExplainindetailaboutvirtualMachineanditstypesVirtu
alMachine:
VirtualMachinecanbedefinedasanemulationofthecomputersystemsincomputing.VirtualM
achineisbasedoncomputerarchitectures.Italsogivesthefunctionalityofphysicalcomputers.Theimple
mentationofVMmayconsiderspecializedsoftware,hardware,oracombinationofboth.
VirtualMachineBasicsTounderstandwhatavirtualmachineis,wemustfirstdiscusswhatis
meant by machine, and, as pointed out earlier, the meaning of “machine” is a matter of
perspective.Fromtheperspectiveofaprocessexecutingauserprogram,themachineconsistsofalogical
memoryaddressspacethathasbeenassignedtotheprocess,alongwithuser-
levelregistersandinstructionsthatallowtheexecutionofcodebelongingtotheprocess.
TheI/
Opartofthemachineisvisibleonlythroughtheoperatingsystem,andtheonlywaytheprocesscaninterac
twiththeI/
Osystemisviaoperatingsystemcalls,oftenthroughlibrariesthatexecuteaspartoftheprocess.Processes
areusuallytransientinnature(althoughnotalways).Theyarecreated,executeforaperiodoftime,perha
psspawnotherprocessesalongtheway,andeventuallyterminate.
Tosummarize,themachine,fromtheprospectiveofaprocess,isacombinationoftheoperatingsys
temandtheunderlyinguser-
levelhardware.TheABIprovidestheinterfacebetweentheprocessandthemachine.
Asystemisafullexecutionenvironmentthatcansimultaneouslysupportanumberofprocessesp
otentiallybelongingtodifferentusers.AlltheprocessesshareafilesystemandotherI/
Oresources.Thesystemenvironmentpersistsovertime(withoccasionalreboots)asprocessescomean
dgo.ThesystemallocatesphysicalmemoryandI/
OresourcestotheprocessesandallowstheprocessestointeractwiththeirresourcesviaanOSthatisparto
fthesystem.Hence,the
PreparedBy,N.Gobinathan,AP/CSE Page1
Downloaded by Aniimee Raghupathy
IIICSE CCS335-CloudComputing
machine,fromtheperspectiveofasystem,isimplementedbytheunderlyinghardwarealone,andtheISA
providestheinterfacebetweenthesystemandthemachine.
Fig:2.1VirtualMachines
TaxonomyofVirtualMachines:
ATaxonomyWehavejustdescribedaratherbroadarrayofVMs,withdifferentgoalsandimpleme
ntations.Toputtheminperspectiveandorganizethecommonimplementationissues,weintroduceatax
onomyillustratedinFigure2.2.
First,VMsaredividedintothetwomajortypes:processVMsandsystemVMs.Inthefirsttype,theV
MsupportsanABI—userinstructionsplussystemcalls;inthesecond,theVMsupportsacompleteISA—
bothuserandsysteminstructions.Finerdivisionsinthetaxonomyarebasedonwhethertheguestandhos
tusethesameISA.
Ontheleft-
handsideofFiguresareprocessVMs.TheseincludeVMswherethehostandguestinstructionsetsarethes
ame.Inthefigure,weidentifytwoexamples.Thefirstismultiprogrammedsystems,asalready supported
on most of today’s systems. The second is same-
ISAdynamicbinaryoptimizers,whichtransformguestinstructionsonlybyoptimizingthemandthenexe
cutethemnatively.ForprocessVMswheretheguestandhostISAsaredifferent,wealsogivetwoexamples
.ThesearedynamictranslatorsandHLLVMs.HLLVMsareconnectedtotheVMtaxonomyviaa“dottedline
”becausetheirprocess-
levelinterfaceisatadifferent,higherlevelthantheotherprocessVMs.Ontheright-
handsideofthefigurearesystemVMs.Iftheguestandhostuse the same ISA, examples include “classic”
system VMs and hosted VMs. In these VMs, the
objectiveisprovidingreplicated,isolatedsystemenvironments.
TheprimarydifferencebetweenclassicandhostedVMsistheVMMimplementationratherthanth
efunctionprovidedtotheuser.ExamplesofsystemVMswheretheguestandhostISAsaredifferentinclud
ewhole-systemVMsandcodesignedVMs.Withwhole-systemVMs,performanceis
PreparedBy,N.Gobinathan,AP/CSE Page2
oftenofsecondaryimportancecomparedtoaccuratefunctionality,whilewithcodesignedVMs,perform
ance(andpowerefficiency)areoftenmajorgoals.Inthefigure,codesignedVMsareconnectedusingdotte
dlinesbecausetheirinterfaceistypicallyatalowerlevelthanothersystemVMs.
Fig2.2ATaxonomyofVirtualMachines
TypesofVirtualMachines:Youcanclassifyvirtualmachinesintotwotypes:
1. SystemVirtualMachine:Thesetypesofvirtualmachinesgivesuscompletesystemplatformandgive
stheexecutionofthecompletevirtualoperatingsystem.Justlikevirtualbox,systemvirtualmachineispro
vidinganenvironmentforanOStobeinstalledcompletely.Wecanseeinbelowimagethatourhardwareof
RealMachineisbeingdistributedbetweentwosimulatedoperatingsystemsbyVirtualmachinemonitor.
Andthensomeprograms,processesaregoingoninthatdistributedhardwareofsimulatedmachinessep
arately.
PreparedBy,N.Gobinathan,AP/CSE Page3
2. ProcessVirtualMachine:Whileprocessvirtualmachines,unlikesystemvirtualmachine,doesnotpr
ovideuswiththefacilitytoinstallthevirtualoperatingsystemcompletely.Ratheritcreatesvirtualenviro
nmentofthatOSwhileusingsomeapporprogramandthisenvironmentwillbedestroyedassoonasweexi
tfromthatapp.Likeinbelowimage,therearesomeappsrunningonmainOSaswellsomevirtualmachines
arecreatedtorunotherapps.ThisshowsthatasthoseprogramsrequireddifferentOS,processvirtualma
chineprovidedthemwiththatforthetimebeingthoseprogramsarerunning.Example–
WinesoftwareinLinuxhelpstorunWindowsapplications.
VirtualMachineLanguage:It’stypeoflanguage whichcanbeunderstoodbydifferentoperating
systems.Itisplatform-
independent.Justliketorunanyprogramminglanguage(C,python,orjava)weneedspecificcompilertha
tactuallyconvertsthatcodeintosystemunderstandablecode(alsoknownasbytecode).Thesamevirtual
machinelanguageworks.Ifwewanttousecodethatcanbeexecutedondifferenttypesofoperatingsyste
mslike(Windows,Linux,etc)thenvirtualmachinelanguagewillbehelpful.
HYPERVISOR:
2. ExplainindetailaboutHardwarebasedVirtualization.
(or)GivetheVirtualizationStructureandExplainthevarioustypesofVirtualization.(May-2023)
EachinstanceofoperatingsystemcalledVirtualMachine(VM)andoperatingsystemrunsinsidevir
tualmachineiscalledguestoperatingsystem.Dependingonthepositionofthevirtualizationlayer,the
rearetwoclassesofVMarchitectures,namelythehypervisorarchitectureslikebare-metalorhost-
based.ThehypervisoristhesoftwareusedfordoingvirtualizationalsoknownastheVMM(VirtualMac
hineMonitor).ThehypervisorsoftwareprovidestwodifferentstructuresofVirtualizationnamelyHo
stedstructure(alsocalledType
PreparedBy,N.Gobinathan,AP/CSE Page4
2Virtualization)andBare-Metalstructure(alsocalledType1Virtualization).
HostedStructure(TypeII)(Hypervisor)
Inhostedstructure,theguestOSandapplicationsrunonthetopofbaseorhostOSwiththehelpofVM
M(calledHypervisor).TheVMMstaysbetweenthebaseOSandguestOS.Thisapproachprovidesbetter
compatibilityofhardwarebecausethebaseOSis
responsibleforprovidinghardwaredriverstoguestOSinsteadoftheVMM.Inthistype,hypervisorhast
orelyonhostOSforpassthroughpermissionstoaccesshardware.Inmanycases,hostedhypervisornee
dsemulator,whichliesbetweenguestOSandVMMtotranslatetheinstructionsinnativeformat.Theho
stedstructureisshowninFig.2.2.1.
Fig.2.2.1HostedStructure(TypeIIHypervisor)
ToimplementHostedstructure,abaseOSneedstobeinstalledfirstoverwhichVMMcanbeinstalled.
ThehostedstructureissimplesolutiontorunmultipledesktopOSindependently.Fig.
2.2.2(a)and(b)showsWindowsrunningonLinuxbaseOSandLinuxrunningonWindowsbaseOSusingh
ostedHypervisor
PreparedBy,N.Gobinathan,AP/CSE Page5
Fig.2.2.2HostedHypervisors
ThepopularhostedhypervisorsareQEMU,VMwareWorkstation,MicrosoftVirtualPC,OracleVir
tualBoxetc.
Theadvantagesofhostedstructureare
Itiseasytoinstallandmanagewithoutdisturbinghostsystemshardware.
Itsupportslegacyoperatingsystemsandapplications.
Itprovideseaseofusewithgreaterhardwarecompatibility.
ItdoesnotrequiretoinstallanydriversforIOdevicesastheyareinstalledthroughbuilt-
indriverstack.
Itcanbeusedfortestingbetasoftware.
Thehostedhypervisorsareusuallyfreesoftwareandcanberunonuserworkstations.
Thedisadvantagesofhostedstructureare
ItdoesnotallowguestOStodirectlyaccessthehardwareinsteadithastogothroughbase
OS,whichincreasesresourceoverhead.
Ithasveryslowanddegradedvirtualmachinesperformanceduetorelyingonintermedi
atehostOSforgettinghardwareaccess.
Itdoesn’tscaleupbeyondthelimit.
PreparedBy,N.Gobinathan,AP/CSE Page6
Bare-MetalStructure(TypeI)(or)NaïveBareMetalStructure:
InBare-
MetalStructure,theVMMcanbedirectlyinstalledonthetopofHardware,thereforenointermedia
tehostOSisneeded.TheVMMcandirectlycommunicatewiththehardwareanddoesnotrelyonth
ehostsystemforpassthroughpermissionwhichresultsinbetterperformance,scalabilityandst
ability.TheBare-MetalstructureisshowninFig.
2.2.3.(SeeFig.2.2.3onnextpage).
Bare-
metalvirtualizationismostlyusedinenterprisedatacentersforgettingtheadvancedfeatureslik
eresourcepooling,highavailability,disasterrecoveryandsecurity.
Fig.2.2.3Bare-MetalStructure(Type-IHypervisor)
PreparedBy,N.Gobinathan,AP/CSE Page7
Fig.2.2.4Bare-MetalXenServerHypervisor
ThepopularBare-MetalHypervisorsareCitrixXenServer,VMwareESXIandMicrosoftHyperV.
TheadvantagesofBare-Metalstructureare
Itisfasterinperformanceandmoreefficienttouse.
Itprovidesenterprisefeatureslikehighscalability,disasterrecoveryandhighavailabilit
y.
Ithashighprocessingpowerduetotheresourcepooling.
ImplementationLevelsofVirtualization
3. Discussindetailaboutthecategoriesofhardwarevirtualizationdependingonimplement
ationtechnologies.Nov/
Dec2021(or)DiscusshowVirtualizationimplementedindifferentlayersofcloudindetail.
(May-2022)
Thevirtualizationisimplementedatvariouslevelsbycreatingasoftwareabstractionlayerbetwee
nhostOSandGuestOS.Themainfunctionofsoftwarelayeristovirtualizephysicalhardwareofhostmac
hineintovirtualresourcesusedbyVMsbyusingvariousoperationallayers.Thedifferentlevelsatwhic
hthevirtualizationcanbeimplementedisshowninFig.2.3.1.Therearefiveimplementationlevelsofvi
rtualization,thatareInstructionSetArchitecture(ISA)level,Hardwarelevel,OperatingSystemlevel,
LibrarysupportlevelandApplicationlevel
PreparedBy,N.Gobinathan,AP/CSE Page8
whichareexplainedasfollows.
1) InstructionSetArchitectureLevel
Virtualizationattheinstructionsetarchitecturelevelisimplementedbyemulatinganinstructio
nsetarchitecturecompletelyonsoftwarestack.Anemulatortriestoexecuteinstructionsissued
bytheguestmachine(thevirtualmachinethatisbeingemulated)bytranslatingthemtoasetofna
tiveinstructionsandthenexecutingthemontheavailablehardware.
Fig.2.3.1ImplementationLevelsofVirtualization
Thatisemulatorworksbytranslatinginstructionsfromtheguestplatformtoinstructionsofthe
hostplatform.Theseinstructionswouldincludebothprocessororiented(add,sub,jumpetc.),a
ndtheI/Ospecific(IN/
OUT)instructionsforthedevices.Althoughthisvirtualmachinearchitectureworksfineinterm
sofsimplicityandrobustness,ithasitsownprosandcons.
TheadvantagesofISAare,itprovideseaseofimplementationwhiledealingwithmultipleplatfor
msanditcaneasilyprovideinfrastructurethroughwhichonecancreatevirtualmachinesbased
onx86platformssuchasSparcandAlpha.ThedisadvantageofISAissinceeveryinstructionissued
bytheemulatedcomputerneedstobeinterpretedinsoftwarefirstwhichdegradestheperforma
nce.
PreparedBy,N.Gobinathan,AP/CSE Page9
ThepopularemulatorsofISAlevelvirtualizationare:
a) Boochs
Itisahighlyportableemulatorthatcanberunonmostpopularplatformsthatincludex86,PowerPC,
Alpha,Sun,andMIPS.Itcanbecompiledtoemulatemostoftheversionsofx86machinesincluding386,4
86,Pentium,PentiumProorAMD64CPU,includingoptionalMMX,SSE,SSE2,and3DNowinstructions.
b) QEMU
QEMU(QuickEmulator)isafastprocessoremulatorthatusesaportabledynamictranslator.Itsupp
ortstwooperatingmodes:userspaceonly,andfullsystememulation.Intheearliermode,QEMUcanlau
nchLinuxprocessescompiledforoneCPUonanotherCPU,orforcross-compilationandcross-
debugging.Inthelatermode,itcanemulateafullsystemthatincludesaprocessorandseveralperipher
aldevices.Itsupportsemulationofanumberofprocessorarchitecturesthatincludesx86,ARM,Power
PC,andSparc.
c) Crusoe
TheCrusoeprocessorcomeswithadynamicx86emulator,calledcodemorphingenginethatcanexe
cuteanyx86basedapplicationontopofit.TheCrusoeisdesignedto
handlethex86ISA’spreciseexceptionsemanticswithoutconstrainingspeculativescheduling.Thisi
saccomplishedbyshadowingallregistersholdingthex86state.
d) BIRD
BIRDisaninterpretationengineforx86binariesthatcurrentlysupportsonlyx86asthehostISAand
aimstoextendforotherarchitecturesaswell.Itexploitsthesimilaritybetweenthearchitecturesandtr
iestoexecuteasmanyinstructionsaspossibleonthenativehardware.Allotherinstructionsaresuppor
tedthroughsoftwareemulation.
2) HardwareAbstractionLayer
VirtualizationattheHardwareAbstractionLayer(HAL)exploitsthesimilarityinarchitectures
oftheguestandhostplatformstocutdowntheinterpretationlatency.Thetimespentininstructi
oninterpretationofguestplatformtohostplatformisreducedby
PreparedBy,N.Gobinathan,AP/CSE Page10
takingthesimilaritiesexistbetweenthemVirtualizationtechniquehelpsmapthevirtualresour
cestophysicalresourcesandusethenativehardwareforcomputationsinthevirtualmachine.T
hisapproachgeneratesavirtualhardwareenvironmentwhichvirtualizesthecomputerresour
ceslikeCPU,MemoryandIOdevices.
ForthesuccessfulworkingofHALtheVMmustbeabletotrapeveryprivilegedinstructionexecut
ionandpassittotheunderlyingVMM,becausemultipleVMsrunningownOSmightissueprivileg
edinstructionsneedfullattentionofCPU’s.IfitisnotmanagedproperlythenVMmayissuestrapr
atherthangeneratinganexceptionthatmakescrashingofinstructionissenttotheVMM.Howev
er,themostpopularplatform,x86,isnotfully-
virtualizable,becauseitisbeenobservedthatcertainprivilegedinstructionsfailsilentlyrathert
hantrappedwhenexecutedwithinsufficientprivileges.SomeofthepopularHALvirtualizationto
olsare
a) VMware
TheVMwareproductsaretargetedtowardsx86-
basedworkstationsandservers.Thus,ithastodealwiththecomplicationsthatariseasx86isnotafully-
virtualizablearchitecture.TheVMwaredealswiththisproblembyusingapatent-
pendingtechnologythatdynamicallyrewritesportionsofthehostedmachinecodetoinserttrapswher
everVMMinterventionisrequired.Althoughitsolvestheproblem,itaddssomeoverheadduetothetra
nslationandexecutioncosts.VMwaretriestoreducethecostbycachingtheresultsandreusingthemw
hereverpossible.Nevertheless,itagainaddssomecachingcostthatishardtoavoid.
b) VirtualPC
TheMicrosoftVirtualPCisbasedontheVirtualMachineMonitor(VMM)architecturethatletsusert
ocreateandconfigureoneormorevirtualmachines.ItprovidesmostofthefunctionssameasVMwareb
utadditionalfunctionsincludeundodiskoperationthatletstheusereasilyundosomepreviousoperati
onsontheharddisksofaVM.Thisenableseasydatarecoveryandmightcomehandyinseveralcircumst
ances.
c) Denali
TheDenaliprojectwasdevelopedatUniversityofWashington’stoaddressthisissuerelatedtoscala
bilityofVMs.TheycomeupwithanewvirtualizationarchitecturealsocalledPara
PreparedBy,N.Gobinathan,AP/CSE Page11
virtualizationtosupportthousandsofsimultaneousmachines,whichtheycallLightweightVirtualMa
chines.IttriestoincreasethescalabilityandperformanceoftheVirtualMachineswithouttoomuchofi
mplementationcomplexity.
3) OperatingSystemLevelVirtualization
TheoperatingsystemlevelvirtualizationisanabstractionlayerbetweenOSanduserapplicatio
ns.ItsupportsmultipleOperatingSystemsandapplicationstoberunsimultaneouslywithoutre
quiredtorebootordualboot.ThedegreeofisolationofeachOSisveryhighandcanbeimplement
edatlowriskwitheasymaintenance.Theimplementationofoperatingsystemlevelvirtualizati
onincludes,operatingsysteminstallation,applicationsuitesinstallation,networksetup,andso
on.Therefore,iftherequiredOSissameastheoneonthephysicalmachinethentheuserbasically
endsupwithduplicationofmostoftheefforts,he/
shehasalreadyinvestedinsettingupthephysicalmachine.Torunapplicationsproperlytheope
ratingsystemkeepstheapplicationspecificdatastructure,userlevellibraries,environmentals
ettingsandotherrequisitesseparately.
ThekeyideabehindalltheOS-
levelvirtualizationtechniquesisvirtualizationlayerabovetheOSproducesapartitionpervirtu
almachineondemandthatisareplicaoftheoperatingenvironmentonthephysicalmachine.Wit
hacarefulpartitioningandmultiplexingtechnique,eachVMcanbeabletoexportafulloperating
environmentandfairlyisolatedfromoneanotherandfromtheunderlyingphysicalmachine.
ThepopularOSlevelvirtualizationtoolsare
a) Jail
TheJailisaFreeBSDbasedvirtualizationsoftwarethatprovidestheabilitytopartitionanoperating
systemenvironment,whilemaintainingthesimplicityofUNIX”root”
model.Theenvironmentscapturedwithinajailaretypicalsystemresourcesanddatastructuressucha
sprocesses,filesystem,networkresources,etc.Aprocessinapartitionisreferredtoas“injail”process.
Whenthesystemisbootedupafterafreshinstall,noprocesseswillbeinjail.Whenaprocessisplacedina
jail,allofitsdescendantsafterthejailcreation,alongwithitself,remainwithinthejail.Aprocessmaynot
belongtomorethanonejail.Jailsarecreatedbyaprivilegedprocesswhenitinvokesaspecialsystemcall
jail.Everycalltojailcreatesanewjail;theonly
PreparedBy,N.Gobinathan,AP/CSE Page12
wayforanewprocesstoenterthejailisbyinheritingaccesstothejailfromanotherprocessthatalread
yinthatjail.
b) Ensim
TheEnsimvirtualizesaserver’snativeoperatingsystemsothatitcanbepartitionedintoisolatedco
mputingenvironmentscalledvirtualprivateservers.Thesevirtualprivateserversoperateindepende
ntlyofeachother,justlikeadedicatedserver.Itiscommonlyusedincreatinghostingenvironmenttoall
ocatehardwareresourcesamonglargenumberofdistributedusers.
4) LibraryLevelVirtualization
MostofthesystemusesextensivesetofApplicationProgrammerInterfaces(APIs)insteadoflegacy
Systemcallstoimplementvariouslibrariesatuserlevel.SuchAPIsaredesignedtohidetheoperatingsy
stemrelateddetailstokeepitsimplerfornormalprogrammers.Inthistechnique,thevirtualenvironme
ntiscreatedaboveOSlayerandismostlyusedtoimplementdifferentApplicationBinaryInterface(ABI
)andApplicationProgrammingInterface(API)usingtheunderlyingsystem.
TheexampleofLibraryLevelVirtualizationisWINE.TheWineisanimplementationoftheWindows
API,andcanbeusedasalibrarytoportWindowsapplicationstoUNIX.Itisavirtualizationlayerontopof
XandUNIXtoexporttheWindowsAPI/ABIwhichallowstorunWindowsbinariesontopofit.
5) ApplicationLevelVirtualization
Inthisabstractiontechniquetheoperatingsystemsanduser-
levelprogramsexecuteslikeapplicationsforthemachine.Therefore,specializeinstructionsaren
eededforhardwaremanipulationslikeI/Omapped(manipulatingtheI/
O)andMemorymapped(thatismappingachunkofmemorytotheI/
Oandthenmanipulatingthememory).Thegroupofsuchspecialinstructionsconstitutestheapplica
tioncalledApplicationlevelVirtualization.TheJavaVirtualMachine(JVM)isthepopularexampleofap
plicationlevelvirtualizationwhichallowscreatingavirtualmachineattheapplication-
levelthanOSlevel.Itsupportsanewself-definedsetofinstructionscalledjavabytecodesforJVM.
PreparedBy,N.Gobinathan,AP/CSE Page13
SuchVMsposelittlesecuritythreattothesystemwhilelettingtheusertoplaywithitlikephysicalmachin
es.Likephysicalmachineithastoprovideanoperatingenvironmenttoitsapplicationseitherbyhostin
gacommercialoperatingsystem,orbycomingupwithitsownenvironment.
ThecomparisonbetweendifferentlevelsofvirtualizationisshowninTable2.4.1.
Table2.4.1Comparisonbetweendifferentimplementationlevelsofvirtualization
4. WhataredifferentMechanismsofVirtualizations?
VirtualizationMechanisms
Everyhypervisorusessomemechanismstocontrolandmanagevirtualizationstrategiesthatallow
differentoperatingsystemssuchasLinuxandWindowstoberunonthesamephysicalmachine,simult
aneously.Dependingonthepositionofthe
virtualizationlayer,thereareseveralclassesofVMmechanisms,namelythebinarytranslation,para-
virtualization,fullvirtualization,hardwareassistvirtualizationandhost-
basedvirtualization.ThemechanismsofvirtualizationdefinedbyVMwareandothervirtualizationpr
ovidersareexplainedasfollows.
BinaryTranslationwithFullVirtualization:
Basedontheimplementationtechnologies,hardwarevirtualizationcanbecharacterizedintotwot
ypesnamelyfullvirtualizationwithbinarytranslationandhost-based
PreparedBy,N.Gobinathan,AP/CSE Page14
virtualization. Thebinarytranslationmechanismswithfullandhost-
basedvirtualizationareexplainedasfollows.
a) Binarytranslation
InBinarytranslationofguestOS,TheVMMrunsatRing0andtheguestOSatRing1.TheVMMchecksthe
instructionstreamandidentifiestheprivileged,controlandbehavior-
sensitiveinstructions.Atthepointwhentheseinstructionsareidentified,theyaretrappedintotheVM
M,whichemulatesthebehavioroftheseinstructions.Themethodusedinthisemulationiscalledbinar
ytranslation.ThebinarytranslationmechanismisshowninFig.2.5.3.
Fig.2.5.3BinaryTranslationmechanism
b) FullVirtualization
Infullvirtualization,hostOSdoesn’trequireanymodificationtoitsOScode.Insteaditreliesonbinar
ytranslationtovirtualizetheexecutionofsomesensitive,non-
virtualizableinstructionsorexecutetrap.Mostoftheguestoperatingsystemsandtheirapplicationsco
mposedofcriticalandnoncriticalinstructions.Theseinstructionsareexecutedwiththehelpofbinaryt
ranslationmechanism.
Withfullvirtualization,noncriticalinstructionsrunonthehardwaredirectlywhilecriticalinstructi
onsarediscoveredandreplacedwithtrapsintotheVMMtobeemulatedbysoftware.Inahost-
basedvirtualization,bothhostOSandguestOStakespartinvirtualizationwherevirtualizationsoftwa
relayerliesbetweenthem.
Therefore,fullvirtualizationworkswithbinarytranslationtoperformdirectexecutionofinstructi
onswhereguestOSiscompletelydecoupledfromtheunderlyinghardwareandconsequently,itisuna
warethatitisbeingvirtualized.
PreparedBy,N.Gobinathan,AP/CSE Page15
Thefullvirtualizationgivesdegradedperformance,becauseitinvolvesbinarytranslationofinstru
ctionsfirstratherthanexecutingwhichisrathertime-
consuming.Specifically,thefullvirtualizationofI/
OintensiveapplicationsisareallyabigchallengeasBinarytranslationemploysacodecachetostoretra
nslatedinstructionstoimproveperformance,howeveritexpandsthecostofmemoryusage.
c) Host-basedvirtualization
Inhost-
basedvirtualization,thevirtualizationlayerrunsontopofthehostOSandguestOSrunsoverthevirtual
izationlayer.Therefore,hostOSisresponsibleformanagingthehardwareandcontroltheinstructions
executedbyguestOS.
Thehost-
basedvirtualizationdoesn’trequiretomodifythecodeinhostOSbutvirtualizationsoftwarehastorely
onthehostOStoprovidedevicedriversandotherlow-
levelservices.ThisarchitecturesimplifiestheVMdesignwitheaseofdeploymentbutgivesdegradedp
erformancecomparedtootherhypervisorarchitecturesbecauseofhostOSinterventions.
ThehostOSperformsfourlayersofmappingduringanyIOrequestbyguestOSorVMMwhichdowng
radesperformancesignificantly.
Para-Virtualization
Thepara-
virtualizationisoneoftheefficientvirtualizationtechniquesthatrequireexplicitmodificationtotheg
uestoperatingsystems.TheAPIsarerequiredforOSmodificationsinuserapplicationswhichareprovi
dedbypara-virtualizedVM.
Insomeofthevirtualizedsystem,performancedegradationbecomesthecriticalissue.Therefore,p
ara-
virtualizationattemptstoreducethevirtualizationoverhead,andthusimproveperformancebymodi
fyingonlytheguestOSkernel.Thepara-virtualizationarchitectureisshowninFig.2.5.4.
PreparedBy,N.Gobinathan,AP/CSE Page16
Fig.2.5.4Para-virtualizationarchitecture
Thex86processorusesfourinstructionexecutionringsnamelyRing0,1,2,and3.Thering0hashigh
erprivilegeofinstructionbeingexecutedwhileRing3haslowerprivilege.TheOSisresponsibleforman
agingthehardwareandtheprivilegedinstructionstoexecuteatRing0,whileuser-
levelapplicationsrunatRing3.TheKVMhypervisoristhebestexampleofpara-
virtualization.Thefunctioningofpara-virtualizationisshowninFig.2.5.5.
Fig.2.5.5Para-virtualization(Source:VMware)
Inpara-
virtualization,virtualizationlayerisinsertedbetweenthehardwareandtheOS.Asx86processorrequ
iresvirtualizationlayershouldbeinstalledatRing0,theotherinstructionsatRing0maycausesomepr
oblems.Inthisarchitecture,thenonvirtualizableinstructionsarereplacedwithhypercallsthatcomm
unicatedirectlywiththehypervisororVMM.Theuserapplicationsdirectlygetexecuteduponuserreq
uestonhostsystemhardware.
Somedisadvantagesofpara-virtualizationarealthoughpara-
virtualizationreducesCPUoverhead,butstillhasmanyissueswithcompatibilityandportabilityofvirt
ualsystem,itincurshighcostforimplementationandmaintenanceandperformanceofvirtualization
variesduetoworkloadvariation.Thepopularexamplesofpara-
virtualizationareXen,KVM,andVMwareESXi.
a) Para-VirtualizationwithCompilerSupport
Thepara-
virtualizationsupportsprivilegedinstructionstobeexecutedatruntime.Asfullvirtualizationarchite
ctureexecutesthesensitiveprivilegedinstructionsbyintercepting
PreparedBy,N.Gobinathan,AP/CSE Page17
andemulatingthematruntime,para-
virtualizationcanhandlesuchinstructionsatcompiletime.InPara-
VirtualizationwithCompilerSupporttheeguestOSkernelismodifiedtoreplacetheprivilegedandsen
sitiveinstructionswithhypercallstothehypervisororVMMatcompiletimeitself.TheXenhypervisora
ssumessuchpara-virtualizationarchitecture.
Here,guestOSrunninginaguestdomainmayrunatRing1insteadofatRing0that’s
whyguestOSmaynotbeabletoexecutesomeprivilegedandsensitiveinstructions.Therefore,suchpri
vilegedinstructionsareimplementedbyhypercallstothehypervisor.So,afterreplacingtheinstructio
nswithhypercalls,themodifiedguestOSemulatesthebehavioroftheoriginalguestOS.
VirtualizationofCPU,Memory,AndI/ODevices
5. ExplainindetailaboutVirtualizationofCPU,Memory,AndI/ODevices.(Nov/
Dec2021)
VirtualizationofCPU
TheCPUVirtualizationisrelatedtorangeprotectionlevelscalledringsinwhichcodecanexecute.Th
eIntelx86architectureofCPUoffersfourlevelsofprivilegesknownasRing0,1,2and3.
Fig.2.6.1CPUPrivilegeRings
AmongthatRing0,Ring1andRing2areassociatedwithoperatingsystemwhileRing
3isreservedforapplicationstomanageaccesstothecomputerhardware.AsRing0isusedbykernelbec
auseofthatRing0hasthehighest-
levelprivilegewhileRing3haslowestprivilegeasitbelongstouserlevelapplicationshowninFig.2.6.1.
PreparedBy,N.Gobinathan,AP/CSE Page18
TheuserlevelapplicationstypicallyruninRing3,theoperatingsystemneedstohavedirectaccessto
thememoryandhardwareandmustexecuteitsprivilegedinstructionsinRing0.Therefore,Virtualizin
gx86architecturerequiresplacingavirtualizationlayerundertheoperatingsystemtocreateandman
agethevirtualmachinesthatdeliverssharedresources.Someofthesensitiveinstructionscan’tbevirt
ualizedastheyhavedifferentsemantics.Ifvirtualizationisnotprovidedthenthereisadifficultyintrap
pingandtranslatingthosesensitiveandprivilegedinstructionsatruntimewhichbecomethechalleng
e.Thex86privilegelevelarchitecturewithoutvirtualizationisshowninFig.2.6.2.
Fig.2.6.2X86privilegelevelarchitecturewithoutvirtualization
Inmostofthevirtualizationsystem,majorityoftheVMinstructionsareexecutedonthehostprocess
orinnativemode.Hence,unprivilegedinstructionsofVMscanrundirectlyonthehostmachineforhigh
erefficiency.
Theprivilegedinstructionsareexecutedinaprivilegedmodeandgettrappedifexecutedoutsidethis
mode.Thecontrol-
sensitiveinstructionsallowtochangetheconfigurationofresourcesusedduringexecutionwhileBeh
avior-
sensitiveinstructionsusesdifferentbehaviorsofCPUdependingontheconfigurationofresources,inc
ludingtheloadandstoreoperationsoverthevirtualmemory.
Generally,theCPUarchitectureisvirtualizableifandonlyifitprovidesabilitytoruntheVM’sprivil
egedandunprivilegedinstructionsintheCPU’susermodeduringwhichVMMrunsinsupervisormode.
Whentheprivilegedinstructionsalongwithcontrolandbehavior-
sensitiveinstructionsofaVMareexecuted,thentheygettrappedintheVMM.Insuchscenarios,theVM
MbecomestheunifiedmediatorforhardwareaccessfromdifferentVMsandguaranteethecorrectnes
sandstabilityofthewholesystem.However,notallCPUarchitecturesarevirtualizable.Therearethree
techniquescanbeusedforhandlingsensitiveandprivilegedinstructionstovirtualizetheCPUonthex8
6architecture:
PreparedBy,N.Gobinathan,AP/CSE Page19
1) Binarytranslationwithfullvirtualization
2) OSassistedvirtualizationorpara-virtualization
3) Hardwareassistedvirtualization
Theabovetechniquesareexplainedindetailasfollows.
Binarytranslationwithfullvirtualization
Inbinarytranslation,thevirtualmachineissuesprivilegedinstructionscontainedwithintheircompi
lecode.TheVMMtakescontrolontheseinstructionsandchangesthecodeunderexecutiontoavoidtheim
pactonstateofthesystem.Thefullvirtualizationtechniquedoesnotneedtomodifyhostoperatingsystem.
Itreliesonbinarytranslationtotrapandvirtualizetheexecutionofcertaininstructions.
Thenoncriticalinstructionsdirectlyrunonthehardwarewhilecriticalinstructionshavetobediscovere
dfirstthentheyarereplacedwith
Fig.2.6.3BinaryTranslationwithFullVirtualization
trapintoVMMtobeemulatedbysoftware.Thiscombinationofbinarytranslationanddirectexecution
providesfullvirtualizationastheguestOSiscompletelydecoupledfromtheunderlyinghardwarebythe
virtualizationlayer.TheguestOSisnotawarethatitisbeingvirtualizedandrequiresnomodification.T
heperformanceoffullvirtualizationmaynotbeidealbecauseitinvolvesbinarytranslationatrun-
timewhichistimeconsumingandcanincuralargeperformanceoverhead.Fullvirtualizationoffersthe
bestisolationandsecurityforvirtualmachines,andsimplifiesmigrationandportabilityasthesamegu
estOSinstancecanrunvirtualizedoronnativehardware.ThefullvirtualizationisonlysupportedbyV
MwareandMicrosoft’shypervisors.ThebinarytranslationwithfullvirtualizationisshowninFig.2.6.3
.
2) OSassistedvirtualizationorpara-virtualization
Thepara-virtualizationtechniquereferstomakingcommunicationbetweenguestOSandthe
PreparedBy,N.Gobinathan,AP/CSE Page20
hypervisortoimprovetheperformanceandefficiency.Thepara-
virtualizationinvolvesmodificationtotheOSkernelthatreplacesthenon-
virtualizedinstructionswithhypercallsandcancommunicatedirectlywiththevirtualizationorlayer
hypervisor.Ahypercallisbasedonthesameconceptasasystemcall.Thecallmadebyhypervisortothe
hardwareiscalledhypercall.Inpara-
virtualizationthehypervisorisresponsibleforprovidinghypercallinterfacesforothercriticalkernel
operationssuchasmemorymanagement,interrupthandlingandtimekeeping.
Fig.2.6.4showspara-virtualization.
Fig.2.6.4Para-virtualization
3) HardwareAssistedVirtualization(HVM)
Thistechniqueattemptstosimplifyvirtualizationbecausefullorpara-
virtualizationiscomplicatedinnature.TheProcessormakerslikeIntelandAMDprovidestheirownpr
oprietaryCPUVirtualizationTechnologiescalledIntelVT-xandAMD-
V.IntelandAMDCPUsaddanadditionalmodecalledprivilegemodeleveltox86processors.Alltheprivi
legedandsensitiveinstructionsaretrappedinthehypervisorautomatically.Thistechniqueremovest
hedifficultyofimplementingbinarytranslationoffullvirtualization.Italsoletstheoperatingsystemru
ninVMswithoutmodification.BothofthemtargetprivilegedinstructionswithanewCPUexecutionm
odefeaturethatallowstheVMMtoruninanewrootmodebelowring0,alsoreferredtoasRing0P(forpri
vilegedrootmode)whiletheGuestOSrunsinRing0D(forde-privilegednon-rootmode).The
Privilegedandsensitivecallsaresetautomaticallytotrapthehypervisorrunningonhardware
PreparedBy,N.Gobinathan,AP/CSE Page21
thatremovestheneedforeitherbinarytranslationorpara-
virtualization.TheFig.2.6.5showsHardwareAssistedVirtualization.
Fig.2.6.5HardwareAssistedVirtualization
VirtualizationOfMemory
6. Explainindetailboutvirtualizationofmemorywithanexample.Virt
ualizationofMemory
Thememoryvirtualizationinvolvesphysicalmemorytobesharedanddynamicallyallocated
tovirtualmachines.Inatraditionalexecutionenvironment,theoperatingsystemisresponsibleforma
intainingthemappingsofvirtualmemorytomachinememoryusingpagetables.Thepagetableisasing
le-stagemappingfromvirtualmemorytomachinememory.Allrecentx86CPUscomprisesbuilt-
inMemoryManagementUnit(MMU)andaTranslationLookasideBuffer(TLB)toimprovethevirtual
memoryperformance.However,inavirtualexecutionenvironment,themappingisrequiredfromvirt
ualmemorytophysicalmemoryandphysicalmemorytomachinememory;henceitrequirestwo-
stagemappingprocess.
ThemodernOSprovidesvirtualmemorysupportthatissimilartomemoryvirtualization.TheVirtual
izedmemoryisseenbytheapplicationsasacontiguousaddressspacewhichisnottiedtotheunderlyin
gphysicalmemoryinthesystem.Theoperatingsystemisresponsibleformappingsthevirtualpagenu
mberstophysicalpagenumbersstoredinpagetables.TooptimizetheVirtualmemoryperformanceall
modernx86CPUsincludeaMemoryManagementUnit(MMU)andaTranslationLookasideBuffer(TL
B).Therefore,torunmultiplevirtualmachineswithGuestOSonasinglesystem,theMMUhastobevirtu
alizedshowninFig.2.7.1.
PreparedBy,N.Gobinathan,AP/CSE Page22
Fig.2.7.1MemoryVirtualization
TheGuestOSisresponsibleforcontrollingthemappingofvirtualaddressestotheguestmemoryph
ysicaladdresses,buttheGuestOScannothavedirectaccesstotheactualmachinememory.TheVMMisr
esponsibleformappingtheGuestphysicalmemorytotheactualmachinememory,anditusesshadowp
agetablestoacceleratethemappings.TheVMMusesTLB(TranslationLookasideBuffer)hardwareto
mapthevirtualmemorydirectlytothemachinememorytoavoidthetwolevelsoftranslationoneverya
ccess.WhentheguestOSchangesthevirtualmemorytophysicalmemorymapping,theVMMupdatest
heshadowpagetablestoenableadirectlookup.Thehardware-
assistedmemoryvirtualizationbyAMDprocessorprovideshardwareassistancetothetwo-
stageaddresstranslationinavirtualexecutionenvironmentby
usingatechnologycallednestedpaging.
VirtualizationofI/ODevice:
ThevirtualizationofdevicesandI/
O’sisbitdifficultthanCPUvirtualization.ItinvolvesmanagingtheroutingofI/
Orequestsbetweenvirtualdevicesandthesharedphysicalhardware.ThesoftwarebasedI/
OvirtualizationandmanagementtechniquescanbeusedfordeviceandI/
Ovirtualizationtoenablesarichsetoffeaturesandsimplifiedmanagement.Thenetworkistheint
egralcomponentofthesystemwhichenablescommunicationbetweendifferentVMs.TheI/
OvirtualizationprovidesvirtualNICsandswitchesthatcreatevirtualnetworksbetweenthevirtual
machineswithoutthenetworktraffic
PreparedBy,N.Gobinathan,AP/CSE Page23
andconsumingbandwidthonthephysicalnetwork.TheNICteamingallowsmultiplephysicalNICStob
eappearingasoneandprovidesfailovertransparencyforvirtualmachines.Itallowsvirtualmachinest
obeseamlesslyrelocatedtodifferentsystemsusingVMwareVMotionbykeepingtheirexistingMACad
dresses.ThekeyforeffectiveI/
OvirtualizationistopreservethevirtualizationbenefitswithminimumCPUutilization.Fig.2.7.2show
sdeviceandI/Ovirtualization.
Fig.2.7.2DeviceandI/Ovirtualization
ThevirtualdevicesshowninaboveFig.2.7.2canbeeffectivelyemulateonwell-
knownhardwareandcantranslatethevirtualmachinerequeststothesystemhardware.Thestandar
dizedevicedrivershelpforvirtualmachinestandardization.TheportabilityinI/
OVirtualizationallowsallthevirtualmachinesacrosstheplatformstobeconfiguredandrunonthesam
evirtualhardwareregardlessoftheiractualphysicalhardwareinthesystem.Therearethreewaysofi
mplementingI/Ovirtualization.Thefulldeviceemulationapproachemulateswell-knownreal-
worlddeviceswhereallthefunctionsofdevicesuchasenumeration,identification,interruptandD
MAarereplicatedinsoftware.Thepara-
virtualizationmethodofIOvirtualizationusessplitdrivermodelthatconsistoffrontendandbackendd
rivers.Thefront-enddriverrunsonDomainUwhichmanagesI/
OrequestofguestOS.ThebackenddriverrunsDomain0whichmanagesrealI/
OdeviceswithmultiplexingofI/OdataofdifferentVMs.
PreparedBy,N.Gobinathan,AP/CSE Page24
Downloaded by Aniimee Raghupathy
IIICSE CCS335-CloudComputing
Theyinteractwitheachotherviablockofsharedmemory.ThedirectI/
OvirtualizationlettheVMtoaccessdevicesdirectly.itmainlyfocusonnetworkingofmainframes.T
herearefourmethodstoimplementI/Ovirtualizationnamelyfulldeviceemulation,para-
virtualization,anddirectI/Ovirtualizationandthroughself-virtualizedI/O.
Infulldeviceemulation,theIOdevicesarevirtualizedusingemulationsoftware.Thismethodcane
mulateallwell-knownandreal-
worlddevices.Theemulationsoftwareisresponsibleforperformingallthefunctionsofadevicesorbu
sinfrastructure,suchasdeviceenumeration,identification,interrupts,andDMAwhicharereplicated.
ThesoftwarerunsinsidetheVMMandactsasavirtualdevice.Inthismethod,theI/Oaccess
requestsoftheguestOSaretrappedintheVMMwhichinteractswiththeI/
Odevices.ThemultipleVMsshareasinglehardwaredeviceforrunningthemconcurrently.However,s
oftwareemulationconsumesmoretimeinIOaccessthat’swhyitrunsmuchslowerthanthehardwareit
emulates.
Inpara-virtualizationmethodofI/
Ovirtualization,thesplitdrivermodelisusedwhichconsistoffrontenddriverandbackenddriver.Iti
susedinXenhypervisorwithdifferentdriverslikeDomain0andDomainU.Thefrontenddriverrunsin
DomainUwhilebackenddriverrunsinDomain0.Boththedriversinteractwitheachotherviaablockof
sharedmemory.ThefrontenddriverisresponsibleformanagingtheI/
OrequestsoftheguestOSeswhilebackenddriverisresponsibleformanagingtherealI/
OdevicesandmultiplexingtheI/OdataofdifferentVMs.
Thepara-virtualizationmethodofI/
OvirtualizationachievesbetterdeviceperformancethanfulldeviceemulationbutwithahigherCPUo
verhead.
IndirectI/
Ovirtualization,thevirtualmachinescanaccessIOdevicesdirectly.Itdoesnothavetorelyonanyemula
torofVMM.IthascapabilitytogivebetterIOperformancewithouthighCPUcoststhanpara-
virtualizationmethod.Itwasdesignedforfocusingonnetworkingformainframes.
Inself-virtualizedI/
Omethod,therichresourcesofamulticoreprocessorandharnessedtogether.Theself-
virtualizedI/OencapsulatesallthetasksrelatedwithvirtualizinganI/
Odevice.ThevirtualdeviceswithassociatedaccessAPItoVMsandamanagementAPItotheVMMa
reprovidedbyself-virtualizedI/
OthatdefinesoneVirtualInterface(VIF)foreverykindofvirtualizedI/Odevice.
ThevirtualizedI/
Ointerfacesarevirtualnetworkinterfaces,virtualblockdevices(disk),virtualcameradevices,andoth
Downloaded by Aniimee Raghupathy
IIICSE CCS335-CloudComputing
ers.TheguestOSinteractswiththevirtualinterfacesvia
PreparedBy,N.Gobinathan,AP/CSE Page25
devicedrivers.EachVIFcarriesauniqueIDforidentifyingitinself-virtualizedI/
Oandconsistsoftwomessagequeues.Onemessagequeueforoutgoingmessagestothedevicesandano
therisforincomingmessagesfromthedevices.
Asthereareamanyofchallengesassociatedwithcommodityhardwaredevices,themultipleIOvirt
ualizationtechniquesneedtobeincorporatedforeliminatingthoseassociatedchallengeslikesystem
crashduringreassignmentofIOdevices,incorrectfunctioningofIOdevicesandhighoverheadofdevic
eemulation.
PART-A
1. “Althoughvirtualizationiswidelyacceptedtoday;itdoeshaveitslimits”.Commenton
thestatement.(May-2021)
Althoughvirtualizationiswidelyacceptedtoday;itdoeshaveitslimitationsthatarelisted
below.
• High upfront Investments : Organisations need to acquire resources beforehand to
implementVirtualization.Also,theremightoccuraneedtoincuradditionalresourceswithtime.
• PerformanceIssues:Althoughvirtualizationisanefficienttechniqueandefficiencycan
beincreasedbyapplyingsometechniques,theremaybechanceswhentheefficiencyisnotasgoo
dasthatoftheactualphysicalsystems.
• Licensing Issues : All software may not be supported on virtual platforms. Although
vendorsarebecomingawareoftheincreasingpopularityofvirtualizationandhavestartedprovi
dinglicensesforsoftwaretorunontheseplatforms,theproblemhasnotcompletelyvanished.Th
erefore,itisadvisedtocheckthelicenseswiththevendorbeforeusingthesoftware.
• Difficulty in Root Cause Analysis : With the addition of an additional layer in
virtualization,complexitygetsincreased.Thisincreasedcomplexitymakesrootcauseanalysis
difficultincaseofunidentifiedproblems.
2. ListtherequirementsofVMM.(Nov/Dec2021)
TherequirementsofVMMorhypervisorare
• VMMmustsupportefficienttaskschedulingandresourceallocationtechniques.
• VMMshouldprovideanenvironmentforprogramswhichisessentiallyidenticaltothe
originalphysicalmachine.
• AVMMshouldbeincompletecontrolofthesystem resources.
PreparedBy,N.Gobinathan,AP/CSE Page26
• AnyprogramrununderaVMMshouldexhibitafunctionidenticaltothatwhichitrunsontheo
riginalphysicalmachinedirectly.
• VMMmustbetightlyrelatedtothearchitecturesofprocessors
3. GivetheroleofaVM.(or)GivethebasicoperationsofaVM.(May-2017)
Virtualizationallowsrunningmultipleoperatingsystemsonasinglephysicalmachine.Eachi
nstanceofoperatingsystemrunninginsidecalledVirtualmachine(VM).ThemainroleofVMistoalloc
atethehostmachineresourcestorunOperatingsystem.TheotherrolesofVMare
Providevirtualhardware,includingCPUs,memory,storage,harddrives,networkinterfacesando
therdevicestorunvirtualoperatingsystem.
• Providefaultandsecurityisolationatthehardwarelevel.
• Preserveperformancewithadvanced resourcecontrols.
• Savetheentirestateofavirtualmachineto files.
• Moveandcopyvirtualmachinesdataaseasilyaslikemovingandcopyingfiles.
• Provisiontomigrate anyvirtualmachinetoanyphysicalserver.
4. Givethesignificanceofvirtualization.(Dec2019)(May-2021)
Asweknowthatthelargeamountsofcompute,storage,andnetworkingresourcesareneeded
tobuildacluster,gridorcloudsolution.Theseresourcesneedtobeaggregatedatoneplacetoofferasin
glesystemimage.Therefore,theconceptofvirtualizationcomesintothepicturewhereresourcescan
beaggregatedtogethertofulfilltherequestforresourceprovisioningwithrapidspeedasasinglesyst
emimage.Thevirtualizationisanovelsolutionthatcanofferapplicationinflexibility,softwaremanage
ability,optimumresourceutilizationandsecurityconcernsinexistingphysicalmachines.Inparticula
r,everycloudsolutionhastorelyonvirtualizationsolutionforprovisioningtheresourcesdynamicall
y.Therefore,virtualizationtechnologyisoneofthefundamentalcomponentsofcloudcomputing.Itp
rovidessecure,customizable,andisolatedexecutionenvironmentforrunningapplicationsonabstra
ctedhardware.Itismainlyusedforprovidingdifferentcomputingenvironments.Althoughthesecom
putingenvironmentsarevirtualbutappearliketobephysical.Thedifferentcharacteristicsofvirtuali
zationare,
• Maximumresource utilization •Reduces Hardware Cost
• Minimizethemaintenancecost •SupportsDynamicLoadbalancing
• SupportsServer Consolidation •SupportsDisaster recovery
PreparedBy,N.Gobinathan,AP/CSE Page27
• CanrunLegacyapplicationsandcantestBetaSoftwares.
5. DefineVirtualization.(May-2019)(May-2022)
ThetermVirtualizationisnothingbutcreationofavirtualversionofhardwareplatform,op
eratingsystem,storageornetworkresourcesratherthanactual.Itallowstorunmultipleoperating
systemsonasinglephysicalmachinecalledhostmachine.Eachinstanceofoperatingsystemcalle
dVirtualMachine(VM)andoperatingsystemrunsinsidevirtualmachineiscalledguestoperating
system.
Enlisttheprosandconsofvirtualization?
• CostReduction
• Efficientresourceutilization
• Optimization
• Budgeting
• IncreasedReturnonInvestment
• IncreasedFlexibility
• UpfrontInvestments
• PerformanceIssues
• LicensingIssues
• DifficultyinRootCauseAnalysis
6. Whatisservervirtualization?
Aservervirtualizationistheprocessofdividingaphysicalserverintomultipleuniqueandi
solatedvirtualserversbymeansofsoftware.Itpartitionsasinglephysicalserverintothemultiplev
irtualservers;eachvirtualservercanrunitsownoperatingsystemandapplicationsindependentl
y.Thevirtualserverisalsotermedasvirtualmachine.Theconsolidationhelpsinrunningmanyvir
tualmachinesunderasinglephysicalserver.Thepopular server virtualization softwares are
VMware’s vSphere, Citrix Xen Server, Microsoft’sHyper-V,andRedHat’s
EnterpriseVirtualization.
7. EnlistadvantagesanddisadvantagesofBare-Metalstructure.
TheadvantagesofBare-Metalstructureare
• Itisfasterinperformanceandmoreefficienttouse.
• Itprovidesenterprisefeatureslikehighscalability,disasterrecoveryandhighavailability.
PreparedBy,N.Gobinathan,AP/CSE Page28
• Ithashighprocessingpowerduetotheresourcepooling.
• Ithasloweroverheadormaintenancecost.
• Itprovideseaseofbackupand recovery.
• Itprovidesbuilt-infault-tolerancemechanisms.
• Ithasimproved mobilityandsecurity.
ThedisadvantagesofBare-Metalstructureare
• Ithaslimitedhardwaresupportand poorstackofdevicedrivers.
• Ithashighimplementationcost
• It requires specialized servers to install
andrunhypervisoranddonotrunonuserworkstations.
• Insomecases,itbecomescomplexfor management.
8. WhatisXen?
XenisanopensourceBare-
Metal(TypeI)hypervisordevelopedbyCambridgeUniversity.Itrunsonthetopofhardwarewith
outneedingahostoperatingsystem.TheabsenceofhostOSeliminatetheneedforpassthroughpe
rmissionbythehypervisor.Xenisamicrokernelhypervisor,whichseparatesthepolicyfromthe
mechanism.ItprovidesavirtualenvironmentlocatedbetweenthehardwareandtheOS.AsXenhy
pervisorrunsdirectlyonthehardwaredevices,itrunsmanyguestoperatingsystemsonthetopofi
t.ThevariousoperatingsystemplatformssupportedasaguestOSbyXenhypervisorareWindows,L
inux,BSDandSolaris.
9. DifferentiatefullVirtualizationandPara-Virtualization.(Nov-2020)
S.No. FullVirtualization Paravirtualization
InFullvirtualization,virtualmachinespe
Inparavirtualization,avirtualmachinedoes
rmittheexecutionoftheinstructionswit
notimplementfullisolationofOSbutratherp
1 htherunningofunmodifiedOSinanenti
rovidesadifferentAPIwhichisutilizedwhen
relyisolated
OSissubjectedtoalteration.
way.
WhiletheParavirtualizationismoresecureth
2 FullVirtualizationislesssecure.
antheFullVirtualization.
PreparedBy,N.Gobinathan,AP/CSE Page29
FullVirtualizationisslowthanparavirtu Paravirtualizationisfasterinoperationasco
4
alizationinoperation. mparedtofullvirtualization.
FullVirtualizationismoreportable Paravirtualizationislessportableand
5
andcompatible. compatible.
Examplesoffullvirtualizationare Examples of para virtualization are
6
MicrosoftandParallelssystems. MicrosoftHyper-V,CitrixXen,etc.
Theguestoperatingsystemhastobemodified
It supports all guest
7 andonlyafewoperatingsystems
supportit.
operatingsystemswithoutmodificatio
n.
Usingthedrivers,theguestoperatingsystem
Theguestoperatingsystemwillissuehar
8 willdirectlycommunicatewiththe
dwarecalls.
hypervisor.
Itislessstreamlinedcomparedto
9 Itismorestreamlined.
para-virtualization.
Itprovideslessisolationcomparedtofull
10 Itprovidesthebestisolation.
virtualization.
11.DistinguishbetweenVirtualMachineandContainers.
1 Thehardwareisvirtualizedtoexecutese Containersfacilitateawayforvirtualizingth
veralOperatingsysteminstanceswithV eoperatingsystemsothatseveralworkload
Ms. scanexecuteonanindividual
operatingsysteminstance
2 VMismanagedviahypervisorandusesV ContainersgiveservicesofOSfromanunderl
Mhardware. yinghostandalsoseparatetheapplications
utilizingvirtual-memory
hardware.
3 VMfacilitatestheabstractmachine Container facilitates the
which utilizes device abstractoperatingsystem.
driversaddressinganabstractmachine.
PreparedBy,N.Gobinathan,AP/CSE Page30
4 VMtechnologiesarewell-knownwithin Thecontainerhasbeengrownonseveralclo
various udsandserverswithorganizationslikeGoogl
embeddedcommunities. eandFacebook.Forexample,allservicesofG
oogleDocsgeta
container/instance.
5 Higheroverhead Loweroverhead
6 VMpermitsusforinstallingothersoftwa Thecontainersaresoftwarethatpermitsdis
resovirtuallywecontrolitasdisputedtoi tinctapplication'sfunctionalitiesindepend
nstallthesoftwareona ently.
computerdirectly.
7 Applications executing on Applications executing within
virtualmachinesystemcanexecutedisti thecontainerenvironmentcontributetoan
nct individualOS.
OS.
8 VMfacilitatesawayforvirtualizing ContaineronlyvirtualizestheOS.
anycomputersystem.
9 VMshavealargesize. Containers are very light (some
megabytes).
10 VMrunsinminutesduetoitslarge Containersruninseconds.
size.
11 Itutilizesalotofmemoryofthe Containers utilize very less system
system. memory.
12 Itishighlysecured. Itislesssecure.
13 VMishelpfulifweneedeachresourceofO Acontainerishelpfulifweneededtomaximiz
Stoexecuteseveralapplications. evariousexecutingapplications
withminimalservers.
14 VMexamples:VMware,Xen,KVM Container examples:Containers via
Docker,PhotonOS,RancherOS.
PreparedBy,N.Gobinathan,AP/CSE Page31