Your SlideShare is downloading. ×
Operating Systems For Small Devices
Operating Systems For Small Devices
Operating Systems For Small Devices
Operating Systems For Small Devices
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Operating Systems For Small Devices

257

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
257
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  1. Operating Systems for Small DevicesCM10195 - Systems Architecture 2 - Assignment 1Liam Thorpe-Young - March 2013Significant developments are occurring in many areas of computing hardware. All this hardwarewould not operate coherently if it were not for an Operating System (OS) taking control. Smalldevices such as Mobile Phones, Routers, Home Appliances, Transport, and even NASA’s LunarRover all require an OS to function; but this OS can not merely be a cut down version of a GeneralPurpose 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 OScould 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 basicoperating 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 ManagementUnlike on a GPOS, power management on small devices is essential (although it is still importanton a GPOS). Devices such as mobile phones and embedded medical devices should never needto be powered down, this is because they need to sound alarms, accept incoming calls, andoperate critical systems, doing so on a limited power source [3]. These along with bespokehardware devices such as GPS, multiple wireless interfaces and micro-motors are not features weusually expect from a computer running a GPOS; therefore, the OS must handle powerresponsibly. Power consumption can be reduced by the OS for certain hardware devices such asGPS or wireless receivers during idle or low use periods, and even possibly disabling suchfeatures 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 ofbackground tasks are required for operating the device and reducing overall CPU usage can helpsave energy, the OS requires a well defined power management system as well as taskmanagement system to ensure this.! CPU Power and ArchitectureThe 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 RISCarchitectures instead of CISC; the OS needs to be designed appropriately. To overcome theproblem of a reduced power CPU the OS must have a very efficient Task Management mechanismand Inter-Task Communication process, the OS needs to ensure that the most important tasks arerun first, this is the same as on a GPOS, but it is more essential in this case as it is much moreobvious to the user if this is not done correctly, mobiles are not expected to ‘lock up’ (seeReliability). Task management improves the efficiency of the system by running concurrent tasksand scheduling tasks efficiently. A great example of how this can be achieved on a resource limitedLiam Thorpe-Young - March 2013! 1
  2. system is from the Embedded OS Design for the Lunar Exploration Rover (LER) [4]. The taskmanagement system here used different states (PEND/SUSPEND, READY, DELAY andEXECUTING) for task transition for processing tasks, additionally the LER OS used preemptivescheduling 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 sophisticatedscheduling algorithm was also used. This clearly demonstrates how an OS for a small or in thiscase embedded device can be tuned to take advantage of limited resources.! Small Memory FootprintOn of the biggest challenges facing the design of an OS for a small device is using as little spaceas possible for the OS itself. Many GPOS now require GB’s of storage which is not feasible forsmall devices. Android and iOS are typically under 2GB, and with the advancement of hardwarethis leaves plenty of memory for additional data. This is only because the OS’s have beendesigned to be smaller. Again taking the example of embedded systems, a stock Linux systemwould be too sophisticated and large (500MB). Przywara, A., et al (2003) [5] describes howembedded systems only require a small portion of the operating system, most of the storage canbe used for data by trimming the OS to only a couple of megabytes. Cutting down an OS causesmore 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 stilllarger than required; but custom version of embedded Linux can be successfully reduced to 2MBand therefore is an incredibly scaleable OS.! Restricted MemoryMost small devices have to run with a very limited amount of RAM; this causes significantperformance issues if the OS does not manage memory carefully. One of the most commontechniques is ‘Demand Paging’. With this technique, the memory has ‘slots’; these slots are filledwith pages when they are requested, this results in the most required pages being keep close inmemory [16]. Android employs its own memory management technique [15]. Processes areorganised into certain states: active, visible, started, background and empty. Empty processes arefrequently killed, releasing the memory. Active processes are only killed at a last resort. Bycarefully managing processes Android ensures memory is only being used for critical tasks andwhere possible memory is made free.! Physical Device RestrictionsSmall 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 areavailable power supply as the battery has a physical constraint on the device, and currently thebattery can be the largest physical component inside a small device. The OS cannot determine thesize of the device but it must cope with the effects associated with such properties.! Boot TimeUsers of small devices do not expect a long boot sequence. In most embedded systems there isnot commonly a device to boot or install a system from, the OS therefore requires flexible bootloaders to enable the system to start efficiently. Przywara, A., et al (2003) [5] details that the bootloader is normally stored in a write protected area of memory allowing the writing of boot imagesand files. This boot loader must have to ability to both load and run a kernel in the case ofLiam Thorpe-Young - March 2013! 2
  3. unsupervised operation. Embedded systems typically don’t use disks due to power consumptionand speed.! ReliabilityCrashes, Bugs and Reboots are issues unfortunately expected on GPOS’s simply because theyare common, however users do not expect their mobile phones of medical devices to crash or lockup 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 ofthese required support from the hardware [4]. An OS can also ensure that critical data is held involatile memory for as little time as possible, and for mobile OS’s if a task management issueoccurs the system can recover without intervention from the user. Some small OS’s where safety iscritical run concurrent systems, comparing timing and results from one another as well as runningdiagnostics, this ensures that failure can be predetermined and the system can still run whenfailure occurs.Another OS optimisation is good compiler design. Lumpur, K., 2008 [17] Outlines how a goodcomplier can make significant performance improvements on embedded devices. When efficientcode is compiled for specific architectures many areas of performance see improvement; theseinclude execution speed, memory and system power consumption as well as I/O and memoryperformance.There are currently a few common OS’s for small devices. In the mobile sector there are two maincompetitors, 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 aproject to port it to x86 [8]. iOS is written in C, C++ and Objective-C and based on a Hybrid XNUkernel, 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 arguablythe sign of a good OS is one that operates with good task, memory and resource management aswell as I/O control and error recovery [18] independent of architecture and hardware. Also in themobile OS market are Windows Phone 8 and Symbian. For years Symbian was the market leaderbut now holds only a tiny market share and was discontinued on 24th January 2013 [10]. Microsoftoffers Windows Phone 8, based on a Hybrid NT kernel [11] they, like Apple, are trying to blur thegap between the GPOS and the mobile OS.There are also the common Embedded OS’s, Linux actually dominates the market and its mostcommon 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 asRTLinux requires even more tailoring and careful design and is usually a Real Time extension builton an Embedded OS. Most embedded applications require deterministic behaviour for this to beachieved the system must react to an external event with a very high timing precision. Memorymanagement, disabled interrupts and scheduling policy need to be carefully considered in the OSdesign [5].Small devices clearly show significant improvements in hardware design and manufacturingtechniques but they still present great resource restrictions that require an optimised OS. Byoptimising a small OS with some of the methods described efficient and reliable use of thesedevices can be achieved.Liam Thorpe-Young - March 2013! 3
  4. [1] Hristozov, A., 2007. Choosing the best system software architecture for your wireless smart sensordesign: 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 sensordesign: 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 March2013][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 March2013][5] (Przywara, A., et al), 2003. Real-Time Operating Systems on Small Embedded Devices for IndustrialControl 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 March2013][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 March2013][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 embeddeddevices 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 March2013]Liam Thorpe-Young - March 2013! 4

×