22
Overview of Android Layers & Concurrency Douglas C. Schmidt [email protected] www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA

Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

  • Upload
    others

  • View
    36

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

Overview of Android Layers & Concurrency

Douglas C. [email protected]

www.dre.vanderbilt.edu/~schmidt

Institute for Software Integrated Systems

Vanderbilt University Nashville, Tennessee, USA

Page 2: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

2

Learning Objectives in this Lesson• Recognize Android’s architectural layers

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

Page 3: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

3

Learning Objectives in this Lesson• Recognize Android’s architectural layers • Understand Android’s architectural layers wrt concurrency

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

OS Process

Android Concurrency FrameworksJava Threads & Synchronizers

Page 4: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

4

Android’s Architectural Layers

Page 5: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

5

Android’s Architectural Layers• Android’s architecture is structured into multiple layers for several reasons

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

Page 6: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

6

Android’s Architectural Layers• Android’s architecture is structured into multiple layers for several reasons, e.g.

• Enhance systematic reuse

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

An intentional strategy for increasing productivity &

improving software quality

See en.wikipedia.org/wiki/Code_reuse#Systematic_software_reuse

Page 7: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

7

Android’s Architectural Layers• Android’s architecture is structured into multiple layers for several reasons, e.g.

• Enhance systematic reuse• Enable “plug & play” replacement of certain layer implementations

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

Page 8: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

8

Android’s Architectural Layers• Android’s architecture is structured into multiple layers for several reasons, e.g.

• Enhance systematic reuse• Enable “plug & play” replacement of certain layer implementations

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

Effects of updates can be confined to the layer whose implementation changes

Page 9: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

9

Android’s Architectural Layers• Android’s architecture is structured into multiple layers for several reasons, e.g.

• Enhance systematic reuse• Enable “plug & play” replacement of certain layer implementations• Reduce the complexity of APIs

that app developers must know

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

See en.wikipedia.org/wiki/Facade_pattern

Page 10: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

10

Android’s Architectural Layers• Android’s architecture is structured into multiple layers for several reasons, e.g.

• Enhance systematic reuse• Enable “plug & play” replacement of certain layer implementations• Reduce the complexity of APIs

that app developers must know• Enable the use of popular APIs,

protocols, & programminglanguages

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

Page 11: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

11

Android’s Architectural Layers• Android’s architecture is structured into multiple layers for several reasons, e.g.

• Enhance systematic reuse• Enable “plug & play” replacement of certain layer implementations• Reduce the complexity of APIs

that app developers must know• Enable the use of popular APIs,

protocols, & programminglanguages• These popular protocols &

APIs are available in open-source form

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

See source.android.com & source.android.com/source/building-kernels.html

Page 12: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

12

Android’s Architectural Layers wrt Concurrency

Page 13: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

13

Android’s Architectural Layers wrt Concurrency• The architectural layers of the Android platform define various mechanisms

for running concurrent programs on a range of computing devices

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

These layers are also representative of common Java platform implementations

Page 14: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

14

Android’s Architectural Layers wrt Concurrency• The architectural layers of the Android platform define various mechanisms

for running concurrent programs on a range of computing devices

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

CPerformance Productivity

Android strives to strike an effective balance between programmer productivity & computing performance

Android Concurrency FrameworksJava Threads & Synchronizers

Page 15: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

15

Android’s Architectural Layers wrt Concurrency• The architectural layers of the Android platform define various mechanisms

for running concurrent programs on a range of computing devices

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Process A Process B

The Android Linux kernel controls hardware & manages system resources

Android Concurrency FrameworksJava Threads & Synchronizers

Page 16: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

16

Android’s Architectural Layers wrt Concurrency• The architectural layers of the Android platform define various mechanisms

for running concurrent programs on a range of computing devices

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

The Bionic LibC library supports the Pthreads C programming APIs

Android Concurrency FrameworksJava Threads & Synchronizers

Page 17: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

17Dalvik & ART provide a managed

execution environment for Java apps

Android’s Architectural Layers wrt Concurrency• The architectural layers of the Android platform define various mechanisms

for running concurrent programs on a range of computing devices

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

Page 18: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

18The Android runtime layer contains a copy of

classes in the the java.util.concurrent packages

Android’s Architectural Layers wrt Concurrency• The architectural layers of the Android platform define various mechanisms

for running concurrent programs on a range of computing devices

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

Page 19: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

19

Android’s Architectural Layers wrt Concurrency• The architectural layers of the Android platform define various mechanisms

for running concurrent programs on a range of computing devices

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android Concurrency FrameworksJava Threads & Synchronizers

The Android runtime layer also provides concurrency frameworks

Page 20: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

20

Android’s Architectural Layers wrt Concurrency• The architectural layers of the Android platform define various mechanisms

for running concurrent programs on a range of computing devices

Additional Application Frameworks

Operating System Kernel

Applications

System Libraries

Execution Environment (Dalvik & ART) Ja

va/J

NIC+

+/C

C

Android’s application frameworks & packaged applications use its concurrency mechanisms & frameworks extensively

Android Concurrency FrameworksJava Threads & Synchronizers

Page 21: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

21

End of Overview of Android Layers & Concurrency

Page 22: Overview of Android Layers & Concurrency€¦ · Android Concurrency Frameworks. Java Threads & Synchronizers. Effects of updates can be confined to the layer whose implementation

22

1. Which of the following are reasons why Android’s architecture is designed with multiple layers?a. Enable the use of popular APIs, protocols, & programming

languagesb. Enhance performance on multi-core processorsc. Enable “plug & play” replacement of certain layer

implementationsd. Enhance the complexity of APIs that app developers must

know

Discussion Questions