1、河南科技学院2015届本科毕业设计外文资料及翻译An Analysis and Comparison of Open and Closed Mobile1. Introduction In recent years, the popularity of smart phone kept going up. More and more smart phones are sold anda lot of people are embracing them. Smart phones brought great convenience to users, as well created opport
2、unities for smart phone researchers. Thats to say, the wide spread of smart phones benefited both sides. At the same time, developing ofsmart phone OS becomes one of the smartest industry. To be a smart phone OS, the system should: 1. Provide services like a PC. 2. Work with a GPU for better visual
3、effects. 3. Allow the user to surf on Internet freely. And apparently, therere also some weaknesses:1.Limited battery. 2. Poor CPU performance against PC CPU. 3. Small storage. 4.The use of RAM may leads to loss of data when the phone runs out ofbatteryNow the 2 giants of smart phone OS are Android
4、and iPhone OS. On one side, Android is based on Linux kernel and Dalvik virtual machine, and it is open sourced. The upper layer of Android is Java based,allowing developers to develop Android applications with Google SDK and sell their software in Android Market. On theother side, iPhone OS, which
5、bases on Unix kernel and Darwin model but is closed sourced,evolvesfrom Mac OS X and is the default OS of iPhone, iPod Touch and iPad. Objective C based software can run in iPhone OS, and just like Android, you can develop your own iPhone applications and upload them onto Apples App Store for sale 1
6、 2 3 4. By comparing the latest Android and iPhone OS, Android 2.2 Froyo and iOS 4, we can take a glimpse at the main feature of open and closed smart phone OSs. While the 2 OSs are designed in rather different mentality and functionality, its a little early to tell which one is better. 2. Smart Pho
7、ne OS 2.1. Android The system architecture of Android consists of 5 layers, which are Linux Kernel, Android Runtime, Libraries, Application Framework and Applications, from bottom to top. Android provides core services like security, memory management, process management, network stack and drivers,
8、basing on Linux 2.6. Beingthe abstract layer between software and hardware, the layer of LinuxKernel hides the implementing details of hardware and provides integrated services for upper layer. Dalvik virtual machine and Java core libraries are included in the layer of Android Runtime, providing mos
9、t functions in Java core libraries. The layer of Libraries contains a class of C/C+ libraries for Android components. Those libraries are integrated by the layer of Application Framework and then provided to developers. The layer of Application Framework provides all kinds of modules for program ini
10、tialization to simplify the use of components, allowing developers do whatever they want and provide services for other softwares, under the limitation of security, of course. Mainstream applications are located in the layer of Application, including e-mail, SMS, calendar, Google map, Web browser an
11、d contacts. Users interact directly with this layer 1 2. The latest version of Android, Android 2.2 Froyo, puts on some new features. They are: 1. Support Flash 10.1, enables user to watch flash on the phone. 2. V8 JavaScript engine in web browser leads to faster Internet data transportation. 3. Big
12、 advance in network sharing. You can use the phone as a 3G NIC,or convert 3G signalto Wi-Fi. 4. Automatically software update. 5. Softwares can be setup in SDcard to extend file storages. 2.2. iPhone iPhone OS is consist of 4 abstract layers: Core OS, Core Service, Media and Cocoa Touch respectively
13、. Layers of Core OS and Core Service are designed in C language to handle core system services, enabling developers to perform file access,sockets calling and data handling. CFNetwork and SQLite are also parts of these 2 layers. The layer of Media, according to its name, this layer is used to contro
14、l video and audio, as well handle 2D and 3D images. The Open GL-ES Quratz part of the layer is coded with C language, while the part of Core-Audio and Core-Animation is Objective C based. The layer of Cocoa Touch builds a basic framework for all kinds of programs in iPhone. Most programs run in Coco
15、a Touch layer, and its surely Objective C based 3 4. The latest iPhone OS is iOS 4. It includes the following new features: 1.Software classification. This feature enables user to place sorted softwares into different documents, making it clearer to manage. 2. Email integration. One account isfor al
16、l e-mails from different providers. 3. iBook, originally from iPad, is built in iOS. 4. A brand new Apple Game Center makes iPhone a tremendous entertainment platform. 2.3. Android vs. iPhone Being the top 2 smart phone OSs, were sure that both Android and iPhone have their own advantages and disadv
17、antages. Now lets take a look at each of them, and see what unique feature they have. Android 2.2 Froyo fully support multitask, which means you can listento music while writing blog. And iOS 4, officially announced to be multitasked, is in fact a play of concept. Only a few of softwares which are a
18、uthorized by Apple can run simultaneously, whose principle is much easier that multitask:when an application is switched out,its current state is saved and then the system just closes it. And when its switched in, were back to the previous snapshot 5 6 7. During the publication of Android 2.2 Froyo,
19、 Google announced it has the most fluent web browser,because the use of V8 JavaScript engine. V8 is a brand new engine, designed for running big size JavaScript application. In some kind of tests, V8 is much faster than JScript fromInternet Explorer, SpiderMonkey from Firefox and JavaScriptCore from
20、Safari. It all owe to 3 key parts of V8, theyre fast attribute access, dynamic code generation, effective trash cleaning. 2.3.1. Fast Attribute Access JavaScript is a kind of dynamic language, which means attributes can be added or deleted at runtime, and theyre frequently changed. MostJavaScript en
21、gines use a dictionary style structure to store the attributes of an object, so it requires a whole dictionary search to find the position of attributes in memory.Its quite inefficient and its slower than Java and Smalltalk. To solve this problem, V8 discarded dynamic search and realized it ina diff
22、erent way: Create hidden classes for objects dynamically. In JavaScript, every time when were adding a new attribute to an object,we create a subclass with the new attribute from a hidden class as the super class. Its a recursive course and the above performance happens only once when we first do th
23、is. Later we just use the previous hidden subclass when were in the same situation. So theres no need to repeat operation and create a dictionary. This leads to the save oftime and energy, as well make it easier for the implementation of class optimization and inner cache 4. 2.3.2. Dynamic Code Gene
24、ration When JavaScript is running for the very first time, V8 translate it directly into local machine code, rather than explain it to bytecode. Attribute access is done by inner cache, which is often translated into instructions by V8 at runtime. When it comes to the code where certain object is ac
25、cessed, V8 tries to find the current hidden class. Meanwhile, V8 assumes that all objects in the snippet are described by the same hidden class, so V8 willmodify corresponding inner cache to make the direct use of the hidden class more convenient. If thisassumption is correct, the access of attribut
26、es can be all done in only 1 instruction. Even if the predictionfails, inner cache is modified again by V8, which wont take too much time and resource. When one hidden class is shared by a lot of objects, the access speed can be close to most dynamic language accessspeed. Inner cache and hidden clas
27、s, mixed with dynamic code and class optimization, improve the efficiency of JavaScript at a large scale 4. 2.3.3. Effective Trash Cleaning V8 does memory recycles automatically. To guarantee the speed of object distribution, as well cut the time of trash cleaning and clear fragment up, V8 will inte
28、rrupt the running application when performing trash cleaning. Mostly, only a small part of object stack is involved in trash cleaning cycle, so the interruption caused little. All location of objects and pointers are logged by V8, so the system wont take object for pointer and memory overflow is avo
29、ided 4. Besides the most fluent web browser, Google collaborated with Adobeand Android 2.2 Froyo fully supports Flash. Thats to say, not only flash media, but all flash web pages can display perfectly on Android. To the contrary, Apple turned down Adobe and take HTML5 as iPhones web protocol, making
30、 it unable to show some flash based animation. Android 2.2 Froyo also leads the way in network sharing. Smart phone with Froyo can be connected toa PC as a 3G NIC, and can also conveniently convert 3G signal to Wi-Fi. iOS 4 can do the first too, butfailed to convert 3G to Wi-Fi. Video conference is
31、both supported by Froyo and iOS 4, but the conditions are different. You can see aFroyo user via camera as long as youget a camera also. However, iOS 4 user can only do video talk toanother iOS 4 user, which is a big limitation. While Android is ascendant in network interaction, Apple is unique init
32、s friendship and entertainment.The added feature of software classification enables user to place sorted softwares into differentdocuments, making it clearer to manage. Whats more, therere hundreds ofthousands applications inApp Store, meaning that iPhone can have up to hundreds of thousands functio
33、ns. This is a ratherremarkable feature that Apple publicizes. And the most convincing point given by Apple, is that Android looks exactly familiar with iPhone. Although its just a subjective sense, the born of iPhone really brought big revolution to the phone industry, and the name Apple itself is a
34、 world famous brand 7 8. 3. Open and Closed platforms 3.1. SDK The most important part of every developing platform is SDK, enable 3rd party developers to make software for the platform. Usually, libraries, debug tools and emulators are included in SDK. Different platforms distribute their SDKs diff
35、erently. Some SDK is complete free and open, while others are strictly limited. Developers of open platforms can get and modify part or all of the source code. Google and Linux are leaders of open platforms; they publicized the whole source code of Android and Linux. The good point is that, platform
36、 owners can save a great amount of time and energy developing and maintaining the platform, because 3rd party developers willdo this for them. With less money spent on development and maintenance, a relatively low price can attract more and more phone users. Contrarily, closed platforms lock their s
37、ource code in the safety andforbid 3rd party accesses. Apple and Microsoft are the representatives of them, they are both closed sourced, but some differences do exists. 3rd party iPhone applications are restricted within narrow limits, for that Apple will look through every application which is upl
38、oaded onto App Store, and a lot of applications are turned down.Microsoft dont check Windows applications at all, it all depends on the users themselves. You installed the mareware, you suffer the loss. 3.2. Application Market Market is the medium between developers and users, hence its very importa
39、nt. Some predicted that there will be more and more application markets while some dont think so. In current markets, both do exist.Some specify only one market for their products, while others sell their softwares in various markets. Softwares from Nokia, Microsoft and Linux Mobile are sold in ever
40、y market. Developers of these platforms can release their own applicationin whatever markets, so markets have to compete with each other for a living. This is good for users. However, the lack of universal management may lead to mess and chaos, softwares that have the same functionality exist in dif
41、ferent markets, which confuses users a lot. Correspondingly, sole markets claim that most applications should be sold in them. This kind of monopolization leads to no competitor. App Store and Android Market are deputy of sole markets. Normally, iPhone applications can only be found in App Store, an
42、d Apple will check every one of them by itself. Good news is that every applicationin App Store is officially tested, its safe; Bad news is that a lot of pretty good softwares are rejected for various reasons. And a big unofficial mechanism is built by hackers, that is jailbreak and SIM unlock. Jail
43、break is a process that allows iPad, iPhone and iPod Touch users to gain root access and unlock the operating system thus removing any limitations imposed upon them by Apple. Once jailbroken, iPhone users are able to download many extensions and themes previously unavailable through the App Store vi
44、a installers such as Cydia. A jailbroken iPad, iPhone or iPod Touch is still able to use the App Store and iTunes 9. And a SIM lock is a capability built into GSM phones by mobile phone manufacturers. Network providers use this capability to restrict the use of these phones to specific countries and
45、 network providers.Generally, phones can be locked to accept only SIM cards based on the International Mobile Subscriber Identity. SIM unlock make it possible to use a mobile phone without considering countries and networks specified by mobile phone manufacturers. However in Android, Google doesnt t
46、est every application at all, so although theres an official market for Android applications, you canstill release your product anywhere you want. Considering security problems, Google banned the use of some components. Like jailbreak and SIM unlock in iPhone, root in Android gives users 100% contro
47、lof their devices, along with some security risks. Root is a process that allows users of cellphones running the Android operating system to attain privileged control (known as “root access“) within Androids Linux subsystem, similar to jailbreaking on Apple devices runningthe iOS operating system, o
48、vercoming limitations that the carriers and manufacturers put on such phones. Rooting makes it possible to usecustom versions of the Android system such as CyanogenMod, supporting features unavailable in stock ROMs. It also allows for newer versions of Android not supplied by the original device man
49、ufacturer. In contrast to iOS jailbreaking, rooting is not needed to run applicationsnot distributed by the official Android Market. It is needed however, when trying to access paid Android applications from countries which are not part of the paid applications market. 3.3. Integration Some companies focus only on their core industry, i.e. develop an operating system and provide an environment for 3rd party development. Others not only do these, but manage the process of developing a s