OS
- Abhilasha
- Jul 11, 2024
- 4 min read
Android Architecture: Revision Notes
1. Application Framework:
Developer Use: Primarily used by application developers.
Hardware Developer Awareness: Developer APIs often map directly to underlying HAL interfaces, providing helpful information for implementing drivers.
2. Binder IPC:
Mechanism: Allows application framework to cross process boundaries and interact with Android system services.
Hidden Communication: At the application framework level, communication is hidden from the developer, making things appear seamless.
3. System Services:
Functionality: Application framework APIs communicate with system services to access hardware.
Modular Services: Includes components like Window Manager, Search Service, Notification Manager.
Service Groups:
System services (e.g., Window Manager, Notification Manager).
Media services (e.g., playing and recording media).
4. Hardware Abstraction Layer (HAL):
Standard Interface: Defines a standard interface for hardware vendors, allowing Android to be agnostic about lower-level driver implementations.
Modular Implementation: HAL implementations are packaged as modules (.so files) and loaded dynamically.
Custom Implementation: Developers must implement HAL and driver for their specific hardware, adhering to hardware-specific HAL interfaces.
5. HAL Modules:
Implementation: Built into modules (.so files), dynamically linked by Android.
Building Modules: Use Android.mk files for each HAL implementation, pointing to source files.
Naming Scheme: Shared libraries must follow a specific naming pattern: <module_type>.<device_name>.
6. Linux Kernel:
Driver Development: Similar to developing typical Linux device drivers.
Special Additions: Android uses a modified Linux kernel with additions like wake locks, Binder IPC driver, and other mobile-specific features.
Kernel Version: Any kernel version can be used if it supports required features like the binder driver.
iOS Architecture: Revision Notes
1. Core OS Layer:
Foundation Layer: Manages memory, file systems, networking, and other OS tasks.
Hardware Interaction: Directly interacts with the hardware.
2. Core Services Layer:
Abstraction: Provides fundamental access to iOS services over the Core OS layer.
Components:
Collections: Data management and service features.
Address Book: Access to user's contacts.
Networking: Determines network availability and state.
File Access: Access to lower-level OS services.
SQLite: Embedded SQL database.
Core Location: Determines device location and orientation.
Net Services: Determines network connection and server accessibility.
Threading, Preferences, URL Utilities: Data management and service features.
3. Media Layer:
Multimedia Services: Provides services for audio, video, and image handling.
Components:
Core Audio: Playback and recording of audio.
OpenGL/OpenGL ES: 2D and 3D animations.
Audio Mixing/Recording: Mixes system announcements with background audio and records sound.
Video Playback: Plays video using MPMoviePlayerController.
Image Formats: Interfaces for JPG, PNG, TIFF.
PDF: Text layout and rendering.
Quartz: Image and video processing, animations.
Core Animations: Advanced support for animating views.
4. Cocoa-Touch Layer:
Abstraction Layer: Provides libraries for iPhone and iOS device programming.
Multi-Touch Support: Located at the top due to Multi-Touch capabilities.
Components:
Multi-Touch Events: Detects taps, swipes, pinches, etc.
Multi-Touch Controls: Responds to multi-finger touch actions.
View Hierarchy: Model-View-Controller pattern management.
Alerts: Communicates errors or requests input using UIAlertView.
People Picker: Displays contact details from AddressBook.
Controllers: Manages basic application behaviors and view reorientation.
Accelerometer/Gyroscope: Measures device motion and rotation.
Localization/Geographical: Adds maps and satellite images.
Web Views: Embeds web content and displays HTML.
Image Picker: Multi-dimensional user-interface element.
BlackBerry 10 Architecture: Revision Notes
1. CPU Embedded Bootloader:
Digital Signature Verification: Verifies the digital signature of the bootloader code before execution.
2. Bootloader:
OS Signature Verification: Verifies the digital signature of the OS before it runs.
3. Microkernel:
Minimal OS Software: The essential software required for the OS to function.
4. Radio:
Drivers and Services: Includes drivers, stacks, and services to support radio subsystems for voice, data, and other services.
5. Drivers and BSP (Board Support Package):
Hardware Support: Contains drivers and board initialization logic to support the device hardware.
6. OS:
Kernel-External Processes: Processes that operate outside of the kernel.
7. Platform and Application Services:
Background Services: Includes security management, software installation and management, media services, and more.
Service Isolation: Ensures apps cannot run background services or access protected system components directly.
8. Application Runtimes:
Isolated Sandboxes: All applications run in isolated environments.
Supported Platforms: Supports native SDK, Android, and HTML5 applications.
9. Apps:
Preloaded and Installed Applications: Includes preloaded, user-installed, and organizationally deployed apps.
OS Comparison: Revision Notes
Windows OS:
Architecture:
User Mode: Less privileged, uses APIs for system services, no direct hardware access.
Kernel Mode: Privileged, direct hardware/memory access, three components: Windows Executive, Kernel, HAL.
Features:
User-friendly interface, extensive application support.
Strong integration with Microsoft services.
Suitable for desktop and server environments.
Linux OS:
Architecture:
Kernel: Core component, interacts with hardware, provides low-level services.
System Library: Accesses kernel features, implements OS functionalities.
System Utility: Specialized programs for individual tasks.
Features:
Open source, portable, multi-user, multiprogramming.
Hierarchical file system, shell for command execution.
Strong security through authentication and encryption.
Mac OS:
Architecture:
Darwin Core: Comprises Mach, BSD, and I/O Kit.
Mach: Manages CPU, memory, IPC, and real-time services.
BSD: Provides file systems, networking, UNIX security, and POSIX APIs.
I/O Kit: Framework for device drivers, modular and extensible.
Features:
User-friendly interface, strong multimedia capabilities.
Seamless integration with Apple ecosystem.
High stability and security, UNIX-based.
Android OS:
Architecture:
Linux Kernel: Modified for mobile use, includes wake locks and Binder IPC.
HAL (Hardware Abstraction Layer): Standard interface for hardware vendors.
System Services: Modular components like Window Manager and Notification Manager.
Application Framework: APIs for app development.
Apps: User-installed or preloaded applications.
Features:
Open source, highly customizable.
Extensive app ecosystem, strong Google integration.
Suitable for smartphones and tablets.
iOS:
Architecture:
Core OS Layer: Foundation, manages memory, file system, and networking.
Core Services Layer: Abstraction over Core OS, includes collections, address book, networking, SQLite, etc.
Media Layer: Multimedia services (audio, video, graphics).
Cocoa-Touch Layer: Multi-touch events, view hierarchy, controllers, and more.
Features:
Secure, smooth performance.
Extensive app ecosystem, strong Apple ecosystem integration.
Consistent user experience, robust multimedia capabilities.
BlackBerry 10:
Architecture:
CPU Embedded Bootloader: Verifies bootloader code.
Bootloader: Verifies OS code.
Microkernel: Minimal software for OS operation.
Radio: Drivers for radio subsystems.
Drivers and BSP: Hardware support.
OS: Kernel-external processes.
Platform and Application Services: Security, installation, background services.
Application Runtimes: Sandboxed environments for native, Android, and HTML5 apps.
Apps: Preloaded, user-installed, or organization-deployed apps.
Features:
Strong security and enterprise features.
Supports multiple app platforms.
Focused on productivity and communication.
Windows Phone:
Architecture:
Similar to Windows OS: User mode and kernel mode separation.
Adapted for mobile use: Includes mobile-specific optimizations.
Features:
Seamless integration with Microsoft services and ecosystem.
User-friendly interface.
Limited app ecosystem compared to Android and iOS.
Comments