Mobile OS Architecture Notes Imp Topics
Mobile OS Architecture Notes Imp Topics
Mobile operating systems combine features of a desktop computer operating system with other features
useful for mobile or handheld use, and usually including a wireless inbuilt modem and SIM tray for
telephone and data connection. Mobile devices, with mobile communications abilities (for
example, smartphones), contain two mobile operating systems. The main user-facing software platform is
supplemented by a second low-level proprietary real-time operating system which operates the radio and
other hardware. Research has shown that these low-level systems may contain a range of security
vulnerabilities permitting malicious base stations to gain high levels of control over the mobile device.
The kernel is like the heart of the mobile OS. It handles the device’s hardware, like the CPU and
memory, and helps apps work smoothly. Moreover, it ensures hardware and apps can talk to
each other by managing tasks like scheduling, memory, and device connections.
Application Framework
It’s like the base for running mobile apps and takes care of things like managing apps’ lifecycles,
memory, security permissions, and how apps talk to the system. Famous frameworks include
Android’s SDK and iOS’s UIKit.
UI features include graphical and interactive elements for user-device interaction, covering menus, icons,
buttons, notifications, and visuals on screen.
App icons serve as shortcuts for launching them and represent individual applications installed on the
device. Finally, users can organize app icons on the home screen and in the app drawer, creating
personalized layouts for easy access to their favorite apps. The UI shapes the user experience and
determines how users interact with their devices.
Multitasking
Multitasking is a fundamental feature of modern mobile OS, allowing users to run multiple apps
simultaneously and switch between them seamlessly. While the device likely has only one processor,
multitasking creates the illusion of running multiple programs concurrently.
Few mobile OSs support split-screen multitasking, which lets users view and interact with two apps
side by side on the screen. However, users can also resize and adjust the layout of split-screen apps to
allocate screen space according to their preferences and multitasking needs.
Networking
It supports various wireless connectivity options, including Wi-Fi, cellular networks 3G/4G/5G,
Bluetooth, Near Field Communication (NFC), and GPS. These connectivity features enable users to
access the internet, make calls, send messages, transfer files, and use location-based services on their
devices.
In addition, it also supports hotspots and tethering features that allow devices to share their internet
connection with other devices. Users can turn their mobile devices into Wi-Fi hotspots or share their
cellular data connection via USB or Bluetooth tethering, enabling other devices to access the internet and
network resources.
The media and entertainment feature improves multimedia consumption, entertainment, and creativity on
mobile devices, using hardware capabilities, software, and online services to deliver diverse content.
Also, it features integrated media playback for playing diverse multimedia content like audio, video, and
online streaming. In addition, these features support managing and viewing images and photos
captured using the device’s camera or imported from other sources.
Device Management
This feature includes a settings section for users to manage their mobile devices, such as configurations,
updates, security settings, and preferences. It helps users customize their devices, improve performance,
ensure security, and troubleshoot issues effectively.
It also offers data backup and restore features that allow users to back up their device data, settings, and
app configurations to prevent data loss and facilitate device migration or recovery.
Security Services
Ensures device and data security against threats like malware, unauthorized access, and data breaches.
Additionally, it utilizes device encryption to protect internal data, requiring a decryption key for access.
Moreover, it secures the boot process by verifying the authenticity of the bootloader, kernel, and
operating system components for device integrity during startup.
App sandboxing is another security feature of OS that separates apps from each other. Each app
stays in its restricted area, limiting its access to system resources and other apps’ data. This stops harmful
apps from getting to sensitive information or harming the device. Sandboxing helps keep problems in one
app from affecting the rest and boosts the device’s overall security.
Cloud Integration
This integration enables users to store, sync, and access their data like photos, contacts, notes, and other
data in the cloud for secure backup and access from any device through cloud-based storage and services
such as iCloud (for iOS) or Google Drive (for Android).
Enables automatic data syncing across devices via cloud storage for seamless updates. Consequently,
some cloud services offer free tiers, while others require subscriptions or pay-as-you-go options.
It enables mobile devices to determine their geographic location using a combination of global
positioning systems (GPS), Wi-Fi, cellular networks, and Bluetooth.
Subsequently, it utilizes device location for personalized app features like search, traffic updates,
ads, geotagging, and gaming.
Personalization
Mobile OS personalization allows users to customize their devices to match their preferences and needs.
Personalization enhances user experience by making the device feel more intuitive and tailored to
individual preferences.
This includes features like:
Customizable home screens (arrangement of icons, widgets)
The ability to change themes, wallpapers, and icon packs.
Personalized notification settings.
Customizable keyboard layouts.
Options to adjust font sizes and display settings.
Other features include absence of bugs, Flexibility and adaptability, Support of cutting edge technologies,
Handy software installation Get-Go, stable performance on devices, and compatibility with different
hardware
ARM and INTEL architecture
The ARM architecture processor is an advanced reduced instruction set computing [RISC] machine and
it's a 32 bit RISC microcontroller.
• The ARM cortex is a complicated microcontroller within the ARM family that has ARMv7 design.
There are 3 subfamilies within the ARM cortex family: a) ARM Cortex Ax-series b) ARM Cortex Rx-
series c) ARM Cortex Mx-series
ARM architecture consists
INTEL Architecture
X86 is an ISA for computer processors originally developed by Intel in 1978. The x86 architecture is
based on Intel's 8086 processor (hence the name) and its 8088 variant. Initially designed for 16-bit
processors, it later evolved into a 32-bit instruction set.
Due to its versatility across nearly any computer, from laptops to home PCs and servers, the x86
architecture gained popularity among numerous processor manufacturers.
One significant limitation of the x86 architecture is its maximum support for 4096MB of RAM. With a
total combination of 2^32 (4,294,967,295), 32-bit processors can address up to 4.29 billion memory
locations, each storing one byte of data, equivalent to roughly 4GB of accessible memory. Today, the
term 'x86' refers to any 32-bit processor capable of running x86 instruction sets.
Smartphone Communication Design:
Receiver (RX)
- The RX hardware (part of the baseband processor) receives incoming signals and generates
interrupts for the radio interface in OS (both the radio interface and the OS software run on a
baseband or modem processor)
- After the reception, a physical layer handshake takes place. Then the incoming audio, video and
data are processed by the modem processor
- The radio OS components talk to the peripheral device drivers to give the incoming data to the user
through the device (display, speaker etc.)
Transmission (TX)
- The device drivers write the data to be transmitted in the memory, from where the radio OS
components collect them (For eg. audio from microphone, or image/video from camera, position
from GPS)
- These data are then processed by the modem processor as per the transmission protocol
- The Subscriber Identifier Module (SIM) plays an important role in reception and transmission
The application processor executes the user applications and related OS programs
- Applications such as audio / video codec and players, games, image processing, speech processing,
internet browser, text editor, etc
- Applications which are graphics intensive (the majority) are executed with help from the GPU
- Modern smartphone handsets have a large volatile memory (SDRAM) 1-2 GB and larger non-
volatile storage, typically more than 10 GB
- Mostly a traditional OS (Linux) is used after being stripped down and optimized for smartphone
The peripherals are Input / Output (I/O) devices through which the end-user interacts with the
handset. Of course, the OS needs driver software installed for each device. Typical peripheral devices
are LCD, touchscreen, keyboard, camera, GPS, speaker, microphone, bluetooth, WiFi, HDTV
Processors in Smartphones
The processors used in a smartphone are quite different from those used in a PC or laptop because
they have different design constraints. The trick is to balance power consumption against
performance. This is the primary design trade-off. Using an Intel Core i7 will drain the battery in a
few minutes flat while using something like an 8-bit microprocessor will not pack enough power to
run your browser and YouTube.
The market is rules by Advances RISC Machines (ARM), a British fabless company which sells its
smartphone processor designs to all major semiconductor manufacturers. ARM has won the game
because its designs are optimized for battery life Vs performance and have a low area and transistor
count. This is important to provide a small form factor and lower drain on the battery.
The Modem processor is a separate ARM processor or one extended by a DSP (the baseband
encoding and decoding involves a lot of number crunching). Some architectures also use a modem
accelerator along with the processor core.
It require fewer registers, but they require more memory. It processors require less memory, but more registers.
They use the memory which is already available to They require some extra memory for calculations.
them.
They are deployed in mobiles which deal with the They are deployed in Servers, Laptops where
consumption of power, speed, and size. performance and stability matter.
A hardware abstraction layer (HAL) is a software layer that provides a common interface between the OS
and the hardware components of a mobile device, such as the CPU, GPU, memory, sensors, and display.
By using a HAL, the OS can access and control the hardware without knowing the specific details of each
device model or manufacturer. This allows the OS to optimize power management by adjusting the
hardware parameters according to the device state, user preferences, and application demands. For
example, the OS can use the HAL to lower the screen brightness, reduce the CPU frequency, or turn off
unused sensors when the device is idle or in low-power mode.
(DEVICE POWER MANAGEMENT)
2 Application lifecycle management
Application lifecycle management (ALM) is the process of managing the creation, deployment,
execution, and termination of applications on a mobile device. The OS is responsible for managing the
ALM of each application, and ensuring that they run efficiently and securely. One of the ways that the OS
can optimize power management through ALM is by using a multitasking model that allows the OS to
suspend, resume, or kill applications depending on their priority, state, and resource usage. For example,
the OS can suspend an application that is running in the background but not actively used by the user, and
resume it when the user switches back to it. This can save battery power by reducing the CPU and
memory load of the device.
(SUSPEND-RESUME)
3 Power-aware scheduling
Power-aware scheduling is a technique that enables the OS to schedule tasks and processes on a mobile
device based on their power consumption and performance requirements. The OS can use power-aware
scheduling to balance the trade-off between energy efficiency and quality of service, and to adapt to the
changing conditions of the device and the environment. For example, the OS can use power-aware
scheduling to assign tasks to different cores of a multi-core CPU, depending on their priority and
workload. This can optimize power management by exploiting the heterogeneity and scalability of the
hardware, and by avoiding unnecessary power consumption or overheating
4 Power-saving modes
Power-saving modes are modes that allow the OS to reduce the power consumption of a mobile device by
limiting or disabling some of its functions or features. The OS can use power-saving modes to extend the
battery life of a device when it is low on charge, or when the user wants to conserve energy. The OS can
also use power-saving modes to comply with the regulations or policies of certain regions or networks
that impose restrictions on the power usage of mobile devices. For example, the OS can use power-saving
modes to turn off the cellular or Wi-Fi radios, lower the screen resolution, or disable the haptic feedback
of a device.
Power monitoring and profiling are techniques that enable the OS to measure and analyze the power
consumption of a mobile device and its components, such as the hardware, the OS, and the applications.
By using power monitoring and profiling, the OS can obtain accurate and detailed information about the
energy behavior and patterns of a device, and use it to optimize power management. For example, the OS
can use power monitoring and profiling to identify and eliminate power bugs, such as memory leaks,
infinite loops, or excessive wake-ups, that can drain the battery or cause performance issues. The OS can
also use power monitoring and profiling to provide feedback and guidance to the user and the developers
on how to improve the power efficiency of their device and applications.
Power management frameworks are software frameworks that provide a set of tools and APIs for the OS
and the applications to implement and coordinate power management policies and strategies on a mobile
device. By using power management frameworks, the OS can simplify and standardize the power
management process, and enable the collaboration and communication between the OS and the
applications. For example, the OS can use power management frameworks to expose the power state and
the battery level of a device to the applications, and allow them to request or adjust their power modes or
preferences. The OS can also use power management frameworks to enforce the power management rules
and regulations of different regions or networks, and ensure the compliance and compatibility of the
device and the applications.
Mobile OS Architectures
Mobile Operating Systems (OS) are designed specifically for mobile devices such as smartphones,
tablets, and wearables. These OSs are responsible for managing hardware resources, providing user
interfaces, and enabling application functionality. The architecture of mobile OS can vary significantly
between different platforms like Android, iOS, and Windows Mobile, but the core principles remain the
same.
Mobile OS architecture typically includes several key layers that work together to manage the device's
hardware and software. The general structure consists of:
Hardware Layer
Kernel Layer
Hardware Abstraction Layer (HAL)
Native Libraries and Runtime
Application Framework
Application Layer
Each layer plays a distinct role in the functioning of the mobile OS.
1. Hardware Layer
Description: This is the lowest level of the OS architecture and consists of all the physical
components of the device, such as the CPU, memory, camera, display, sensors, and other
peripherals.
Components:
o CPU (Central Processing Unit): Executes instructions and manages overall processing
power.
o Memory (RAM/ROM): Manages data storage for active applications and system
processes.
o Sensors (Accelerometer, Gyroscope, Proximity): Enable device interactions with the
physical environment.
o Display and Touchscreen: Provides user input and output capabilities.
2. Kernel Layer
Description: The kernel is the core component of the OS that interacts directly with the
hardware. It manages system resources, device drivers, memory, and process management.
Functions:
o Process Management: Manages the execution of processes and allocates CPU time.
o Memory Management: Handles memory allocation and deallocation.
o Device Drivers: Interfaces between hardware devices and the OS.
o Security Management: Provides a secure environment for processes.
Process Management: This function oversees the execution of all active processes within the system,
including tasks such as process scheduling, creation, termination, and synchronization. The OS allocates
CPU time to each process, manages multitasking through context switching, and ensures efficient
utilization of processing power. It also handles process prioritization, allowing critical tasks to receive
immediate attention while balancing overall system performance.
Memory Management: This component manages the system’s memory hierarchy, including RAM,
cache, and virtual memory. It ensures efficient allocation and deallocation of memory space to processes,
optimizing the use of limited memory resources. The OS handles memory paging, segmentation, and
swapping, enabling programs to execute smoothly without conflicting for memory access, thus preventing
issues like fragmentation and memory leaks.
Device Drivers Management: Device drivers serve as the crucial intermediaries between the OS and
hardware components. The OS uses drivers to translate high-level commands into hardware-specific
operations, ensuring seamless communication between the system and peripheral devices like printers,
storage, and graphics cards. This layer of abstraction allows the OS to manage diverse hardware
configurations with consistent functionality.
Security Management: Security management is designed to safeguard the OS and its processes against
unauthorized access, malicious attacks, and data breaches. It includes authentication, access control,
encryption, and auditing functions to protect user data and maintain system integrity. Security protocols
enforce permissions, monitor potential threats, and provide a secure environment where processes can
execute without compromising the system's overall stability and safety.
Description: The HAL provides a consistent interface between the hardware and higher OS
layers. It abstracts the hardware specifics so that higher-level software can communicate with the
hardware without needing to know its details.
Components:
o Device Interfaces: Standard interfaces for cameras, audio devices, sensors, etc.
o Drivers: Specific code that allows the OS to communicate with hardware devices.
Description: This layer contains essential libraries and runtime environments that provide
fundamental services and functionalities to applications.
Native Libraries:
o Android Runtime (ART) / Dalvik: Provides a virtual environment where Android apps
run.
o Core Libraries: Essential libraries like Java core libraries for Android, and other
language support libraries.
Application Framework
Description: The application framework layer provides the APIs that developers use to build
apps. It manages the application lifecycle and enables interactions between different system
components.
Components:
o Activity Manager: Manages the lifecycle of applications.
o Content Providers: Manages data sharing between applications.
o Location Manager: Provides location services.
o Resource Manager: Manages device resources like graphics, strings, and layout files.
o Notification Manager: Manages and displays notifications to the user.
6. Application Layer
Description: This is the topmost layer, consisting of the user-installed applications. These apps
run within their own environments and interact with the underlying OS through the application
framework.
Examples:
o System Apps: Dialer, Contacts, Messaging, etc.
o User Apps: Social media apps, games, utilities, etc.
Android OS Architecture
· Linux Kernel:
At the core of Android OS lies the Linux Kernel, which serves as the foundation of the entire system. It
manages core system services such as memory management, process management, security, networking,
and power management. The kernel acts as the bridge between the hardware and software, ensuring that
applications can run smoothly while efficiently utilizing device resources.
· Application Framework:
The Application Framework provides the necessary tools and APIs for developers to create applications.
This layer includes essential services such as Activity Manager for controlling the app lifecycle, Content
Providers for data sharing between apps, and Resource Manager for handling user interface components.
By leveraging these APIs, developers can create apps that interact seamlessly with the underlying system
and other applications.
· Applications:
The topmost layer consists of all the applications running on the device, including both pre-installed apps
and user-installed apps. Each app operates within its own sandboxed environment, utilizing system
resources via the application framework. Apps interact with the user, process inputs, and leverage
underlying system services to deliver a rich and responsive user experience, contributing to the Android
ecosystem's versatility and functionality.
This multi-layered architecture not only facilitates seamless operation between hardware and software but
also ensures that Android remains adaptable, secure, and efficient, catering to diverse device
specifications and user needs.
iOS Architecture
1. Core OS Layer
The Core OS layer is the foundation of the iOS architecture, providing essential services and low-
level functionalities that are crucial for the overall operation of the device. It interacts directly
with the hardware and manages critical system tasks, including memory management, file
systems, networking, and security.
Kernel: The heart of this layer, responsible for managing system resources, including CPU
scheduling, memory, and device drivers. The kernel also enforces security policies and isolation,
ensuring that applications operate within their defined boundaries.
Security Frameworks: Handles authentication, encryption, keychain services, and access
control, providing a secure environment for data storage and transmission.
Drivers: Provides interfaces for interacting with hardware components, such as the CPU, GPU,
storage, and sensors, abstracting complex hardware operations into manageable software routines.
The Core Services layer provides essential APIs and system services that support higher-level
functionalities and application development. This layer is the bridge between the system's core
and the application logic.
Foundation Framework: A fundamental part of the iOS ecosystem, this framework provides
essential data types, collections, and utilities for file handling, data persistence, and threading,
forming the backbone of app logic.
Core Data: A powerful object graph and persistence framework that manages model layer
objects and provides advanced data storage and manipulation features, including relationships
and queries.
CloudKit: Offers cloud-based storage and synchronization, enabling seamless data sharing and
updates across multiple devices and applications.
Networking: Manages connectivity and network communications, providing secure connections,
data transfer, and remote service access.
3. Media Layer
The Media layer offers a comprehensive set of frameworks and services for working with
graphics, audio, and video. It is responsible for all visual and interactive elements of an app,
ensuring rich media experiences for the user.
Graphics Frameworks: Includes Core Graphics, Metal, and OpenGL ES, which provide APIs
for drawing, 2D/3D rendering, and GPU-accelerated performance, enabling smooth animations
and visually engaging interfaces.
Audio Frameworks: Manages audio playback, recording, and sound manipulation, including
support for high-quality audio streaming and sound effects.
Video and Camera Frameworks: Provides capabilities for video playback, editing, and
integration with camera hardware, enhancing multimedia applications with features like video
capture, real-time processing, and augmented reality.
The Cocoa Touch layer sits at the top of the iOS architecture, offering a comprehensive set of
high-level frameworks that enable developers to create engaging and interactive user interfaces.
This layer directly interfaces with the end user, providing the tools and APIs needed to build the
app’s UI and user experience.
UIKit Framework: The cornerstone of iOS app development, UIKit provides essential building
blocks like buttons, views, controllers, and gesture recognizers. It manages the app’s visual
structure, touch handling, and interactions.
SwiftUI: A modern UI toolkit that allows developers to create declarative and responsive
interfaces with minimal code, leveraging the power of Swift for dynamic and adaptable UIs.
Event Handling: Manages user inputs, such as touch, gestures, and motion events, ensuring
responsive and intuitive interactions.
Notifications and Alerts: Provides interfaces for displaying alerts, notifications, and handling in-
app messaging, enhancing communication within the app ecosystem.
Integration and Interaction
Each layer in the iOS architecture interacts seamlessly, ensuring a modular, maintainable, and
secure system design. The Core OS layer handles the groundwork, securing resources and
managing essential services, while the Core Services layer builds upon it, providing data handling
and communication capabilities. The Media layer enriches the user experience with audio-visual
elements, and the Cocoa Touch layer finally brings the app to life with interactive and visually
appealing interfaces.
Windows Mobile architecture is a layered and modular system that integrates various components to
deliver a cohesive user experience on mobile devices. The architecture is built on the foundational
principles of efficiency, modularity, and scalability, making it adaptable for diverse hardware
configurations and use cases. Here’s a deeper look into the key components:
· Kernel Layer:
The kernel layer of Windows Mobile is grounded in the Windows CE (Compact Edition) core, which is a
lightweight, real-time operating system tailored for embedded systems. This layer is responsible for
managing low-level system resources such as memory, processes, and threads, providing the foundation
for multitasking and ensuring efficient utilization of system resources. The kernel also implements
security features, power management, and basic file system operations, enabling the OS to maintain
stability and performance across various hardware platforms.
Mobile OSs are designed to efficiently allocate and manage the device's limited hardware
resources, such as CPU, memory, and storage. Advanced scheduling algorithms prioritize tasks
based on real-time demands, ensuring smooth multitasking and responsive application
performance. The OS dynamically adjusts resource allocation to balance performance and power
consumption, particularly in resource-constrained environments.
Security in mobile operating systems goes beyond basic app permissions; it encompasses a multi-
layered approach to protect users and data. Features such as sandboxing isolate apps from each
other to prevent malicious interactions, while encryption protocols secure data both at rest and in
transit. Continuous security updates and vulnerability assessments, combined with biometric
authentication and secure boot processes, create a robust environment that guards against
unauthorized access, malware, and data breaches.
Power management in mobile OSs extends beyond simple battery saving; it involves
sophisticated algorithms that intelligently manage hardware components like the CPU, GPU, and
screen brightness. Adaptive techniques, such as doze modes and background activity limitations,
reduce energy consumption when the device is idle or in low-use scenarios. The OS learns user
behavior patterns to optimize battery life dynamically, extending the device’s operational time
without compromising the user experience.
User Interface: Seamless Interaction with Consistency and Accessibility
The user interface (UI) of mobile OSs is meticulously crafted to provide a seamless, touch-
friendly experience that is both intuitive and visually appealing. Consistent design languages,
responsive touch gestures, and adaptive layouts ensure a fluid interaction across various screen
sizes and orientations. Accessibility features, such as voice commands, screen readers, and haptic
feedback, are integrated to cater to diverse user needs, enhancing the inclusivity and overall
usability of the device.