Final Review. Chenyang Lu. CSE 467S Embedded Compu5ng Systems

Similar documents
Operating Systems. Chenyang Lu

Real-Time Scheduling Single Processor. Chenyang Lu

Cyber-Physical Systems Scheduling

Processes. Criteria for Comparing Scheduling Algorithms

CS 5523: Operating Systems

Adaptive QoS Control for Real-Time Systems

Real-Time CORBA. Chenyang Lu CSE 520S

TinyOS and nesc. Ø TinyOS: OS for wireless sensor networks. Ø nesc: programming language for TinyOS.

Philips Lifeline. Ø Chenyang Lu 1

Servilla: Service Provisioning in Wireless Sensor Networks. Chenyang Lu

FairCom Press Release Archive:

CS 2461: Computer Architecture I

HPCG on Tianhe2. Yutong Lu 1,Chao Yang 2, Yunfei Du 1

CSE 520S Real-Time Systems

File Systems: Fundamentals

Critiques. Ø Critique #1

The optical memory card is a Write Once media, a written area cannot be overwritten. Information stored on an optical memory card is non-volatile.

Performance & Energy

Concurrent Programing: Why you should care, deeply. Don Porter Portions courtesy Emmett Witchel

Last Time. u Priority-based scheduling. u Schedulable utilization u Rate monotonic rule: Keep utilization below 69%

Batch binary Edwards. D. J. Bernstein University of Illinois at Chicago NSF ITR

Case 1:18-cv TWP-MPB Document 1 Filed 01/04/18 Page 1 of 17 PageID #: 1

SMS based Voting System

Real-Time Wireless Control Networks for Cyber-Physical Systems

Real- Time Wireless Control Networks for Cyber- Physical Systems

Case 1:17-cv Document 1 Filed 12/11/17 Page 1 of 17 IN THE UNITED STATES DISTRICT COURT FOR THE WESTERN DISTRICT OF TEXAS AUSTIN DIVISION

DevOps Course Content

A Micro-Benchmark Evaluation of Catamount and Cray Linux Environment (CLE) Performance

Google App Engine 8/10/17. CS Cloud Compu5ng Systems--Summer II 2017

Cloud Tutorial: AWS IoT. TA for class CSE 521S, Fall, Jan/18/2018 Haoran Li

Last Time. Bit banged SPI I2C LIN Ethernet. u Embedded networks. Ø Characteristics Ø Requirements Ø Simple embedded LANs

Tackling Electrical System Efficiency, Safety and Reliability for pharmaceutical plants

Internet of Things Wireless Sensor Networks. Chenyang Lu

Exploring QR Factorization on GPU for Quantum Monte Carlo Simulation

Support Vector Machines

Cadac SoundGrid I/O. User Guide

Model Act to Permit Continued Access by Law Enforcement to Wire & Electronic Communications

CS 5523 Operating Systems: Synchronization in Distributed Systems

Fall Detection for Older Adults with Wearables. Chenyang Lu

IEEE COMMUNICATIONS SOCIETY CONSTITUTION (IEEE Approval: July 2015) (ComSoc Membership Approval: October 2015)

LPGPU. Low- Power Parallel Compu1ng on GPUs. Ben Juurlink. Technische Universität Berlin. EPoPPEA workshop

CS 5523 Operating Systems: Intro to Distributed Systems

Ø Project Description. Ø Design Criteria. Ø Design Overview. Ø Design Components. Ø Schedule. Ø Testing Criteria. Background Design Implementation

Kjell-Einar Anderssen. Country Manager Norway - Nutanix

Data Distribution Agreement of BME Market Data

Case 5:18-cv Document 1 Filed 01/03/18 Page 1 of 26

4th International Industrial Supercomputing Workshop Supercomputing for industry and SMEs in the Netherlands

Implementing Domain Specific Languages using Dependent Types and Partial Evaluation

A Calculus for End-to-end Statistical Service Guarantees

Special Terms and Conditions of Business for telegra DSLAccess of telegra GmbH

Software License Agreement for Beckhoff Software Products

General Terms and Conditions for SaaS ( SaaS Terms ) of Deutsche Post Adress GmbH & Co. KG, Am Anger 33, Gütersloh, Germany

Hoboken Public Schools. PLTW Introduction to Computer Science Curriculum

New features in Oracle 11g for PL/SQL code tuning.

Case Study. MegaMatcher Accelerator

Estonian National Electoral Committee. E-Voting System. General Overview

Statement on Security & Auditability

Data Processing Development

Case 5:18-cv EJD Document 1 Filed 01/12/18 Page 1 of 27 UNITED STATES DISTRICT COURT NORTHERN DISTRICT OF CALIFORNIA SAN JOSE DIVISION

Case: 1:17-cv Document #: 1 Filed: 12/27/17 Page 1 of 15 PageID #:1 IN THE UNITED STATES DISTRICT COURT FOR THE NORTHERN DISTRICT OF ILLINOIS

Case 1:17-cv GMS Document 1 Filed 10/25/17 Page 1 of 5 PageID #: 30 IN THE UNITED STATES DISTRICT COURT FOR DISTRICT OF DELAWARE

Digital research data in the Sigma2 prospective

Systems and methods for conducting jury research and training for estimating punitive damages

Jussi T. Lindgren, PhD Lead Engineer Inria

Amendment to the Infinite Campus END USER LICENSE AGREEMENT

COMP 635: WIRELESS & MOBILE COMMUNICATIONS COURSE INTRODUCTION. Jasleen Kaur. Fall 2017

Paper Entered: April 21, 2015 UNITED STATES PATENT AND TRADEMARK OFFICE BEFORE THE PATENT TRIAL AND APPEAL BOARD

UNITED STATES DISTRICT COURT CENTRAL DISTRICT OF CALIFORNIA

Wind power integration and consumer behavior: a complementarity approach

Wednesday, January 4, electronic components

GLOBAL-ROAM SOFTWARE LICENCE AGREEMENT 1) LICENCE

Campaign Training: VoteBuilder Overview

From LEGO to youbot: a new education path in service robotics

The Parties to the contract are komro GmbH (hereinafter referred to as komro ), Am Innreit 2, Rosenheim, and the respective User.

FM Legacy Converter User Guide

General Framework of Electronic Voting and Implementation thereof at National Elections in Estonia

Compsci 290.3, Spring 2017 Software Design and Implementation: Mobile Landon Cox Owen Astrachan

IMPLEMENTATION OF SECURE PLATFORM FOR E- VOTING SYSTEM

Anoka County Procedural Law Waiver Application Narrative Section A: Background Implementation of the Help America Vote Act of The Help America

(12) Patent Application Publication (10) Pub. No.: US 2017/ A1

Please see my attached comments. Thank you.

Colorado Secretary of State Election Rules [8 CCR ]

General Contractual Terms and Conditions for the Sale of Standard Software of the company Engelmann Sensor GmbH

Computer Power Management Rules. Ø Jim Kardach, re-red chief power architect, Intel h6p://

White Paper for the People Uniquely Zimbabwean, Globally Recognised

Electronic Voting For Ghana, the Way Forward. (A Case Study in Ghana)

Key Considerations for Implementing Bodies and Oversight Actors

Liveness: The Readers / Writers Problem

Supreme Court of Florida

Copy. Judgment IN THE NAME OF THE PEOPLE. Christoph Hellwig, Schidlachstraße 11, 6020 Innsbruck, Austria - Plaintiff -

YOOCHOOSE GmbH Terms and Conditions Subject Matter

Volume I Appendix A. Table of Contents

This Week on developerworks: Ruby, AIX, collaboration, BPM, Blogger API Episode date:

UNITED STATES DISTRICT COURT CENTRAL DISTRICT OF CALIFORNIA CIVIL MINUTES GENERAL

NVM EXPRESS, INC. INTELLECTUAL PROPERTY POLICY. Approved as of _November 21_, 2015 ( Effective Date ) by the Board of Directors of NVM Express

City of Toronto Election Services Internet Voting for Persons with Disabilities Demonstration Script December 2013

Configuring MST (802.1s)/RSTP (802.1w) on Catalyst Series Switches Running CatOS

PRIVACY POLICY STATEMENT ON THE PROCESSING OF PERSONAL AND SENSITIVE DATA OF THE CUSTOMERS WITHIN THE MEANING OF ARTICLE 13 AND FF. OF REGULATION (EU)

Smart Voting System using UIDAI

PERSONAL DATA PROCESSING AGREEMENT

Transcription:

Final Review Chenyang Lu CSE 467S Embedded Compu5ng Systems

OS: Basic Func2ons Ø OS controls resources: q who gets the CPU; q when I/O takes place; q how much memory is allocated; q power management. Ø Application programs run on top of OS services Ø Challenge: manage multiple, concurrent tasks. Chenyang Lu CSE 467S

POSIX Ø IEEE standards for application portability between Unix variants. q IEEE 1003.1 defines a Unix-like OS interface. q IEEE 1003.2 defines the shell and utilities q IEEE 1003.4 defines real-time extensions. Ø Supported by many operating systems q Variants of UNIX: AIX, HP-UX, Solaris, Linux q Many commercial RTOS Chenyang Lu CSE 467S

Process Ø A process is a unique execution of a program. q Several copies of a program may run simultaneously. Ø A process has its own context. q Data in registers, PC, status. q Stored in Process Control Block (PCB). Ø Thread: lightweight process q Threads share memory space (not registers) in a same process. Ø OS manages processes and threads. Chenyang Lu CSE 467S

Process States Ø A process can be in one of three states: q executing on the CPU; q ready to run; q waiting for data. executing gets CPU preempted needs data Scheduler ready gets data waiting Chenyang Lu 5

Priority- based Scheduling Ø Every job has a priority. Ø CPU goes to the highest-priority job that is ready. Ø Fixed vs. dynamic priority q Fixed priority: all jobs of a same task have a same priority Ø Preemptive vs. non-preemptive 6

Semaphores Ø OS primitive for controlling access to critical regions. q Get access to semaphore S with wait(s). q Perform critical region operations. q Release semaphore with signal(s). Ø Mutex: only one process can hold a mutex at a time. Chenyang Lu CSE 467S

The Differences Ø Interrupt: generated by external devices Ø Exception: generated by CPU due to software errors Ø Trap: enter supervisor mode Chenyang Lu CSE 467S

OS Support for Real- Time Ø Real-Time OS Ø Real-time extensions to general-purpose OS Chenyang Lu CSE 467S

RTOS: Features for Efficiency Ø Small, with minimal set of functionality Ø Fast context switch Ø Fast and time bounded response to interrupts Ø Fixed or variable partitions of memory q May not support paging or virtual memory q May support locking code and data in memory Ø Sequential file that can accumulate data at fast rate q May be memory-based Chenyang Lu CSE 467S

Real- Time Extensions to General OS Ø Generally slower and less predictable than RTOS Ø More functionality and development support Ø Standard interfaces Ø Suitable for soft real-time applications Chenyang Lu CSE 467S

Embedded vs. General- Purpose Ø General-purpose systems q Fairness to all tasks q Optimize throughput q Optimize average performance Ø Embedded systems q Meet all deadlines. q Fairness or throughput is not important q Worry about worst case performance 12

RT- Preempt Patch Ø Officially called CONFIG_PREEMPT_RT patch. Ø Convert Linux into a fully preemptible kernel. Ø Locks q Making in-kernel locking-primitives preemptible through rtmutexes. q Critical sections protected by spinlock_t and rwlock_t are preemptible. q Priority inheritance for in-kernel spinlocks and semaphores. Ø Converting interrupt handlers into preemptible kernel threads. Ø Converting the timer API into separate infrastructures for high resolution kernel timers plus one for timeouts, leading to user space POSIX timers with high resolution. Source: h*ps://rt.wiki.kernel.org/ Chenyang Lu 13

Metrics for Scheduling Algorithms Ø Ability to meet all deadlines. q A task set is schedulable if all jobs meet deadlines. Ø Run-time overhead. q Time required to make scheduling decision. q Number of context switches. 14

Real- Time Schedulability Analysis Ø Task characteristics q Periodic/Aperiodic q Deadline vs. Period q Blocking Ø Important q Understand the assumptions of each analysis. q Know which analysis to apply based on task characteristics. 15

Op2mal Scheduling Algorithms Static Priority D = P RM Utilization bound Response time D < P DM Response time Dynamic Priority EDF Utilization bound EDF Processor demand Assump5ons: periodic, single- processor, no blocking Chenyang Lu 16

Race Condi2ons Ø Critical region: section of code that cannot be interrupted. q Access to shared state (variable) q Access to hardware resource (I/O devices) Ø Prevent race conditions q Semaphores (POSIX) q Disable interrupts (TinyOS) 17

Priority Inversion Ø A low-priority task blocks a high-priority task from running. Ø Problem: Unbounded priority inversion. 18

Unbounded Priority Inversion cri5cal sec5on 1 P(1) blocked by 4,2,3! 1 1 3 2 4 4 4 4 4 0 2 4 6 8 10 12 14 16 18 20 22 19

Priority Inheritance Protocol Ø Fully understand how it works. Ø Schedulability analysis for RM/PIP. q Compute blocking time for each process q Extension to utilization bound and response time analysis Ø Note the assumptions of PIP and analysis! 20

Scheduling Aperiodic Requests Ø Hybrid task set: periodic tasks + aperiodic tasks q Aperiodic tasks: Arrival time is unknown Ø Sporadic task with a hard deadline q Inter-arrival time must be lower bounded q Schedulability analysis: treat as a periodic task with period = minimum inter-arrival time Ø Aperiodic task with a soft deadline q Possibly unbounded inter-arrival time q Maintain hard guarantees on periodic tasks q Reduce response time of aperiodic tasks 21

Aperiodic Servers Ø Background processing q No impact on periodic tasks q Long delay for aperiodic tasks Ø Polling server q Impact on periodic tasks is equivalent to a periodic task q Long delay for aperiodic tasks that miss the server Ø Deferrable server q Changes the utilization bound q Short delay for aperiodic requests 22

Good Luck! J 23