2. 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
Sources and extra reading
3. History of Android
Android design principles
Android Architecture
Memory Management
Threads and Scheduling
Android File System
Security
Programming Interface
Topics covered in this session
4. - 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
History of Android
5. 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.
Design principles – What is required of a
mobile OS?
6. Battery
Touch screen
Portable (Mobile CPU)
More limited memory
Fewer devices
Mobile hardware differences
13. Android uses it’s own virtual machine to manage application
memory.
Dalvik VM allows multiple instances of VM to be running
efficiently in parallel.
Memory management
14. 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
Process Management
16. Flash Hard Disk Drives
Random Access ~0.1ms 5-10ms
File fragment impact No Greatly impacted
Total power ½ to 1/3 of HDD Up to 15+ watts
Reliability Reliable Less reliable due to mechanical
parts
Write longevity Limited number of writes. Less of a problem
Capacity <=512GB Up to 4TB
Price $1.5 - 2.0 GB $0.10 - 0.20 GB
Disk I/O
17. What needs storing? Consider a map application (Lat/long).
Swapping to flash affecting life.
Why not use swapping?
18. 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)
Android File System
19. 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
Security
20. 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
Security Continued
21. 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.
Security Continued
22. 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.
Programming for Android