SlideShare une entreprise Scribd logo
1  sur  4
Télécharger pour lire hors ligne
Operating Systems for Small Devices
CM10195 - Systems Architecture 2 - Assignment 1
Liam Thorpe-Young - March 2013
Significant developments are occurring in many areas of computing hardware. All this hardware
would not operate coherently if it were not for an Operating System (OS) taking control. Small
devices such as Mobile Phones, Routers, Home Appliances, Transport, and even NASA’s Lunar
Rover all require an OS to function; but this OS can not merely be a cut down version of a General
Purpose Operating System (GPOS), it must be a refined OS that has been carefully designed,
although with hardware advancements it is becoming increasing possible that a stripped down OS
could be used. This idea is supported in the mobile phone sector by Mery (2003) from Symbian:
Scaling down a PC operating system, or bolting communication capabilities onto a small and basic
operating system, results in too many fundamental compromises (Mery, 2003, p.1).
What is needed to power a mobile phone is not a mini-operating system but a different operating system -
one that is tailored (Mery, 2003, p.4).
Reference: [3]
An OS for these small devices has many resource constraints that enforce how it is designed.
These constraints and where possible the OS’s solutions or workarounds are detailed below:
! Power Management
Unlike on a GPOS, power management on small devices is essential (although it is still important
on a GPOS). Devices such as mobile phones and embedded medical devices should never need
to be powered down, this is because they need to sound alarms, accept incoming calls, and
operate critical systems, doing so on a limited power source [3]. These along with bespoke
hardware devices such as GPS, multiple wireless interfaces and micro-motors are not features we
usually expect from a computer running a GPOS; therefore, the OS must handle power
responsibly. Power consumption can be reduced by the OS for certain hardware devices such as
GPS or wireless receivers during idle or low use periods, and even possibly disabling such
features when power levels are low; this means the core tasks of the device are handled [14].
Reduced use of such power hungry components is also efficient, ensuring a minimum number of
background tasks are required for operating the device and reducing overall CPU usage can help
save energy, the OS requires a well defined power management system as well as task
management system to ensure this.
! CPU Power and Architecture
The CPU power on a small device is relatively limited and is usually of a different architecture
(ARM vs x86/64); this means the most small or embedded devices will be run on RISC
architectures instead of CISC; the OS needs to be designed appropriately. To overcome the
problem of a reduced power CPU the OS must have a very efficient Task Management mechanism
and Inter-Task Communication process, the OS needs to ensure that the most important tasks are
run first, this is the same as on a GPOS, but it is more essential in this case as it is much more
obvious to the user if this is not done correctly, mobiles are not expected to ‘lock up’ (see
Reliability). Task management improves the efficiency of the system by running concurrent tasks
and scheduling tasks efficiently. A great example of how this can be achieved on a resource limited
Liam Thorpe-Young - March 2013! 1
system is from the Embedded OS Design for the Lunar Exploration Rover (LER) [4]. The task
management system here used different states (PEND/SUSPEND, READY, DELAY and
EXECUTING) for task transition for processing tasks, additionally the LER OS used preemptive
scheduling that was based on priority and a round-robin system that determined the next task.
Improving real-time and concurrency was also very important on this OS, so a very sophisticated
scheduling algorithm was also used. This clearly demonstrates how an OS for a small or in this
case embedded device can be tuned to take advantage of limited resources.
! Small Memory Footprint
On of the biggest challenges facing the design of an OS for a small device is using as little space
as possible for the OS itself. Many GPOS now require GB’s of storage which is not feasible for
small devices. Android and iOS are typically under 2GB, and with the advancement of hardware
this leaves plenty of memory for additional data. This is only because the OS’s have been
designed to be smaller. Again taking the example of embedded systems, a stock Linux system
would be too sophisticated and large (500MB). Przywara, A., et al (2003) [5] describes how
embedded systems only require a small portion of the operating system, most of the storage can
be used for data by trimming the OS to only a couple of megabytes. Cutting down an OS causes
more issues in its own right, Przywara, A., et al (2003) [5] also describes (for Linux) how cross-
compiling the C Library, UNIX tools and application without care can result in binaries that are still
larger than required; but custom version of embedded Linux can be successfully reduced to 2MB
and therefore is an incredibly scaleable OS.
! Restricted Memory
Most small devices have to run with a very limited amount of RAM; this causes significant
performance issues if the OS does not manage memory carefully. One of the most common
techniques is ‘Demand Paging’. With this technique, the memory has ‘slots’; these slots are filled
with pages when they are requested, this results in the most required pages being keep close in
memory [16]. Android employs its own memory management technique [15]. Processes are
organised into certain states: active, visible, started, background and empty. Empty processes are
frequently killed, releasing the memory. Active processes are only killed at a last resort. By
carefully managing processes Android ensures memory is only being used for critical tasks and
where possible memory is made free.
! Physical Device Restrictions
Small devices doesn’t necessarily mean a physically small device (for example the Lunar Rover).
However the size and design of a small device can seriously effect the cooling mechanism,
therefore usage of the CPU must be carefully controlled to prevent overheating. Also effected are
available power supply as the battery has a physical constraint on the device, and currently the
battery can be the largest physical component inside a small device. The OS cannot determine the
size of the device but it must cope with the effects associated with such properties.
! Boot Time
Users of small devices do not expect a long boot sequence. In most embedded systems there is
not commonly a device to boot or install a system from, the OS therefore requires flexible boot
loaders to enable the system to start efficiently. Przywara, A., et al (2003) [5] details that the boot
loader is normally stored in a write protected area of memory allowing the writing of boot images
and files. This boot loader must have to ability to both load and run a kernel in the case of
Liam Thorpe-Young - March 2013! 2
unsupervised operation. Embedded systems typically don’t use disks due to power consumption
and speed.
! Reliability
Crashes, Bugs and Reboots are issues unfortunately expected on GPOS’s simply because they
are common, however users do not expect their mobile phones of medical devices to crash or lock
up whilst in operation. The embedded OS for the LER used trap and exception management,
watchdog monitoring and multi-machine redundancy techniques to ensure its reliability, most of
these required support from the hardware [4]. An OS can also ensure that critical data is held in
volatile memory for as little time as possible, and for mobile OS’s if a task management issue
occurs the system can recover without intervention from the user. Some small OS’s where safety is
critical run concurrent systems, comparing timing and results from one another as well as running
diagnostics, this ensures that failure can be predetermined and the system can still run when
failure occurs.
Another OS optimisation is good compiler design. Lumpur, K., 2008 [17] Outlines how a good
complier can make significant performance improvements on embedded devices. When efficient
code is compiled for specific architectures many areas of performance see improvement; these
include execution speed, memory and system power consumption as well as I/O and memory
performance.
There are currently a few common OS’s for small devices. In the mobile sector there are two main
competitors, Android (Google) and iOS (Apple). Android is a UNIX-like OS, programmed in C, C++
and Java on a modified Linux kernel. Its target devices are ARM based devices but there is a
project to port it to x86 [8]. iOS is written in C, C++ and Objective-C and based on a Hybrid XNU
kernel, iOS is often perceived as being much more fluid and intuitive than rivalling mobile OS’s.
Unlike other OS’s iOS is also strictly licensed to run on non-Apple hardware [9], however arguably
the sign of a good OS is one that operates with good task, memory and resource management as
well as I/O control and error recovery [18] independent of architecture and hardware. Also in the
mobile OS market are Windows Phone 8 and Symbian. For years Symbian was the market leader
but now holds only a tiny market share and was discontinued on 24th January 2013 [10]. Microsoft
offers Windows Phone 8, based on a Hybrid NT kernel [11] they, like Apple, are trying to blur the
gap between the GPOS and the mobile OS.
There are also the common Embedded OS’s, Linux actually dominates the market and its most
common Embedded OS is Embedded Linux [6]. Also in the market are Windows Embedded [12]
and for Real Time Operating System’s (RTOS’s) there is VxWorks [13]. A real time OS such as
RTLinux requires even more tailoring and careful design and is usually a Real Time extension built
on an Embedded OS. Most embedded applications require deterministic behaviour for this to be
achieved the system must react to an external event with a very high timing precision. Memory
management, disabled interrupts and scheduling policy need to be carefully considered in the OS
design [5].
Small devices clearly show significant improvements in hardware design and manufacturing
techniques but they still present great resource restrictions that require an optimised OS. By
optimising a small OS with some of the methods described efficient and reliable use of these
devices can be achieved.
Liam Thorpe-Young - March 2013! 3
[1] Hristozov, A., 2007. Choosing the best system software architecture for your wireless smart sensor
design: Part 1 [online]. Available from :http://www.embedded.com/design/prototyping-and-development/
4007255/Choosing-the-best-system-software-architecture-for-your-wireless-smart-sensor-design-Part-1
[Accessed 17 March 2013]
[2] Hristozov, A., 2007. Choosing the best system software architecture for your wireless smart sensor
design: Part 2 [online]. Available from :http://www.embedded.com/design/connectivity/4026166/Choosing-
the-best-system-software-architecture-for-your-wireless-smart-sensor-design-Part-2 [Accessed 17 March
2013]
[3] Mery, D., 2003. Why is a different operating system needed? [online]. Available from: http://gizmonaut.net/
symbian/why_a_different_os.html [Accessed 17 March 2013]
[4] (Qiao, L., et al), 2011. An Embedded Operating System Design for the Lunar Exploration Rover [online].
Available from: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6004518 [Accessed 17 March
2013]
[5] (Przywara, A., et al), 2003. Real-Time Operating Systems on Small Embedded Devices for Industrial
Control and Communication [online]. Available from: http://ieeexplore.ieee.org/xpl/articleDetails.jsp?
tp=&arnumber=1280558&contentType=Conference+Publications&searchField%3DSearch_All%26queryText
%3Doperating+system+for+small+devices [Accessed 18 March 2013]
[6] Tucker, A., 2000. An Overview of Embedded Linux [online]. Available from: http://www.cs.washington.edu/
education/courses/cse585/00wi/project/emlinux.pdf [Accessed 18 March 2013]
[7] Wijesinghe, D., Embedded Operating Systems [online]. Available from: http://www.slideshare.net/
dinuka1988/embedded-operating-systems [Accessed 18 March 2013]
[8] Wikipedia, Android (operating system) [online]. Available from: http://en.wikipedia.org/wiki/
Android_(operating_system) [Accessed 19 March 2013]
[9] Wikipedia, iOS [online]. Available from: http://en.wikipedia.org/wiki/IOS [Accessed 19 March 2013]
[10] Wikipedia, Symbian [online]. Available from: http://en.wikipedia.org/wiki/Symbian [Accessed 19 March
2013]
[11] Wikipedia, Windows Phone 8 [online]. Available from: http://en.wikipedia.org/wiki/Windows_Phone_8
[Accessed 19 March 2013]
[12] Wikipedia, Windows Embedded [online]. Available from: http://en.wikipedia.org/wiki/
Windows_Embedded [Accessed 19 March 2013]
[13] Wikipedia, VxWorks [online]. Available from: http://en.wikipedia.org/wiki/Vxworks [Accessed 19 March
2013]
[14] Welch, G., 1995. A Survey of Power Management Techniques in Mobile Computing Operating Systems
[online]. Available from: http://www.cs.unc.edu/~welch/media/pdf/mobile.pdf [Accessed 19 March 2013]
[15] mobworld, 2010. Memory Management in Android [online]. Available from: http://
mobworld.wordpress.com/2010/07/05/memory-management-in-android/ [Accessed 18 March 2013]
[16] Sundaram, K., Improving Memory Management on Mobile Phones [online]. Available from: http://
www.brighthub.com/mobile/emerging-platforms/articles/29952.aspx [Accessed 18 March 2013]
[17] Lumpur, K., 2008. Improving system performance through operating system optimization on embedded
devices platform [online]. Available from: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4580760
[Accessed 19 March 2013]
[18] Central China Normal University. Characteristics of Operating System [online]. Available from: http://
elearning.ccnu.edu.cn/ermsweb/libs/cwlib/计算机专业英语/context/Text/EC7_2.htm [Accessed 21 March
2013]
Liam Thorpe-Young - March 2013! 4

Contenu connexe

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

En vedette

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Operating Systems For Small Devices

  • 1. Operating Systems for Small Devices CM10195 - Systems Architecture 2 - Assignment 1 Liam Thorpe-Young - March 2013 Significant developments are occurring in many areas of computing hardware. All this hardware would not operate coherently if it were not for an Operating System (OS) taking control. Small devices such as Mobile Phones, Routers, Home Appliances, Transport, and even NASA’s Lunar Rover all require an OS to function; but this OS can not merely be a cut down version of a General Purpose Operating System (GPOS), it must be a refined OS that has been carefully designed, although with hardware advancements it is becoming increasing possible that a stripped down OS could be used. This idea is supported in the mobile phone sector by Mery (2003) from Symbian: Scaling down a PC operating system, or bolting communication capabilities onto a small and basic operating system, results in too many fundamental compromises (Mery, 2003, p.1). What is needed to power a mobile phone is not a mini-operating system but a different operating system - one that is tailored (Mery, 2003, p.4). Reference: [3] An OS for these small devices has many resource constraints that enforce how it is designed. These constraints and where possible the OS’s solutions or workarounds are detailed below: ! Power Management Unlike on a GPOS, power management on small devices is essential (although it is still important on a GPOS). Devices such as mobile phones and embedded medical devices should never need to be powered down, this is because they need to sound alarms, accept incoming calls, and operate critical systems, doing so on a limited power source [3]. These along with bespoke hardware devices such as GPS, multiple wireless interfaces and micro-motors are not features we usually expect from a computer running a GPOS; therefore, the OS must handle power responsibly. Power consumption can be reduced by the OS for certain hardware devices such as GPS or wireless receivers during idle or low use periods, and even possibly disabling such features when power levels are low; this means the core tasks of the device are handled [14]. Reduced use of such power hungry components is also efficient, ensuring a minimum number of background tasks are required for operating the device and reducing overall CPU usage can help save energy, the OS requires a well defined power management system as well as task management system to ensure this. ! CPU Power and Architecture The CPU power on a small device is relatively limited and is usually of a different architecture (ARM vs x86/64); this means the most small or embedded devices will be run on RISC architectures instead of CISC; the OS needs to be designed appropriately. To overcome the problem of a reduced power CPU the OS must have a very efficient Task Management mechanism and Inter-Task Communication process, the OS needs to ensure that the most important tasks are run first, this is the same as on a GPOS, but it is more essential in this case as it is much more obvious to the user if this is not done correctly, mobiles are not expected to ‘lock up’ (see Reliability). Task management improves the efficiency of the system by running concurrent tasks and scheduling tasks efficiently. A great example of how this can be achieved on a resource limited Liam Thorpe-Young - March 2013! 1
  • 2. system is from the Embedded OS Design for the Lunar Exploration Rover (LER) [4]. The task management system here used different states (PEND/SUSPEND, READY, DELAY and EXECUTING) for task transition for processing tasks, additionally the LER OS used preemptive scheduling that was based on priority and a round-robin system that determined the next task. Improving real-time and concurrency was also very important on this OS, so a very sophisticated scheduling algorithm was also used. This clearly demonstrates how an OS for a small or in this case embedded device can be tuned to take advantage of limited resources. ! Small Memory Footprint On of the biggest challenges facing the design of an OS for a small device is using as little space as possible for the OS itself. Many GPOS now require GB’s of storage which is not feasible for small devices. Android and iOS are typically under 2GB, and with the advancement of hardware this leaves plenty of memory for additional data. This is only because the OS’s have been designed to be smaller. Again taking the example of embedded systems, a stock Linux system would be too sophisticated and large (500MB). Przywara, A., et al (2003) [5] describes how embedded systems only require a small portion of the operating system, most of the storage can be used for data by trimming the OS to only a couple of megabytes. Cutting down an OS causes more issues in its own right, Przywara, A., et al (2003) [5] also describes (for Linux) how cross- compiling the C Library, UNIX tools and application without care can result in binaries that are still larger than required; but custom version of embedded Linux can be successfully reduced to 2MB and therefore is an incredibly scaleable OS. ! Restricted Memory Most small devices have to run with a very limited amount of RAM; this causes significant performance issues if the OS does not manage memory carefully. One of the most common techniques is ‘Demand Paging’. With this technique, the memory has ‘slots’; these slots are filled with pages when they are requested, this results in the most required pages being keep close in memory [16]. Android employs its own memory management technique [15]. Processes are organised into certain states: active, visible, started, background and empty. Empty processes are frequently killed, releasing the memory. Active processes are only killed at a last resort. By carefully managing processes Android ensures memory is only being used for critical tasks and where possible memory is made free. ! Physical Device Restrictions Small devices doesn’t necessarily mean a physically small device (for example the Lunar Rover). However the size and design of a small device can seriously effect the cooling mechanism, therefore usage of the CPU must be carefully controlled to prevent overheating. Also effected are available power supply as the battery has a physical constraint on the device, and currently the battery can be the largest physical component inside a small device. The OS cannot determine the size of the device but it must cope with the effects associated with such properties. ! Boot Time Users of small devices do not expect a long boot sequence. In most embedded systems there is not commonly a device to boot or install a system from, the OS therefore requires flexible boot loaders to enable the system to start efficiently. Przywara, A., et al (2003) [5] details that the boot loader is normally stored in a write protected area of memory allowing the writing of boot images and files. This boot loader must have to ability to both load and run a kernel in the case of Liam Thorpe-Young - March 2013! 2
  • 3. unsupervised operation. Embedded systems typically don’t use disks due to power consumption and speed. ! Reliability Crashes, Bugs and Reboots are issues unfortunately expected on GPOS’s simply because they are common, however users do not expect their mobile phones of medical devices to crash or lock up whilst in operation. The embedded OS for the LER used trap and exception management, watchdog monitoring and multi-machine redundancy techniques to ensure its reliability, most of these required support from the hardware [4]. An OS can also ensure that critical data is held in volatile memory for as little time as possible, and for mobile OS’s if a task management issue occurs the system can recover without intervention from the user. Some small OS’s where safety is critical run concurrent systems, comparing timing and results from one another as well as running diagnostics, this ensures that failure can be predetermined and the system can still run when failure occurs. Another OS optimisation is good compiler design. Lumpur, K., 2008 [17] Outlines how a good complier can make significant performance improvements on embedded devices. When efficient code is compiled for specific architectures many areas of performance see improvement; these include execution speed, memory and system power consumption as well as I/O and memory performance. There are currently a few common OS’s for small devices. In the mobile sector there are two main competitors, Android (Google) and iOS (Apple). Android is a UNIX-like OS, programmed in C, C++ and Java on a modified Linux kernel. Its target devices are ARM based devices but there is a project to port it to x86 [8]. iOS is written in C, C++ and Objective-C and based on a Hybrid XNU kernel, iOS is often perceived as being much more fluid and intuitive than rivalling mobile OS’s. Unlike other OS’s iOS is also strictly licensed to run on non-Apple hardware [9], however arguably the sign of a good OS is one that operates with good task, memory and resource management as well as I/O control and error recovery [18] independent of architecture and hardware. Also in the mobile OS market are Windows Phone 8 and Symbian. For years Symbian was the market leader but now holds only a tiny market share and was discontinued on 24th January 2013 [10]. Microsoft offers Windows Phone 8, based on a Hybrid NT kernel [11] they, like Apple, are trying to blur the gap between the GPOS and the mobile OS. There are also the common Embedded OS’s, Linux actually dominates the market and its most common Embedded OS is Embedded Linux [6]. Also in the market are Windows Embedded [12] and for Real Time Operating System’s (RTOS’s) there is VxWorks [13]. A real time OS such as RTLinux requires even more tailoring and careful design and is usually a Real Time extension built on an Embedded OS. Most embedded applications require deterministic behaviour for this to be achieved the system must react to an external event with a very high timing precision. Memory management, disabled interrupts and scheduling policy need to be carefully considered in the OS design [5]. Small devices clearly show significant improvements in hardware design and manufacturing techniques but they still present great resource restrictions that require an optimised OS. By optimising a small OS with some of the methods described efficient and reliable use of these devices can be achieved. Liam Thorpe-Young - March 2013! 3
  • 4. [1] Hristozov, A., 2007. Choosing the best system software architecture for your wireless smart sensor design: Part 1 [online]. Available from :http://www.embedded.com/design/prototyping-and-development/ 4007255/Choosing-the-best-system-software-architecture-for-your-wireless-smart-sensor-design-Part-1 [Accessed 17 March 2013] [2] Hristozov, A., 2007. Choosing the best system software architecture for your wireless smart sensor design: Part 2 [online]. Available from :http://www.embedded.com/design/connectivity/4026166/Choosing- the-best-system-software-architecture-for-your-wireless-smart-sensor-design-Part-2 [Accessed 17 March 2013] [3] Mery, D., 2003. Why is a different operating system needed? [online]. Available from: http://gizmonaut.net/ symbian/why_a_different_os.html [Accessed 17 March 2013] [4] (Qiao, L., et al), 2011. An Embedded Operating System Design for the Lunar Exploration Rover [online]. Available from: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6004518 [Accessed 17 March 2013] [5] (Przywara, A., et al), 2003. Real-Time Operating Systems on Small Embedded Devices for Industrial Control and Communication [online]. Available from: http://ieeexplore.ieee.org/xpl/articleDetails.jsp? tp=&arnumber=1280558&contentType=Conference+Publications&searchField%3DSearch_All%26queryText %3Doperating+system+for+small+devices [Accessed 18 March 2013] [6] Tucker, A., 2000. An Overview of Embedded Linux [online]. Available from: http://www.cs.washington.edu/ education/courses/cse585/00wi/project/emlinux.pdf [Accessed 18 March 2013] [7] Wijesinghe, D., Embedded Operating Systems [online]. Available from: http://www.slideshare.net/ dinuka1988/embedded-operating-systems [Accessed 18 March 2013] [8] Wikipedia, Android (operating system) [online]. Available from: http://en.wikipedia.org/wiki/ Android_(operating_system) [Accessed 19 March 2013] [9] Wikipedia, iOS [online]. Available from: http://en.wikipedia.org/wiki/IOS [Accessed 19 March 2013] [10] Wikipedia, Symbian [online]. Available from: http://en.wikipedia.org/wiki/Symbian [Accessed 19 March 2013] [11] Wikipedia, Windows Phone 8 [online]. Available from: http://en.wikipedia.org/wiki/Windows_Phone_8 [Accessed 19 March 2013] [12] Wikipedia, Windows Embedded [online]. Available from: http://en.wikipedia.org/wiki/ Windows_Embedded [Accessed 19 March 2013] [13] Wikipedia, VxWorks [online]. Available from: http://en.wikipedia.org/wiki/Vxworks [Accessed 19 March 2013] [14] Welch, G., 1995. A Survey of Power Management Techniques in Mobile Computing Operating Systems [online]. Available from: http://www.cs.unc.edu/~welch/media/pdf/mobile.pdf [Accessed 19 March 2013] [15] mobworld, 2010. Memory Management in Android [online]. Available from: http:// mobworld.wordpress.com/2010/07/05/memory-management-in-android/ [Accessed 18 March 2013] [16] Sundaram, K., Improving Memory Management on Mobile Phones [online]. Available from: http:// www.brighthub.com/mobile/emerging-platforms/articles/29952.aspx [Accessed 18 March 2013] [17] Lumpur, K., 2008. Improving system performance through operating system optimization on embedded devices platform [online]. Available from: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4580760 [Accessed 19 March 2013] [18] Central China Normal University. Characteristics of Operating System [online]. Available from: http:// elearning.ccnu.edu.cn/ermsweb/libs/cwlib/计算机专业英语/context/Text/EC7_2.htm [Accessed 21 March 2013] Liam Thorpe-Young - March 2013! 4