PPT ch16
PPT ch16
PPT ch16
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
1
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Learning Objectives
After completing this chapter, you should be able to describe:
• The design goals for the Android™ operating system
• The role of open source software
• How Android works with its Linux foundation
• How system security challenges are managed
• The critical role of Android application developers
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
2
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Introduction
• Android
o Designed to run mobile devices: specifically smartphones and tablets
o Built on a Linux foundation
o Customizable user interface
• Allows user to customize app configurations
o Open source operating system
• Key elements, but not all, of the source code are published
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
3
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Brief History (1 of 5)
• Android operating system
o Developed by Any Rubin and associates
o Designed to power the Sidekick cell phone
• Initial challenges
o Phone battery power limitations
o Small CPU
o Limited memory space
• Design team solution
o Multilevel system integrating Linux: user actions performed via unique apps from
the phone’s screen
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
4
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Brief History (2 of 5)
• Google purchased Android (2005)
• Rubin joined Google
• Android extended to reach entire mobile smartphones and tablets
generations
o “More than 750 million devices have been activated globally; and 25 billion apps
have now been downloaded from Google Play”
o Larry Page, Google CEO (2013)
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
5
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Brief History (3 of 5)
(figure 16.1)
The Android robot logo can be used only in compliance with the terms described in the Creative
Commons Attribution License.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
6
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Brief History (4 of 5)
(table 16.1)
Selected releases of Android, listing the Linux kernel on which each is built. Notice that the code names (all sweet
treats) are assigned in alphabetical order. From https://source.android.com/source/build-numbers.html
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
8
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Design Goals
• Enchant me
o Sleek and aesthetically pleasing design
• Simplify my life
o Make life easier
• Make me amazing
o Empower people to try new things and to use apps in inventive new ways
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
9
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Memory Management (1 of 2)
• Handled by the Linux kernel: supported by several software modifications
o Works successfully on limited main memory and slower CPU devices
• Resources utilized only as needed
• Sleep-like state when dormant
• Open app remains resident in main memory
o Least recently used (LRU) algorithm for tracking
o Low memory killer (LMK) frees memory when memory becomes scarce
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
10
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Memory Management (2 of 2)
(figure 16.3)
This simplified illustration shows that the Android software stack is built on a Linux kernel, which manages all
device drivers (only a few are shown here). (Illustration is adapted from
https://developer.android.com/guide/practices/screens_support.html.)
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
11
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Processor Management (1 of 2)
• Requires four key objects: manifest, activities, tasks, and intents
• Manifest: file that holds essential information that the system must have
before it can run an application
o AndroidManifest.xml
• Activity: application component that defines the user interface screen that the
individual uses to interact with the application
o Including all the actions that can be performed
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
12
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Processor Management (2 of 2)
• Task: “sequence of activities a user follows to accomplish a goal”
o Can involve one or many apps
o Service: task that runs in the background
• Intent: mechanism that one app uses to signal to another app that its
cooperation is requested to accomplish something
o Allows apps to call on one another as needed to meet a user’s request
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
13
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Activity States (1 of 7)
• Created state: transient state when the activity has just begun
• Started state: software initialization begins and the first screen can be drawn
o Generally considered the main screen
• Resumed state (running state): activities execute until they are interrupted by
another activity or a user command
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
14
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Activity States (2 of 7)
• Paused state: a stop for an activity that is interrupted and ready to go into a
“background” mode
• Stopped state: activities disappear from the user’s view
o Subsequently, activity may be terminated or it may be recalled
• Destroyed state: formal indication that the activity is terminated
o Will be removed completely from system memory
o Background activities closed properly to prevent memory leaks
• Terminated: the app has been ended
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
15
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Activity States (3 of 7)
(figure 16.5)
The changing states of a typical activity from Created to Terminated. Typically, activities are
removed from memory, or terminated, only from the Paused, Stopped, or Destroyed states.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
16
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Activity States (4 of 7)
• Back stack: data structure
o When new app is loaded, replaced app is moved onto the stack
o Loading and unloading uses last-in, first-out (LIFO) scheme
o User navigates previously viewed apps using the screen’s “back” button
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
17
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Activity States (5 of 7)
(figure 16.6)
The back stack is loaded using the last-in, first-out (LIFO) scheme. The activity status of the current app is
loaded into the back stack when that app is interrupted for another one. Later, each app is restored, in
reverse order, each time the user presses the back button.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
18
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Activity States (6 of 7)
(figure 16.7)
Detailed view of the Activity Lifecycle and the system callbacks that move an activity from one
state to another. (Illustration source: https://developer.android.com/training/basics/activity-
lifecycle/starting.html)
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
19
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Activity States (7 of 7)
• Smoothly running Android system
o App developers
• Must remain aware of the many ways in which an app can be terminated and impact
on resource allocation
• Ensure each app ends gracefully when terminated by user regardless of app’s state
at the time
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
20
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Management (1 of 6)
• Apps are designed to accommodate numerous devices, often without user
help
• Screen requirements
o Design considerations: screen size, screen density, orientation, and resolution
o Density-independent pixel (dp): equivalent to one physical pixel on a 160 dpi
screen
o Interface design using dp unit: system can perform the necessary scaling for
each screen based on its size, resolution, orientation, and density
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
21
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Management (2 of 6)
(table 16.2)
Four device display variables that directly impact the design of user interface screens.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
22
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Management (3 of 6)
• Android’s four screen sizes categories
o Extra-large screens: at least 960dp × 720dp
o Large screens: at least 640dp × 480dp
o Normal screens: at least 470dp × 320dp
o Small screens: at least 426dp × 320dp
• Ultimate app designer’s goal
o Give every user the impression that the app was designed specifically for the
user’s device
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
23
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Management (4 of 6)
(figure 16.8)
A comparison of four general physical screen sizes supported by Android, not drawn to scale.
The physical size is measured as the diagonal distance of the screen from corner to corner.
Each screen is measured by a virtual measurement called a density-independent pixel (dp).
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
24
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Management (5 of 6)
• Battery management
o Android device’s battery usage information: Settings tab
o Ways to improve battery availability
• Users choose to leave certain functions turned off until they are actually needed,
e.g., GPS, Bluetooth communications, background file syncing, etc.
• Wi-Fi instead of telephony: saves power
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
25
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Management (6 of 6)
(figure 16.9)
This device has more than six hours of battery
time remaining; and the operating system is only
using three percent of the device’s battery
resources. Available from the Settings, System,
Battery menu.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
26
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
File Management
• Linux-managed at the kernel level
• User ID: the part of the operating system that is the user’s own protected
mode and that allows it to manage the files it creates and executes
o Each application has its own
o Not shared: no other apps can read or alter the app’s files
o Two apps with same User ID: data is shared
• Supplementary apps
o Necessary for file manipulation tasks
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
27
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Security Management
• Multiple tiered security structure
o Protects user’s data and system’s resources (including networking resources)
o Provides application isolation: prevents intentional damage or inadvertent
vulnerabilities from a malicious or poorly designed app
• User installed apps
o Higher vulnerability risks than pre-installed apps
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
28
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Permissions (1 of 3)
• User-defined permissions
o Individual controls device security
o Resource access must be explicitly given to the app
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
29
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Permissions (2 of 3)
(figure 16.11)
This application requested numerous
permissions and some actions may cost
the user money. Android will not install an
app unless and until the user agrees to
allow the requested permissions.
Available from the Settings, Applications,
Applications Manager, and by clicking on
the app of interest.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
30
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Permissions (3 of 3)
Requested Permission Application’s Reason for the Request
(table 16.3)
Accounts Find accounts that have been set up for this device.
Before installing an app, the user is
presented with a list of all the Development Tools Test access to protected storage.
application’s requested Hardware Controls Record audio and activate the camera to take picture and/or videos
permissions, which can range from and/or modify haptic (vibration) controls.
none to many. A sample is listed Location Learn approximate user location using network information and/or
here. For more details see: precise GPS location.
https://developer.android.com/guid
e/topics/security/normal- Network Communication View and control network connections and/or Near Field
permissions.html Communication.
© Cengage Learning 2018 Personal information Read and/or modify contact lists or the call log, write to the dictionary.
Phone calls Read the status of the phone and identify callers.
Service that cost you
Directly call phone number and send message.
money
Storage Modify and/or delete contents of the device’s storage.
System Tools Access Bluetooth settings, connect and disconnect from Wi-Fi, modify
system settings, retrieve running apps, toggle synchronization on and
off, delete app cache data, disable the screen lock, close other apps,
run at startup, uninstall shortcuts, write Home setting, prevent the
device from sleeping, and more.
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
31
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Access Security (1 of 4)
(table 16.4)
Each mobile device can be set for access that’s either fast or secure. Note: Early builds support
facial recognition but this is no longer recommended.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
32
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Access Security (2 of 4)
• Strong passwords: highest built-in security level
• Google’s recommended two-step process to build a strong password
consisting of numbers, letters, and symbols:
o Start with a random phrase that is easy to remember.
o Insert random numbers, capital letters, and special characters to make it even
harder to guess.
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
33
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Access Security (3 of 4)
• Passwords to avoid
o Dictionary entries
o Keyboard patterns (e.g., 123456)
o Anything that would be easy for someone else to guess
• Longer passwords are stronger
• Password alternative: Android’s pattern recognition tool
• Facial recognition: currently not a strong access control tool
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
34
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Device Access Security (4 of 4)
(figure 16.12)
To establish the pattern lock security option, the device’s owner must trace a single line, connecting the
dots, as shown here on a tablet. Experts suggest varying the direction of the line, bottom-to-top or right-to-
left, to make it more difficult for someone else to guess.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
35
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Encryption Options
(figure 16.13)
For higher security, encryption is offered. This is a time-consuming option to invoke, so the device owner
should have the device plugged in or at least fully charged before starting it. On this tablet, it’s available
from the Settings, Personal, Security menu.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
36
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Bring Your Own Devices (1 of 3)
• Organization’s members connect to a secured network with own devices
o Greatly complicates network administration
• Many considerations
o Cost
o Security
o Data management
o Convenience
o Productivity
o Other factors
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
37
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Bring Your Own Devices (2 of 3)
• Raises many questions:
o Who decides which apps will be run on each device, and which apps can be
connected to a secure system?
o How can productivity improvements attributed to BYOD be measured?
o Who should pay the usage charges when an employee’s device is used for both
work and personal activities?
o Is device network access limited to email or expanded to multiple database
access?
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
38
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Bring Your Own Devices (3 of 3)
• More questions:
o Who controls the data on the device—the personal information as well as
organizational data?
o Who should pay for upgrades in device hardware and software?
o What happens if the device is misplaced or lost?
o Who else in the employee’s family is allowed to use the device?
o How are the device and its data managed when the owner leaves the
organization?
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
39
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
User Interface
• Touch screen controls
o Features icons that are manipulated by the user
o User-selected apps that remain in place when the user swipes the screen from
side-to-side
o “Soft buttons” along screen bottom: allow the user to perform critical tasks, e.g.,
go home, go back, or view open tasks
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
40
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Touch Screen Controls (1 of 2)
(table 16.5) Gesture Actions Meaning
Primary gestures that Touch Press and then lift Starts the default activity for this item. When used
with a virtual on-screen keyboard, this allows typing.
users typically make on When used with a graphics app, it allows drawing.
their mobile devices.
© Cengage Learning Long press Press, move, and then lift Moves into the data selection mode and allows the
user to select one or more items in a view, and act
2018 upon the data using a contextual action bar.
Swipe Press, move, and then lift Moves to content located in a neighboring view,
generally in the same hierarchy.
Drag Long press, move, and then lift Rearranges data from one place to another within
this view, or moves data into a directory, folder, or
other container.
Double Two touches in quick succession Zooms into content currently displayed. When used
touch within a text selection context, it is also used as a
secondary gesture.
Pinch open Two-finger press, move them apart, and Zooms into content, offering a closer perspective.
then lift
Pinch close Two-finger press, move them together, and Zooms away from content to offer a wider
then lift. perspective.
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
41
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Touch Screen Controls (2 of 2)
• “Lights-out mode”
o On-screen buttons temporarily disappear: allows full screen viewing without
distractions
o Screen touch: exits lights-out mode
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
42
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
User Interface Elements (1 of 3)
• Consistent navigation experience: essential to user satisfaction
o Android developers: highly encouraged to follow the same standards regarding
the icons’ placement and functionality
https://developer .android.com/design/index.html
• “Action bar”: top of each app screen
o Stays in place while app is active
o Provides consistent layout
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
43
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
User Interface Elements (2 of 3)
(figure 16.13)
Sample action bar. Its four parts must be programmed in accordance with the published Android
standard so that users can expect a consistent interface from every app.
(Source: https://developer.android.com/design/patterns/actionbar.html)
© Cengage Learning 2018
#1 App icon
#2 View control
#3 Action buttons
#4 Action overflow (additional tasks)
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
44
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
User Interface Elements (3 of 3)
(figure 16.15)
A typical action overflow area reveals additional actions. Any actions that are not currently usable,
such as Sort By, are shown in a lighter color.
© Cengage Learning 2018
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
45
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Conclusion
• Android: designed for mobile, multitasking, multipurpose systems that often
have multiple cores
o Powers hundreds of millions of mobile devices around the world
o Open source operating system based on Linux
• Continued success: may depend on app developers’ ability to keep current
with new emerging technologies and to use consistent design elements
o Providing users a seamless experience meandering from one app to the next
Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved.
46
May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.