os design for a connected world - people.apache.orgxli/presentations/future_os_design.pdf ·...

28
Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng Li [email protected] January 2020

Upload: others

Post on 09-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Discussions on the next generation OS

OS Design for the Future of a Connected World

Xiao-Feng Li [email protected] January 2020

Page 2: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Agenda❖ OS from individual to group

❖ OS from application to service

❖ OS from I/O to sensing

❖ Survey of the industry

Page 3: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

OS design is evolving

❖ Trend: from hardware enabling towards user services.

3

BIOS BIOS

DOS

BIOS

DOS

Linux

BIOS

DOS

Linux

Android

BIOS

DOS

Linux

Android

Super app

?

Page 4: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

❖ A consumer OS is comprised of three components

❖ Resource management (for vendors)

❖ APIs (for app developers)

❖ Interfaces (for users)

❖ Trend: most innovations in recent years are in app development. Methodology of hardware enabling and user interactions changes slowly.

APIs

OS components in the highest level

4

Resource

applications

interface

Page 5: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

What decides a consumer OS?❖ Why we call it Android

❖ Not u-boot, little kernel, Linux, super app, although all the rest are OSes too

❖ Because the primary APIs are provided by Android

❖ Most apps rely on the services provided by Android framework

❖ OS is decided by the primary APIs

5

u-boot

Little Kernel

Linux

Android

Android stack

Android

Linux

ChromeOS FirefoxOS

LinuxLinux

Super app

Page 6: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

OS service is changing

❖ Trend: from resource management towards daily assistant

6

BIOS BIOS

DOS

BIOS

DOS

Linux

BIOS

DOS

Linux

Android

BIOS

DOS

Linux

Android

Board

I/O

GUI

Internet

Cloud ?

?

Super app

Page 7: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Levels of service APIs

❖ Diff services use diff protocols at diff levels, because of the design legacy from ground up accumulatively

7

Data source Functionalities Protocol

Process File system Hardware abstraction System call

Inter-process Data server App features IPC

Local Device P2P/AV/Sensor WiFi/BT/NFC

Remote Internet Cloud services HTTP

*Only examples, not a full list.

Page 8: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

One protocol for all services

❖ Android is evolving close to a consistent protocol through Binder, except for local services

8

Data source Functionalities Protocol

Process File system Hardware abstraction HIDL

Inter-process Data server App features AIDL

Local Device P2P/AV/Sensor ?

Remote Internet Cloud services Google APIs

*Android status as an example.

Page 9: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Local area protocols❖ Google has Nearby/Wear/Auto/Cast protocols,

specifically for different devices

❖ They are not general enough to various devices. A unified solution is,

❖ Extend Binder to cross-devices services

❖ With multi-channel Audio/Video streaming

❖ With Nearby for discovery and connection

❖ With multi-display for other scenarios

9

Page 10: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Apps

Another view of OS architecture

10

Resource management

Kernel

Libraries/Runtimes

IPC

Kotlin App

Java App

HTML5 App

Flutter AppGoogle

Mobile Services

Package Manager Service

Activity Manager Services

Sensor Manager Service

Android’s “microkernel” design

Page 11: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Agenda❖ OS from individual to group

❖ OS from application to service

❖ OS from I/O to sensing

❖ Survey of the industry

Page 12: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Service-oriented OS ❖ Modern OS is around services, instead of hardware

❖ Service protocol: binder IPC

❖ Registration/discovery: package manager

❖ Lifetime/session: activity manager

❖ User interface: GUI+touch

❖ External events: notification manager

❖ Data service: content provider

12

Page 13: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

OS: From individual to group

❖ Mostly other devices act as accessories to phone. Very little about p2p services or group services.

13

OS Individual Group

Service protocol IPC Wear/Cast/Auto/…

Service discovery package manager Nearby/WiFi

Service session activity manager ? (device-specific)

Service data content provider ? (device-specific)

External events notification manager ? (device-specific)

Service interface GUI/touch ? (device-specific)

*Android status as an example.

Page 14: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Build a group OS

❖ Android can be extended for a group OS

14

OS Individual Group

Service protocol IPC RPC

Service discovery package manager Nearby manager

Service session activity manager session manager

Service data content provider distributed data

External events notification manager distributed events

Service interface GUI/touch voice/gesture

Meta API Tasker/Shortcuts DSL

Page 15: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Data are services too❖ Services today only provide end-to-end integrated data

❖ Users should regain the control of their own data

15

Data source Examples Exposed as services

External service apps, movies, books DRM/blockchain

Self produced photos, credit cards, passwords, app state

Distributed data

Runtime data video stream, sensor data

Exposed with APIs

Page 16: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Services: from local to external

❖ Information mainly comes from service provider and social network

16

Cloud

push/pull

E.g., new

s/sea

rch

push/pull

E.g., message/follow

Group OS

Page 17: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

External service entry points❖ Three main entry points

❖ Pull: Search (Google, Baidu, …)

❖ Push: News (Yahoo, Toutiao, …)

❖ Bidirectional: Social (Facebook, Wechat, …)❖ (Notes: Once dominating one entry, anxious to dominate others.

Other services, e.g., maps, etc. are natural extensions.)

❖ OS for next generation should support the models natively

17

Page 18: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Apps readiness to external services❖ Android app is barely external service ready.

❖ H5 Applet: app ≈ doc ≈ info ≈ social ≉ cloud

18

PWA H5 Applet Android

Page searchable Internet In super app Slice in phoneApp in store

State recoverable Partially Partially Yes

Optional install Yes Yes Instant app

Cross-platform Yes Yes Partially

Native access Partially Partially Yes

Composable No No Bundle/Binder

Distributable Yes Yes Partially

Page 19: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Agenda❖ OS from individual to group

❖ OS from application to service

❖ OS from I/O to sensing

❖ Survey of the industry

Page 20: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

HCI is from I/O to sensing

❖ User interface becomes more and more natural

20

keyboard

monitor

punched tape keyboard

monitor

mouse

GUI

keyboard

monitor

mouse

GUI

touch

sensor

keyboard

monitor

mouse

GUI

sensor

touch

mouse

GUI

touch

sensor

voice

camera

?

Page 21: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

❖ OS has to receive inputs from devices around it, and present outputs to suitable devices

❖ Inputs are not necessarily immediate info, can be long term profile

Context-aware OS

21

phone

mic/cameraIMU/location

camerabeacon

wearable

miniwave

TV

PC

treadmill

hobby

shopping

friends

family

jobs

travel

diet

Page 22: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Inputs/outputs are services❖ Input - computing - output should be decoupled and

distributed

❖ Application development still follows MVC-class models, and here V is essentially based on I/O services

❖ OS APIs provide seamlessly access to the decoupled M-V-C service providers

22

Kotlin App

Java App

HTML5 App

Flutter App Google

Mobile Services

Package Manager Service

Activity Manager Services

Sensor Manager Service

Output Manager Service

Input Manager Service

External services

Page 23: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Remote View ❖ Each has their respective use cases:

❖ (Virtual) display mirror

❖ Remote frame-buffer/desktop

❖ Remote rendering

❖ UI client distribution

❖ Align the inputs, synchronize the outputs

❖ Critical for AV experiences

23

Page 24: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Service semantics❖ Services are mostly binary interfaces

❖ Not human readable

❖ Not web searchable

❖ Not directly map to human activities

❖ Services should be defined with semantics

❖ Describe services with human readable tokens

❖ Services can be connected according to the tokens

24

Page 25: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

DSL as high level APIs ❖ DSL program can be developed or generated

❖ Programmable like IFTTT

❖ Generated from human multi-modal instructions

❖ Human instructions ➡ Sequence of semantic tokens ➡ DSL program ➡ OS service operations

❖ AI engine is mandatory

❖ DSL program can be converted to common app

❖ Managed by app store and is distributable

25

Page 26: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Abstraction and modularity ❖ Context-aware OS involves lots of dynamic resources and

states

❖ Device loads components according to context

❖ Different devices loads different components

❖ Devices can use different OSes but agree on protocols

❖ Considerations

❖ System update, app migration, API stability, real time, account, security, etc.

26

Page 27: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Agenda❖ OS from individual to group

❖ OS from application to service

❖ OS from I/O to sensing

❖ Survey of the industry

Page 28: OS design for a connected world - people.apache.orgxli/presentations/future_OS_design.pdf · Discussions on the next generation OS OS Design for the Future of a Connected World Xiao-Feng

Summary❖ Design the next generation OS based on existing one,

by enhancing the capabilities of,

❖ Distributed and connected

❖ Service-oriented APIs

❖ Natural interactions

32

APIs

Resource

applications

interface

Services APIs

Distributed resource

applications

natural interactions

Current OS Next-gen OS