最新安卓系统与IOS系统比较毕业英文文献翻译.docx
《最新安卓系统与IOS系统比较毕业英文文献翻译.docx》由会员分享,可在线阅读,更多相关《最新安卓系统与IOS系统比较毕业英文文献翻译.docx(18页珍藏版)》请在冰豆网上搜索。
最新安卓系统与IOS系统比较毕业英文文献翻译
ESEP2011:
9-10December2011,Singapore
AnAnalysisandComparisonofOpenandClosedMobile
Platforms
Androidvs.iPhone
YingluZOUa,∗,HaoWUb,JianxinHUANGa,b
aInformationEngineeringCollege,7JianXueRoad,JinShuiDistrict,ZhengZhou,450001,China
Abstract
WiththereleaseofAndroid2.2FroyoandiPhone4,thewarbetweenopenandclosedmobileplatformstendstobefiercer.Beingtherepresentativesofthetwoparties,FroyoandiOS4arequitedifferentatsystemframework,newfeature,applicationmarketandintegrationmodel.AccordingtothecompanyspiritsofGoogleandApple,wedosomeanalysesandcomparisonsoftheabovepoints,explainthedifferencesofAndroidandiPhonefromtheshallowertothedeeper,thenconcludethecharacteristicsofopenandclosedmobileplatforms,aimingatprovidinganobjectivereferenceforresearchersofmobileplatforms,helpingthemseeclearerintomobileindustry.Asaresult,bothFroyoandiOS4havetheiradvantagesanddisadvantages,stilltheyarefarfrombeingperfect,there’sroomforfurtherimprovement.
Keywords:
Android;iPhone;Froyo;iOS4;smartphone;mobileplatform
1.Introduction
Inrecentyears,thepopularityofsmartphonekeptgoingup.Moreandmoresmartphonesaresoldandalotofpeopleareembracingthem.Smartphonesbroughtgreatconveniencetousers,aswellcreatedopportunitiesforsmartphoneresearchers.That’stosay,thewidespreadofsmartphonesbenefitedbothsides.Atthesametime,developingofsmartphoneOSbecomesoneofthesmartestindustry.TobeasmartphoneOS,thesystemshould:
1.ProvideserviceslikeaPC.2.WorkwithaGPUforbettervisualeffects.3.AllowtheusertosurfonInternetfreely.Andapparently,there’realsosomeweaknesses:
1.Limitedbattery.2.PoorCPUperformanceagainstPCCPU.3.Smallstorage.4.TheuseofRAMmayleadstolossofdatawhenthephonerunsoutofbattery
Nowthe2giantsofsmartphoneOSareAndroidandiPhoneOS.Ononeside,AndroidisbasedonLinuxkernelandDalvikvirtualmachine,anditisopensourced.TheupperlayerofAndroidisJavabased,allowingdeveloperstodevelopAndroidapplicationswithGoogleSDKandselltheirsoftwareinAndroidMarket.Ontheotherside,iPhoneOS,whichbasesonUnixkernelandDarwinmodelbutisclosedsourced,evolvesfromMacOSXandisthedefaultOSofiPhone,iPodTouchandiPad.ObjectiveCbasedsoftwarecanruniniPhoneOS,andjustlikeAndroid,youcandevelopyourowniPhoneapplicationsanduploadthemontoApple’s‘AppStore’forsale[1][2][3][4].
BycomparingthelatestAndroidandiPhoneOS,Android2.2FroyoandiOS4,wecantakeaglimpseatthemainfeatureofopenandclosedsmartphoneOSs.Whilethe2OSsaredesignedinratherdifferentmentalityandfunctionality,it’salittleearlytotellwhichoneisbetter.
2.SmartPhoneOS
2.1.Android
ThesystemarchitectureofAndroidconsistsof5layers,whichareLinuxKernel,AndroidRuntime,Libraries,ApplicationFrameworkandApplications,frombottomtotop.
Androidprovidescoreserviceslikesecurity,memorymanagement,processmanagement,networkstackanddrivers,basingonLinux2.6.Beingtheabstractlayerbetweensoftwareandhardware,thelayerofLinuxKernelhidestheimplementingdetailsofhardwareandprovidesintegratedservicesforupperlayer.
DalvikvirtualmachineandJavacorelibrariesareincludedinthelayerofAndroidRuntime,providingmostfunctionsinJavacorelibraries.
ThelayerofLibrariescontainsaclassofC/C++librariesforAndroidcomponents.ThoselibrariesareintegratedbythelayerofApplicationFrameworkandthenprovidedtodevelopers.
ThelayerofApplicationFrameworkprovidesallkindsofmodulesforprograminitializationtosimplifytheuseofcomponents,allowingdevelopersdowhatevertheywantandprovideservicesforothersoftwares,underthelimitationofsecurity,ofcourse.
MainstreamapplicationsarelocatedinthelayerofApplication,includinge-mail,SMS,calendar,Googlemap,Webbrowserandcontacts.Usersinteractdirectlywiththislayer[1][2].
ThelatestversionofAndroid,Android2.2Froyo,putsonsomenewfeatures.Theyare:
1.SupportFlash10.1,enablesusertowatchflashonthephone.2.V8JavaScriptengineinwebbrowserleadstofasterInternetdatatransportation.3.Bigadvanceinnetworksharing.Youcanusethephoneasa3GNIC,orconvert3GsignaltoWi-Fi.4.Automaticallysoftwareupdate.5.SoftwarescanbesetupinSDcardtoextendfilestorages.
2.2.iPhone
iPhoneOSisconsistof4abstractlayers:
CoreOS,CoreService,MediaandCocoaTouchrespectively.
LayersofCoreOSandCoreServicearedesignedinClanguagetohandlecoresystemservices,enablingdeveloperstoperformfileaccess,socketscallinganddatahandling.CFNetworkandSQLitearealsopartsofthese2layers.
ThelayerofMedia,accordingtoitsname,thislayerisusedtocontrolvideoandaudio,aswellhandle2Dand3Dimages.TheOpenGL-ESQuratzpartofthelayeriscodedwithClanguage,whilethepartofCore-AudioandCore-AnimationisObjectiveCbased.
ThelayerofCocoaTouchbuildsabasicframeworkforallkindsofprogramsiniPhone.MostprogramsruninCocoaTouchlayer,andit’ssurelyObjectiveCbased[3][4].
ThelatestiPhoneOSisiOS4.Itincludesthefollowingnewfeatures:
1.Softwareclassification.This
featureenablesusertoplacesortedsoftwaresintodifferentdocuments,makingitclearertomanage.2.Emailintegration.Oneaccountisforalle-mailsfromdifferentproviders.3.iBook,originallyfromiPad,isbuiltiniOS.4.AbrandnewAppleGameCentermakesiPhoneatremendousentertainmentplatform.
2.3.Androidvs.iPhone
Beingthetop2smartphoneOSs,we’resurethatbothAndroidandiPhonehavetheirownadvantagesanddisadvantages.Nowlet’stakealookateachofthem,andseewhatuniquefeaturetheyhave.
Android2.2Froyofullysupportmultitask,whichmeansyoucanlistentomusicwhilewritingblog.AndiOS4,officiallyannouncedtobe‘multitasked’,isinfactaplayofconcept.OnlyafewofsoftwareswhichareauthorizedbyApplecanrun‘simultaneously’,whoseprincipleismucheasierthatmultitask:
whenanapplicationisswitchedout,itscurrentstateissavedandthenthesystemjustclosesit.Andwhenit’sswitchedin,we’rebacktotheprevioussnapshot[5][6][7].
DuringthepublicationofAndroid2.2Froyo,Googleannouncedithas‘themostfluentwebbrowser’,becausetheuseofV8JavaScriptengine.V8isabrandnewengine,designedforrunningbigsizeJavaScriptapplication.Insomekindoftests,V8ismuchfasterthanJScriptfromInternetExplorer,SpiderMonkeyfromFirefoxandJavaScriptCorefromSafari.Italloweto3keypartsofV8,they’refastattributeaccess,dynamiccodegeneration,effectivetrashcleaning.
2.3.1.FastAttributeAccess
JavaScriptisakindofdynamiclanguage,whichmeansattributescanbeaddedordeletedatruntime,andthey’refrequentlychanged.MostJavaScriptenginesuseadictionarystylestructuretostoretheattributesofanobject,soitrequiresawholedictionarysearchtofindthepositionofattributesinmemory.It’squiteinefficientandit’sslowerthanJavaandSmalltalk.
Tosolvethisproblem,V8discardeddynamicsearchandrealizeditinadifferentway:
Createhiddenclassesforobjectsdynamically.InJavaScript,everytimewhenwe’readdinganewattributetoanobject,wecreateasubclasswiththenewattributefromahiddenclassasthesuperclass.It’sarecursivecourseandtheaboveperformancehappensonlyoncewhenwefirstdothis.Laterwejustusetheprevioushiddensubclasswhenwe’reinthesamesituation.Sothere’snoneedtorepeatoperationandcreateadictionary.Thisleadstothesaveoftimeandenergy,aswellmakeiteasierfortheimplementationofclassoptimizationandinnercache[4].
2.3.2.DynamicCodeGeneration
WhenJavaScriptisrunningfortheveryfirsttime,V8translateitdirectlyintolocalmachinecode,ratherthanexplainittobytecode.Attributeaccessisdonebyinnercache,whichisoftentranslatedintoinstructionsbyV8atruntime.
Whenitcomestothecodewherecertainobjectisaccessed,V8triestofindthecurrenthiddenclass.Meanwhile,V8assumesthatallobjectsinthesnippetaredescribedbythesamehiddenclass,soV8willmodifycorrespondinginnercachetomakethedirectuseofthehiddenclassmoreconvenient.Ifthisassumptioniscorrect,theaccessofattributescanbealldoneinonly1instruction.Evenifthepredictionfails,innercacheismodifiedagainbyV8,whichwon’ttaketoomuchtimeandresource.Whenonehiddenclassissharedbyalotofobjects,theaccessspeedcanbeclosetomostdynamiclanguageaccessspeed.Innercacheandhiddenclass,mixedwithdynamiccodeandclassoptimization,improvetheefficiencyofJavaScriptatalargescale[4].
2.3.3.EffectiveTrashCleaning
V8doesmemoryrecyclesautomatically.Toguaranteethespeedofobjectdistribution,aswellcutthetimeoftrashcleaningandclearfragmentup,V8willinterrupttherunningapplicationwhenperformingtrashcleaning.Mostly,onlyasmallpartofobjectstackisinvolvedintrashcleaningcycle,sotheinterruptioncausedlittle.AlllocationofobjectsandpointersareloggedbyV8,sothesystemwon’ttakeobjectforpointerandmemoryoverflowisavoided[4].
Besides‘themostfluentwebbrowser’,GooglecollaboratedwithAdobeandAndroid2.2FroyofullysupportsFlash.That’stosay,notonlyflashmedia,butallflashwebpagescandisplayperfectlyonAndroid.Tothecontrary,AppleturneddownAdobeandtakeHTML5asiPhone’swebprotocol,makingitunabletoshowsomeflashbasedanimation.
Android2.2Froyoalsoleadsthewayinnetworksharing.SmartphonewithFroyocanbeconnected