1 / 22

Case study 2

Case study 2. Android – Mobile OS. Sources and extra reading. Silberschatz , Galvin, Gagne. Operating System Concepts Essentials. 8th Edition. ISBN: 978-0-470-88920-6 A. Tanenbaum . Modern Operating Systems. 3rd Edition. ISBN: 0136006639

callie
Download Presentation

Case study 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Case study 2 Android – Mobile OS

  2. Sources and extra reading Silberschatz, Galvin, Gagne. Operating System Concepts Essentials. 8th Edition. ISBN: 978-0-470-88920-6 A. Tanenbaum. Modern Operating Systems. 3rd Edition. ISBN: 0136006639 H. Al-Rayes. Studying Main Differences between Android & Linux Operating Systems. Diyala University. Android Developer Website. http://developer.android.com

  3. Topics covered in this session • History of Android • Android design principles • Android Architecture • Memory Management • Threads and Scheduling • Android File System • Security • Programming Interface

  4. History of Android • What is android? Linux 2.6 based operating system for mobile devices. • Open source and released under Apache Licence (Carriers can modify it before distributing). • Google acquired android in 2005. • Android 1.0 released 2008. • In 2012 Android 4.2 released • Improvements include support for new devices: • Cameras • Multi core CPU • Barometer • etc

  5. Design principles – What is required of a mobile OS? • Long battery life. • Fast boot up. • Fast response. • Applications (Programming environment?) • Security • How do these differ from the needs of a desktop system? • Consider how the above are met by the system design.

  6. Mobile hardware differences • Battery • Touch screen • Portable (Mobile CPU) • More limited memory • Fewer devices

  7. Android Architecture Source: http://developer.android.com/about/versions/index.html

  8. Android Architecture Source: http://developer.android.com/about/versions/index.html

  9. Android Architecture Source: http://developer.android.com/about/versions/index.html

  10. Android Architecture Source: http://developer.android.com/about/versions/index.html

  11. Android Architecture Source: http://developer.android.com/about/versions/index.html

  12. Application life cycle

  13. Memory management • Android uses it’s own virtual machine to manage application memory. • Dalvik VM allows multiple instances of VM to be running efficiently in parallel.

  14. Process Management • Differences between mobile app cycle and desktop app cycle? • Key principles: • Android does not usually kill an app, they keep running even after you switch, but saves state • Task killers? • Android kills apps when memory usage too high. • But saves it’s state for quick restart. • Uses Linux’s time sliced scheduling policy based on priority

  15. Process Priorities • Split into background and foreground. • What happens if UI thread is starved?

  16. Disk I/O

  17. Why not use swapping? • What needs storing? Consider a map application (Lat/long). • Swapping to flash affecting life.

  18. Android File System • Supports multiple different file systems (based on Linux Kernel). • Usually yaffs2/vfat/ext4, depending on device manufacturer. • Partitions: • /boot (Included android kernel) • /system (Android GUI and pre-installed applications). – Read only • /recovery (Backup) • /data (User data) • /cache (Frequently accessed data) • /misc (Contains misc system settings in form of on/off switches) • /sdcard (SD card)

  19. Security • Android seeks to be the most secure and usable operating system for mobile platforms by re-purposing traditional operating system security controls to: • Protect user data • Protect system resources (including the network) • Provide application isolation • To achieve these objectives, Android provides these key security features: • Robust security at the OS level through the Linux kernel • Mandatory application sandbox for all applications • Secure interprocess communication • Application signing • Application-defined and user-granted permissions

  20. Security Continued • Assigns .unique user ID (UID) to each android application. • Uses UNIX style file permissions due to different UIDs • Ensures app A doesn’t read app B’s files. • Ensures app A doesn’t exhaust B’s memory • Ensures app A doesn’t exhaust B’s CPU usage • Ensures app A doesn’t exhaust user Bs devices (GPS, BT) • Linux kernel enforces security between applications • Stops memory corruption errors causing vulnerabilities. • Read only system partition

  21. Security Continued • Use of restricted APIs require application permissions. • Application Signing. Application packages are signed to identify author and prevent tampering. Some windows 7 system files are signed in a similar way.

  22. Programming for Android • Each program runs in it’s own VM. • Need to understand an activities lifecycle. • Make use of Android SDK • Applications programmed in Java, with layouts coded in XML. • Packaged as .apk files for delivery through Android store. • Importance of file size + data usage.

More Related