Christopher Fontaine

03/29/2010

Project Snapshot

(Study into the History of OS X Added and Ongoing)

Part 1: A brief review of the history of the development of the system.

Section 1: Android OS

Android is the name of a Linux-derived operating system created for use with mobile devices. Development of the Android OS began back in July 2005, when Google Inc. purchased Android Inc., a startup company based in Palo Alto, California. Andrew Rubin, co-founder of Android Inc., was tasked with leading the team to develop a mobile platform through which Google could leverage its formidable search capability in response to the then recent release of Apple’s iPhone. Due to its open-source nature, its upgradeability and flexibility was advertised heavily to mobile phone makers and carriers.

The Android Operating System 1.0, based on Linux 2.6.29, was officially unveiled on November 5th, 2007, alongside the creation of the Open Handset Alliance, a group of companies dedicated to developing and promoting open standards for mobile devices. The Android Software Development Kit was released a week later on November 12th. Since then, a number of updates have been released for the Android OS, beginning with the April 30th, 2009 release of 1.5 update codenamed Cupcake. This was followed by the September 19th release of the 1.6 update codenamed Donut. The most recent update, on October 26th, pushed Android’s version number to 2.0. Codenamed Éclair, this update diverges from the previous two in that it is based on Linux kernel version 2.6.29, rather than 2.6.27.

Section 2: iPhone OS

The iPhone OS is a derivation of Mac OS X, and therefore they share many critical components such as the OS X kernel itself, BSD sockets for networking, the Cocoa API, and Objective-C and C/C++ compilers. The most critical difference between the two is streamlining. The iPhone OS has many applications and other data, such as drivers, fonts, screensavers, etc, stripped out as a space saving measure. In addition, the iPhone OS uses a touchscreen optimized U.I. in favor of the obviously desktop oriented OS X.

Mac OS X and the iPhone OS both use the XNU (“X is Not Unix”) operating system hybrid kernel. XNU was originally developed by a computer company called NeXT, created by Steve Jobs in 1985, for use in their NeXTSTEP operating system. After NeXT was acquired by Apple Inc. in late 1996, XNU was updated using the Mach 3.0 operating system microkernel, parts of the FreeBSD operating system, and a C++ API for driver development called I/O Kit. This new operating system would be known, initially, as Rhapsody. From there, additional APIs, such as Carbon which provided backwards compatibility for older Mac OS 8 and 9 applications, and support for more programming languages, such as C, Objective-C and Java, were added. Rhapsody’s core components would be split off into the open-source Darwin operating system, while Apple’s new operating system would be labeled and released as Mac OS X Server 1.0. One year later, this would be followed by a public beta of Mac OS X, codenamed Kodiak, for the desktop. One year after that Mac OS X v10.0, codenamed Cheetah, would be released. Six months later, v10.1, codenamed Puma, would be unveiled. Versions 10.2 “Jaguar” to version 10.6 “Snow Leopard” would be released in roughly 1 year intervals from that point forward. The iPhone OS was originally revealed on January 9th, 2007. Since then, it has undergone 3 major releases, with a 4th that is currently in development.

Part 2: A description of the hardware each system is running on

We will take a moment to look at the platforms each OS runs on. Because the Android OS is available on multiple hardware platforms, we will simply choose one and use that as a basis for how other hardware platforms might be developed.

Section 1: Google Nexus One

The Google Nexus One is a smartphone developed by Google Incorporated and manufactured by HTC (High Tech Computer) Corporation based in Taiwan. It runs the Android 2.1, codenamed Éclair, operating system. The Nexus One is an unlocked device, meaning it can run on a variety of network providers. Currently T-Mobile and AT&T offer the smartphone, with Verizon and Vodafone, based in Europe, to follow later this year. The Nexus One was originally released on January 5th, 2010 with a total of 135,000 units sold during a 74-day period. This number drastically pales in comparison to the 1st generation iPhone and Motorola Droid, which sold 1 million and 1.05 million units during their first 74-day periods respectively. It is suspected that the Nexus One’s lack of advertising in comparison to its two major competitors is what resulted in its poor sales performance.

The Nexus One utilizes the Qualcomm QSD8250, codenamed Snapdragon, SoC (System-on-Chip). The Snapdragon SoC integrates a 600Mhz DSP (Digital Signal Processor), a 3G modem, 802.11 b/g Wi-Fi, Bluetooth 2.1+EDR, Standalone and Assisted GPS provided by Qualcomm’s gpsOne-branded engine, quad-band mobile telephony and broadband support that allows access to GSM, GPRS, HSPA and EDGE networks, and an ATI-developed Adreno 200 GPU which provides up to 720p display support and various types hardware-based media decoding. With the overall features of the Qualcomm SoC outlined, we will now take a more in-depth look at the Scorpion CPU, which is the heart and brain of the Nexus One smartphone.

At the heart of the Qualcomm SoC is a 1Ghz Scorpion Core, created on a 65nm fabrication process. The Scorpion Core incorporates a superscalar, in-order, dual-issue CPU utilizing the ARM version 7 instruction set. It resembles a hybrid of a Cortex A8 and A9 processor, which both use the ARM instruction set as well. Direct memory access is provided by a 32-bit LPDDR1 (Low Power DDR1 or Mobile DDR1) interface. Also included are L1 and L2 caches, a trace cache, and a set of NEON (a market name for an advanced single instruction, multiple data instruction set that allows for acceleration of media and signal processing applications) and VFP (Vector Floating Point) version 3 extensions collectively labeled the VeNum Multimedia Engine. Besides the Qualcomm SoC, the Nexus One implements several other pieces of hardware that support the SoC as well as provide additional functionality.

The Qualcomm RTR6285 is a radio frequency transceiver chip that provides multi-band support for UMTS (Universal Mobile Telecommunications System) and Enhanced GPRS (General Packet Radio Service) networks. This chip supports the QSD8250 SoC, as the aforementioned HSPA (High Speed Packet Access) falls under UMTS and GSM, GPRS, and EDGE all fall under Enhanced GPRS. It also features Receive Diversity, which allows it combine RF signals from multiple antennas in order to increase overall signal strength, as well as the ability to receive GPS signals.

There are two power management integrated chips. The first is the Qualcomm PM7540, which provides power management for various onboard devices and functions such as the vibrator, keypad backlight, the AM-OLED screen, the onboard camera, charger detection and LED flashbulb. It also acts as a USB transceiver. The second PMIC is the Texas Instruments TPS65023, which directly manages the Nexus One’s 1400 mAh, 3.7 lithium-ion battery. Three power rails provide power to the CPU, peripherals, I/O, and memory.

Internal storage is provided by a Samsung 943 KA1000015M-AJTT multichip package that houses 4 gigabits of NAND flash storage as well as 4 gigabits of Mobile DDR system memory. A MicroSD card slot that is equipped with an included 4GB card provides additional storage. This is upgradeable to up to 32GB.

The Nexus One uses a 3.7-inch AM-OLED (Active Matrix – Organic Light Emitting Diode) display developed by Samsung. It has a resolution of 480x800, resulting in 252 pixels per inch. A capacitive multi-touchscreen developed by Synaptics is layered on top. A 5.0 megapixel camera and video recorder, capable of an image capture resolution of 2592x1944 pixels or video recording at 720x480 pixels at 20+ frames per secod, is accompanied by an LED flashbulb. Other components include a GSM power amplifier, a voice processor that includes ambient noise cancellation, and a separate low-power 802.11n and Bluetooth 2.1+EDR transceiver chip.

The over BOM (Bill of Materials) cost for the manufacture of a single Google Nexus One is $174.15

Section 2: iPhone 3GS

The iPhone 3GS is the latest version of the iPhone, which was developed by Apple Inc. and manufactured by the Foxconn Technology Group based in China. The original iPhone was released June 29th, 2007 and sold 1 million units in its first 74 days. The 3GS was released June 19th, 2009 and sold over 1 million units in its first 3 days. It originally ran the iPhone OS ver. 3.0, which was launched at the same time as the 3GS, and now runs the latest iPhone OS ver. 3.1.3. Like previous iPhones, it is exclusive to AT&T. It features a faster processor, higher resolution camera, and support for higher speed data transfers compared to its predecessors.

The iPhone 3GS uses a derivative of the Samsung S5PC100 system-on-chip, which consists of a Cortex A-8, a dual-issue, 13-stage CPU using the ARM instruction set and built on a 65nm process, running at 600Mhz. It features a 32kb L1 I-cache, 32kb L1 D-cache, a 256kb L2 cache, and the same NEON extensions found in the Scorpion Core. Memory access is provided by a 32-bit interface to 2 gigabits of embedded DRAM. In addition, there is an external multichip package containing 128 megabits of NOR flash which contains the OS and 512 megabits of mobile DDR system memory. As well, 16GB of MLC NAND flash acts econdary storage for applications and data. The SoC also houses a USB transceiver.

The iPhone 3GS, unlike the Nexus One, boasts discrete video and audio facilities (though the GPU is still built into the SoC). The PowerVR SGX 535 GPU, which is integrated into the SoC, is built on a 65nm process, uses a fully programmable universal shader architecture, and operates at 200MHz. It offers over the 7 times the performance of the GPU found in its predecessor, the 3G. It supports OpenGL ES 1.0 and 2.0, OpenCL, DirectX 10.1, and Shader Model 4.1. A Cirrus Logic ultra low power audio codec handles the speaker, headphone port, and mic.

There are four signal power amplifiers present on the 3GS. Three WCDMA and HSUPA amplifiers manufactured by Triquint, and one GSM and EDGE amplifier manufactured by Skyworks. They all feed into an RF transceiver manufactured by Infineon on a 130nm process. It features quadband GSM and EDGE support, and tri-band WCDMA (Wideband Code Division Multiple Access) and HSDPA support. This, in turn, feeds into a digital baseband processor also manufactured by Infineon that is compromised of two ARM926 and ARM7 cores. The 3GS’s GPS receiver is also manufactured by Infineon, and feeds into a Broadcom 4325 Wi-Fi and Bluetooth Transceiver that supports the 802.11 b/g and Bluetooth v2.1+EDR standards, along with support for FM radio. Two power management integrated chips, one developed by Dialog Semiconductor and the other by Infineon, manage power for the Samsung SoC and the just described RF chain respectively. An Infineon GPS receiver; AKM Semiconductor 3-axis electronic compass, which also integrates an ADC (analog-to-digital converter), DAC (digital-to-analog converter), and temperature sensor; and an STMicroelectronics 3-axis accelerometer round out the internal hardware for the 3GS.

The 3GS uses a 3.5-inch IPS (In-Plane Switching) LCD display with a resolution of 320x480 pixels, resulting in 163 pixels per inch. A capacitive multi-touch screen is layered on top. Both of these components are manufactured by Toshiba. A 3.0 megapixel camera and VGA resolution video recorder is included which possesses facilities for geotagging and automatic focus, white balance, and exposure.

The overall BOM cost for the manufacture of a single iPhone 3GS is estimated to be $178.96.

Part 3: A description of each operating system

Section 1: Android OS

The Android system architecture is broken up into several layers. Starting from the bottom to the top they are the Linux 2.6.29 kernel, which handles device drivers, memory management, process management, power management and networking; the native Android libraries which handle window composition, 2D and 3D graphics, media codecs, storage, and web rendering; the Android runtime, which contains a register-based, slimmed down Java virtual machine called Dalvik as well as the core Java libraries; the Application Framework layer, which holds the vital Activity Manager that manages application life cycles and user navigation; and finally the Applications layer, where application code resides. As we analyze Android and its various mechanisms, we will be stepping in and out of these layers as we go along. A description of application fundamentals, including inter-process communication and thread management; memory management; networking support; power management; and the Android SDK will be given.

All applications in Android run in their own Linux process, with an associated thread, which is tagged with a Linux user ID, and each process exists inside its own Dalvik virtual machine. In addition, default permissions are set so application data is only visible to the user ID assigned to the application’s process, basically to the application itself. This means that all application code and data exists wholly separate from any other application. While it is possible to arrange for applications to share the same user ID, Linux process, and/or virtual machine, normally applications are required to communicate with each other via message passing in the form of remote procedure calls. However, before we get into inter-process communication, it is important to know the various components of an application, as this will determine how they can communicate.

Android applications all have the capability of using ‘parts’ of other Android applications. For example, let’s say application A1 has need of a certain type of GUI, and that GUI has already been implemented in application A2. Rather than re-writing the GUI again, A1 can simply use the GUI of A2. This is not an example of incorporating application code or linking. Rather, A1 simply starts that specific ‘piece’ of A2 and goes from there. In order for this to be possible, all Android applications exist as a set of ‘components’. This means that, unlike traditional software, there is no set starting point for the program, such as main(). Rather, when an application is started, the necessary components are started as needed. There are four types of application components in Android, they are Activities, Services, Broadcast Receivers, and Content Providers. These components, or base classes, all implement a series of subclasses and methods that perform their various functions. All components are executed in the main thread of the application.