CSE 520S Real-Time Systems Prof. Chenyang Lu TAs: Haoran Li, Yehan Ma
Real-Time Systems Ø Systems operating under timing constraints q Automobiles. q Airplanes. q Mars rovers. q Game console. q Factory automation. q Telecom and mobile network management. q Stock trading. q Air traffic control. Ø >95% of microprocessors are used for embedded systems. 2
Embedding a Computer CPU output input analog analog actuators analog analog sensors embedded computer mem 3
An;-lock Brake System Ø Pumps brakes to reduce skidding: real-8me à safety sensor sensor brake brake ABS hydraulic pump brake brake sensor sensor 4
GM Super Cruise 5
A Distributed Real-Time System ECU A Radar Radar Camera Microcontroller 1 Core 1 Core 2 Brake Controller FlexRay Channel B Microcontroller 2 Core 1 Core 2 CAN Bus #1 Steering Controller FlexRay Channel A ECU B Microcontroller 1 CAN Bus #2 Engine Controller Core 1 Core 2 Radar Radar Camera Microcontroller 2 Transmission Controller Core 1 Core 2 Courtesy: GM 6
More on a Car ~100 microprocessors: Ø 4-bit microcontroller checks seat belt; Ø microcontrollers run dashboard devices; Ø 16/32-bit microprocessor controls engine; Ø Navigation; Ø Entertainment: DVD, audio, satellite radio 7
Real-Time Applica;ons in a Car Ø Soft real-time: Infotainment on Linux or Android Ø Hard real-time: Safety-critical control on AUTOSAR Source: http://www.edn.com/design/automotive/4399434/multicore-and-virtualization-in-automotive-environments 8/27/17 8
Internet of Things Ø Convergence of q Miniaturized devices: integrate processor, sensors and radios. q Low-power wireless: connect millions of devices to the Internet. q Data analytics: make sense of sensor data. q Cloud: scalable computing. Ø Large-scale IoT-driven control q Smart manufacturing, transportation, power grid, healthcare q Real killer apps of IoT! q Closed-loop control requires real-time performance!
Clinical Warning Rapid Response 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. 10
IoT-driven Control Ø Smart manufacturing, transportation, grid, healthcare Ø Closed-loop control à latency bounds Ø End-to-end latency: devices wireless edge internet cloud Senso r Actuato r sensor data WirelessHART in Process Industries [Courtesy: Emerson Process Management] Controlle r control command
Real-Time IoT à End-to-End Real-Time Performance Ø Miniaturized devices à real-time embedded systems Ø Low-power wireless à real-time wireless Ø Data analytics à real-time analytics Ø Cloud à real-time data processing 12
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 13
Towards Real-Time Edge/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 (included in Xen hypervisor) q VATC à real-time network I/O on a virtualized host. q RT-OpenStack à real-time cloud resource management. RT-OpenStack Cyber-Physical Event Processing RT Cilk Plus VATC: RT Network I/O Latency guarantees 14
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. RT-Xen hyps://sites.google.com/site/real8mexen/ 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. 15
Challenges Must meet non-functional constraints Ø Real-time Ø Memory Ø Battery lifetime Ø Reliability, safety and certification Ø Cost Correct output is NOT enough! 16
Real-;me 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 17
Hard vs. SoT 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 18
Topics 1. Real-Time Operating Systems 2. Real-Time Scheduling 3. Real-Time Parallel Computing 4. Distributed Real-Time Middleware 5. Real-Time Virtualization and Cloud Computing 6. Adaptive Quality of Service Control 7. Industrial Wireless Control 8. Project: Cloud Middleware for IoT q Based on Amazon Web Services (AWS) 19
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% 20
Cri;ques Ø 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 21
Project Ø Three students per team Ø Build your own cloud platform for IoT q Deploy and configure middleware q Experiment, measure and analyze q Write a paper q Demo to the class 22
IoT Cloud Ø Many things (devices) q Different Types q Isolated Systems Ø Data and Command q Sensing the world q Give Response Ø Challenge q United: Connected + Communication q Smart: Data Analytics + Strategy 8/27/17 Source: https://aws.amazon.com/iot-platform/ 23
Amazon Web Services (AWS) IoT United: Connect + Communication Smart: Other Cloud Service Data Storage Machine Learning 8/27/17 Source: https://aws.amazon.com/iot-platform/ 24
Amazon IoT Architecture 8/27/17 25
Project: Build an IoT Cloud Ø Platform as a Service (PaaS) for IoT q Messaging, streaming processing, database, analytics Ø Methodology q Build and configure open-source middleware in AWS q Develop applications and benchmark programs q Measure performance through experiments q Analyze and present results Ø Focus on latency and IoT-like workloads 26
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 27
Start Early and Work OTen! Ø Choose topics Ø Put together a team Ø Meet every week to coordinate Ø Lots of development and experiments throughout the semester! 28
Coming Up Ø Wednesday: AWS tutorial Ø Next Monday: Project Discussion Ø Next Wednesday: Labor Day No Class 29
Pointers Ø http://www.cse.wustl.edu/~lu/cse520s/ Ø Email for appointment q Chenyang (Jolley 213) q Haoran Li (Jolley 217): Projects q Yehan Ma (Jolley 217): Critiques 30