Real-Time Systems Prof. Chenyang Lu TAs: Ruixuan Dai, Jiangnan Liu - - PowerPoint PPT Presentation

real time systems
SMART_READER_LITE
LIVE PREVIEW

Real-Time Systems Prof. Chenyang Lu TAs: Ruixuan Dai, Jiangnan Liu - - PowerPoint PPT Presentation

CSE 520S Real-Time Systems Prof. Chenyang Lu TAs: Ruixuan Dai, Jiangnan Liu Real-Time Systems Systems operating under timing constraints Safety-critical systems q Automobiles. q Airplanes. q Mars rovers. q Factory automation. q Air traffic


slide-1
SLIDE 1

CSE 520S

Real-Time Systems

  • Prof. Chenyang Lu

TAs: Ruixuan Dai, Jiangnan Liu

slide-2
SLIDE 2

Real-Time Systems

Ø Systems operating under timing constraints Ø Safety-critical systems

q Automobiles. q Airplanes. q Mars rovers. q Factory automation. q Air traffic control.

Ø Time-sensitive systems

q Game console, Google Stadia. q Stock trading.

Ø >95% of microprocessors are used for embedded systems.

2

slide-3
SLIDE 3

Embedding a Computer

3

CPU mem input

  • utput

analog analog actuators embedded computer analog analog sensors

slide-4
SLIDE 4

Anti-lock Brake System

Ø Pumps brakes to reduce skidding: real-time à safety

4

brake sensor brake sensor brake sensor brake sensor ABS hydraulic pump

slide-5
SLIDE 5

GM Super Cruise

5

slide-6
SLIDE 6

A Distributed Real-Time System

6

ECU A

Microcontroller 1

Core 1 Core 2

Microcontroller 2

Core 1 Core 2

ECU B

Microcontroller 1

Core 1 Core 2

Microcontroller 2

Core 1 Core 2

FlexRay Channel A FlexRay Channel B

Radar Radar Camera Radar Radar Camera Brake Controller Steering Controller Engine Controller Transmission Controller

CAN Bus #1 CAN Bus #2

Courtesy: GM

slide-7
SLIDE 7

More on a Car ~100 microprocessors:

Ø 4-bit microcontroller checks seat belt; Ø microcontrollers run dashboard devices; Ø 16/32-bit microprocessor controls engine; Ø In-Vehicle Infotainment (IVI): audio/video, navigation, communication…

7

slide-8
SLIDE 8

Real-Time Applications in a Car

Ø Soft real-time: Infotainment on Linux or Android Ø Hard real-time: Safety-critical control on AUTOSAR

1/14/20 8 Source: http://www.edn.com/design/automotive/4399434/Multicore-and-virtualization-in-automotive-environments

slide-9
SLIDE 9

Smart Civil Infrastructure

9

Cyber-Physical Boundary

WU/Purdue Real-Time Hybrid Simulation

  • Enabled by real-time parallel computing
  • Expand to larger-scale, multi-specimen experiments (bridge spanning a

river, different ground motions on each end)

  • Towards cloud-based multi-site experiments
slide-10
SLIDE 10

Internet of Things

Ø Convergence of

q Miniaturized devices: processor+sensors+radio, embedded OS. q Low-power wireless: connect millions of devices to the Internet. q Data analytics: make sense of sensor data. q Cloud and edge computing: scalable real-time data processing.

Ø Large-scale IoT

  • driven control

q Smart manufacturing, transportation, power grid, healthcare… q Closed-loop control requires real-time performance!

slide-11
SLIDE 11

Clinical Warning

11

  • R. Dor, G. Hackmann, Z. Yang, C. Lu, Y. Chen, M. Kollef and T.C. Bailey,

Experiences with an End-To-End Wireless Clinical Monitoring System, Conference on Wireless Health (WH'12), October 2012.

Rapid Response

slide-12
SLIDE 12

IoT-driven Control

WirelessHART in Process Industries

[Courtesy: Emerson Process Management]

Ø Smart manufacturing, transportation, grid, healthcare… Ø Closed-loop control à latency bounds Ø End-to-end latency: devices–wireless–edge–internet–cloud

sensor data

Senso r Actuato r

control command

Controlle r

slide-13
SLIDE 13

Real-Time IoT

Ø Miniaturized devices à real-time embedded systems Ø Low-power wireless à real-time wireless Ø Data analytics à real-time analytics Ø Cloud à real-time data processing

13

End-to-End Real-Time Performance

slide-14
SLIDE 14

Real-Time Cloud

Ø IoT à large-scale sensing and control of physical world

q Smart manufacturing, smart transportation, smart grid… q Feedback control demands real-time performance guarantees.

Ø Example: Intelligent Transportation

q Cloud collects data from cameras and roadside detectors. q Control the traffic signals and message signs in real-time. q Transportation information feed to drivers. q SCATS @ Sydney: controlling 3,400 signals at 1s round-trip latency.

Ø Cloud needs to be real-time and predictable!

q URL: https://youtu.be/CluvnRaVhqA

14

slide-15
SLIDE 15

Real-Time Cloud

Ø Support real-time applications in the cloud.

q Latency guarantees for tasks running in virtual machines (VMs). q Real-time performance isolation between

VMs.

q Resource sharing between real-time and non-real-time

VMs.

Ø Real-time cloud stack.

q RT

  • Xen à real-time

VM scheduling

q VATC à real-time network I/O on a virtualized host. q RT

  • OpenStack à real-time cloud resource management.

15

VATC: RT Network I/O RT

  • OpenStack

Latency guarantees

Cyber-Physical Event Processing RT Cilk Plus

slide-16
SLIDE 16

Example: RT-Xen

Ø Real-time schedulers in the Xen hypervisor. Ø Provide real-time guarantees to tasks in VMs. Ø Incorporated in Xen 4.5 as the rtds scheduler.

16

RT-Xen

https://sites.google.com/site/realtimexen/

  • S. Xi, M. Xu, C. Lu, L. Phan, C. Gill, O. Sokolsky and I. Lee, Real-Time Multi-Core Virtual Machine

Scheduling in Xen, ACM International Conference on Embedded Software (EMSOFT'14), October 2014.

slide-17
SLIDE 17

Challenges

Must meet non-functional constraints

Ø Real-time Ø Memory Ø Battery lifetime Ø Reliability, safety and certification Ø Cost

Correct output is NOT enough!

17

slide-18
SLIDE 18

Real-time Requirements

Ø Period: release a job every T sec

q Playback 30 video frames per second

Ø Deadline: complete a job within D sec

q Anti-lock brake must start within 10 ms after skidding starts

18

slide-19
SLIDE 19

Hard vs. Soft Real-Time

Ø Hard: violating timing constraints à failure

q Automobile: active safety features, autonomous driving q Air traffic control

Ø Soft: violating timing constraints à inconvenience

q Video q Audio (“harder” than video) q Stock trading

19

slide-20
SLIDE 20

Topics

  • 1. Real-Time Operating Systems
  • 2. Real-Time Scheduling
  • 3. Real-Time Edge Computing
  • 4. Real-Time Parallel Computing
  • 5. Real-Time

Virtualization and Cloud Computing

  • 6. Real-Time End-to-End Scheduling
  • 7. Adaptive Quality of Service Control
  • 8. Industrial Wireless Control
  • 9. Project: Cloud Middleware for IoT

q Based on Amazon Web Services (AWS)

20

slide-21
SLIDE 21

Grading

Ø Projects 60%

q Cloud warm-up homework: 1% q Proposal and presentation: 10% q Demo 1: 5% q Demo 2: 5% q Final demo & report: 39%

Ø Critiques 35% Ø Participation 5%

21

slide-22
SLIDE 22

Critiques

Ø 1/2 page critiques of research papers Ø Submit by 10am before class Ø Back-of-envelop comments - NOT whole essays Ø See guidelines on class web site

q http://www.cs.wustl.edu/%7Elu/cse521s/critique.html

22

slide-23
SLIDE 23

Project

Ø Three students per team Ø Build IoT systems based on cloud

q Front end: smart watch, wristband, Raspberry Pi q Cloud backend: storage, analytics, Alexa, notification q Write a paper q Demo to the class

23

slide-24
SLIDE 24

Smartwatch as a Healthcare Tool

12/19/2019

T wo-way communication ecological momentary assessments Open, programmable platform

Wear OS, Research Kit,

  • nboard analytics

Continuous, passive measurements

activity, heart rate, sleep, location…

Chenyang Lu 24

slide-25
SLIDE 25

Raspberry Pi

25

https://cse.wustl.edu/Pages/default.aspx

slide-26
SLIDE 26

Amazon Web Services (AWS) IoT

1/14/20 26

United: Connect + Communication Smart: Other Cloud Service Data Storage Machine Learning

Source: https://aws.amazon.com/iot-platform/

slide-27
SLIDE 27

Timed Up and Go with Smartwatch

12/19/2019

Ø Watch app

q Remind participants to take the assessment q Automatically upload the data to the cloud for analysis q Analyze gait and motion features q Feedback to physicians and participants

Joint work with Matthew Spraker (Radiation Oncology), Ruixuan Dai (CSE)

Chenyang Lu 27

https://www.cse.wustl.edu/~lu/TUG.mp4

Ø Assess physical health and fall risk during prehabilitation.

q 20 participants undergoing neoadjuvant radiotherapy followed by surgery q Patients will complete TUG at home with the smartwatch for 90 days.

slide-28
SLIDE 28

Voice-based Smart Medicine Dispenser

28

https://www.cse.wustl.edu/~lu/cse521s/Videos/medicine_dispenser.mp4

slide-29
SLIDE 29

Steps

1. Choose your favorite topic 2. Form a team 3. Propose a plan 4. Implement 5. Measure and analyze 6. Demo: 1, 2, final 7. Write a technical report

29

slide-30
SLIDE 30

Start Early and Work Often!

Ø Choose topics Ø Put together a team Ø Meet every week to coordinate Ø Lots of development and experiments throughout the semester!

30

slide-31
SLIDE 31

Pointers

Ø http://www.cse.wustl.edu/~lu/cse520s/ Ø Email for appointment

q Chenyang (Jolley 213) q Ruixuan Dai (Jolley 219A): Projects q Jiangnan Liu (Jolley 219A): Critiques

31