0% found this document useful (0 votes)
29 views40 pages

ccs335-cc-unit-ii-cloud-computing-unit-2-notes

notes

Uploaded by

anitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views40 pages

ccs335-cc-unit-ii-cloud-computing-unit-2-notes

notes

Uploaded by

anitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 40

CCS335-CCUnit-II-cloudcomputingunit2 notes

computerscience(AnnaUniversity)

Scantoopenon Studocu

Downloaded by Aniimee Raghupathy


Studocuisnotsponsoredorendorsedbyanycollegeor university

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

UNITIIVIRTUALIZATION
BASICS

VirtualMachineBasics– TaxonomyofVirtualMachines– Hypervisor– KeyConcepts–


Virtualizationstructure– Implementationlevelsofvirtualization–
VirtualizationTypes:FullVirtualization– ParaVirtualization– HardwareVirtualization–
VirtualizationofCPU,MemoryandI/Odevices.

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

PreparedBy,N.Gobinathan,AP/CSE Page2

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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)

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

PreparedBy,N.Gobinathan,AP/CSE Page7

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

 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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

SuchVMsposelittlesecuritythreattothesystemwhilelettingtheusertoplaywithitlikephysicalmachin
es.Likephysicalmachineithastoprovideanoperatingenvironmenttoitsapplicationseitherbyhostin
gacommercialoperatingsystem,orbycomingupwithitsownenvironment.
ThecomparisonbetweendifferentlevelsofvirtualizationisshowninTable2.4.1.

ImplementationLevel Performance Application Implementation Application


Flexibility Complexity Isolation

InstructionSet VeryPoor VeryGood Medium Medium


ArchitectureLevel(ISA)
HardwareAbstraction VeryGood Medium VeryGood Good
Level(HAL)
OperatingSystemLevel VeryGood Poor Medium Poor

LibraryLevel Medium Poor Poor Poor

ApplicationLevel Poor Poor VeryGood VeryGood

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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.

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

PreparedBy,N.Gobinathan,AP/CSE Page16

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

PreparedBy,N.Gobinathan,AP/CSE Page17

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

• 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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

• 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

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

• 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.

Full Virtualization uses binary


WhileParavirtualizationuseshypercallsatco
3 translationandadirectapproachasatech
mpiletimeforoperations.
niqueforoperations.

PreparedBy,N.Gobinathan,AP/CSE Page29

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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.

S.No. VirtualMachine(VM) Containers

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.

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

PreparedBy,N.Gobinathan,AP/CSE Page30

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

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.

Downloaded by Aniimee Raghupathy


IIICSE CCS335-CloudComputing

PreparedBy,N.Gobinathan,AP/CSE Page31

Downloaded by Aniimee Raghupathy

You might also like