Lazy Preemption to Enable Path-Based Analysis of Interrupt-Driven Code

Slides:



Advertisements
Similar presentations
Simulation of Feedback Scheduling Dan Henriksson, Anton Cervin and Karl-Erik Årzén Department of Automatic Control.
Advertisements

EE5900 Advanced Embedded System For Smart Infrastructure
Analyzing Regression Test Selection Techniques
CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Resource Containers: A new Facility for Resource Management in Server Systems G. Banga, P. Druschel,
Modeling Kanban Scheduling in Systems of Systems Alexey Tregubov, Jo Ann Lane.
TOSSIM A simulator for TinyOS Presented at SenSys 2003 Presented by : Bhavana Presented by : Bhavana 16 th March, 2005.
Vertically Integrated Analysis and Transformation for Embedded Software John Regehr University of Utah.
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
1 TinyOS 2.1: Deploying Memory Safety Nathan Cooprider Yang Chen Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing †
Random Testing of Interrupt-Driven Software John Regehr University of Utah.
1 Efficient Memory Safety for TinyOS 2.1 Yang Chen Nathan Cooprider Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
0 Deterministic Replay for Real- time Software Systems Alice Lee Safety, Reliability & Quality Assurance Office JSC, NASA Yann-Hang.
Cooperative Task Management without Manual Stack Management Or, Event-driven Programming is not the Opposite of Thread Programming Atul Adya, John Howell,
Advanced Embedded Systems Design Pre-emptive scheduler BAE 5030 Fall 2004 Roshani Jayasekara Biosystems and Agricultural Engineering Oklahoma State University.
Secure Web Applications via Automatic Partitioning Stephen Chong, Jed Liu, Andrew C. Meyers, Xin Qi, K. Vikram, Lantian Zheng, Xin Zheng. Cornell University.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Department of Computer Science A Static Program Analyzer to increase software reuse Ramakrishnan Venkitaraman and Gopal Gupta.
Design Tradeoffs For Software-Managed TLBs Authers; Nagle, Uhlig, Stanly Sechrest, Mudge & Brown.
Transparent Grid Enablement Using Transparent Shaping and GRID superscalar I. Description and Motivation II. Background Information: Transparent Shaping.
Static Program Analysis of Embedded Software Ramakrishnan Venkitaraman Graduate Student, Computer Science Advisor: Dr. Gopal Gupta
Sentomist: Unveiling transient WSN bugs via symptom mining 1 Sentomist: Unveiling Transient Sensor Network Bugs via Symptom Mining Yangfan Zhou, Xinyu.
On-Demand Dynamic Software Analysis Joseph L. Greathouse Ph.D. Candidate Advanced Computer Architecture Laboratory University of Michigan December 12,
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
1 RealProct: Reliable Protocol Conformance Testing with Real Nodes for Wireless Sensor Networks Junjie Xiong, Edith C.-Ngai, Yangfan Zhou, Michael R. Lyu.
Xiong Junjie Node-level debugging based on finite state machine in wireless sensor networks.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Course: COMS-E6125 Professor: Gail E. Kaiser Student: Shanghao Li (sl2967)
Slide 1/14 Midsens ’09 – December 1, 2009 Lightweight Tracing For Wireless Sensor Networks Debugging Vinaitheerthan Sundaram*, Patrick Eugster, Xiangyu.
Grigore Rosu Founder, President and CEO Professor of Computer Science, University of Illinois
In-Network Query Processing on Heterogeneous Hardware Martin Lukac*†, Harkirat Singh*, Mark Yarvis*, Nithya Ramanathan*† *Intel.
1 Software Reliability in Wireless Sensor Networks (WSN) -Xiong Junjie
How & When The Kernel Runs David Ferry, Chris Gill Department of Computer Science and Engineering Washington University, St. Louis MO
MOPS: an Infrastructure for Examining Security Properties of Software Authors Hao Chen and David Wagner Appears in ACM Conference on Computer and Communications.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
Testing Concurrent Programs Sri Teja Basava Arpit Sud CSCI 5535: Fundamentals of Programming Languages University of Colorado at Boulder Spring 2010.
Where Testing Fails …. Problem Areas Stack Overflow Race Conditions Deadlock Timing Reentrancy.
Outlines  Introduction  Kernel Structure  Porting.
PINTOS: An Execution Phase Based Optimization and Simulation Tool) PINTOS: An Execution Phase Based Optimization and Simulation Tool) Wei Hsu, Jinpyo Kim,
 Operating system.  Functions and components of OS.  Types of OS.  Process and a program.  Real time operating system (RTOS).
TinyOS and nesC. Outline ● Wireless sensor networks and TinyOS ● Networked embedded system C (nesC) – Components – Interfaces – Concurrency model – Tool.
Path-Based Fault Correlations
REAL-TIME OPERATING SYSTEMS
On-Demand Dynamic Software Analysis
Advanced Operating Systems CIS 720
How & When The Kernel Runs
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Elaine Cheong Yang Zhao December 8, 2001
Dr.K.Venkata Subba Reddy Professor-CSE Department
EEE 6494 Embedded Systems Design
runtime verification Brief Overview Grigore Rosu
Mark Weiser University of Maryland, College Park IEEE CHI, 1981
High Coverage Detection of Input-Related Security Faults
CS 258 Reading Assignment 4 Discussion Exploiting Two-Case Delivery for Fast Protected Messages Bill Kramer February 13, 2002 #
Swi Scheduling Hwi Swi Tsk Idle
Human Complexity of Software
RealProct: Reliable Protocol Conformance Testing with Real Nodes for Wireless Sensor Networks Junjie Xiong
CS 501: Software Engineering Fall 1999
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Dynamic Program Analysis
Chapter 29: Program Security
Department of Electrical Engineering Joint work with Jiong Luo
A General Approach to Real-time Workflow Monitoring
CSE 542: Operating Systems
Modeling Event-Based Systems in Ptolemy II EE249 Project Status Report
Anand Bhat*, Soheil Samii†, Raj Rajkumar* *Carnegie Mellon University
Prof. Onur Mutlu Carnegie Mellon University
Presentation transcript:

Lazy Preemption to Enable Path-Based Analysis of Interrupt-Driven Code Wei Le, Jing Yang, Mary Lou Soffa, and Kamin Whitehouse Department of Computer Science University of Virginia SESENA’11 May 22, Waikiki, Honolulu, Hawaii

WSN Reliability is Important $25 million for a 100,000 node volcano monitoring network Large money loss if it mistakenly reports a non-existing eruption Severe vulnerability and human casualty if it fails to report a real eruption However, traditional techniques and tools for software reliability are handicapped in the WSN domain !

Testing and Debugging? Limited by the large range of possible input sequences Real deployment environments are difficult to emulate Resource constraints limit the use of runtime techniques Continuous debugging and reprogramming is hard due to remote node deployments Simulation Deployment Real environments Scale EmStar ICE Realism Controlled environments

A Complementary: Static Analysis Interrupt-driven code Exponential growth of the state space Path selection: sacrificing coverage Path merging: sacrificing precision Our contribution Insight: physical world changes much slower than software execution Solution: run interrupt handlers when necessary (based on timing) or convenient (end of functions)

A Complementary: Static Analysis Task Interrupt Handler 1 5 1, 5, (2|3), 4 1, 2, 5, 4 1, 3, 5, 4 1, (2|3), 4, 5 Total: 6 paths 1, (2|3), 4, 5 Total: 2 paths 3 2 4

Outline Background Lazy preemption models Path-based fault detector

Execution Model TinyOS Task Interrupt Atomic section Tasks, interrupt handlers, and atomic sections Task In-order execution from the task queue Interrupt Generated by hardware or environments Can preempt the current execution Atomic section Interrupts are disabled

From the most-severe-bug-pool of the TinyOS bug repository Faults Taxonomy Bug Types Number of Bugs Interrupt Related Bugs Deadlock 4 Race Condition 2 Atomicity Violation 1 Task Queue Overflow Stack Overflow Logic violation bugs 5 From the most-severe-bug-pool of the TinyOS bug repository

Requirements for A Fault Detector Both detecting and reporting faults should be based on program paths The interactions between interrupts and tasks should be modeled Timing analysis should be performed

Outline Background Lazy preemption models Path-based fault detector

Fully Preemptive Model Task Interrupt Handler 1 5 1, 5, (2|3), 4 1, 2, 5, 4 1, 3, 5, 4 1, (2|3), 4, 5 Total: 6 paths 3 2 4

Size of Atomic Sections

Size of Tasks and Interrupt Handlers

Non Preemptive Model Task Interrupt Handler 1 5 1, (2|3), 4, 5 Total: 2 paths 3 2 4 Only preempt at the end of tasks

Restricted Preemptive Model Task Interrupt Handler 1 5 1, (2|3), 4, 5 1, 3, 5, 4 Total: 3 paths 1, (2|3), 4, 5 Total: 2 paths 3 2 Preempt when necessary 4 Only preempt at the end of tasks

Outline Background Lazy preemption models Path-based fault detector

Framework and Workflow nesC Compiler Static Timing Analysis Runtime Enforcement WSN App in nesC C program CFGs IICFG Execution based on IICFG Demand-Driven Analysis Faults Fix Bugs

Static Timing Analysis to Build IICFG Input Source code Arrival frequency for each interrupt Required response time for each interrupt Output Inter-procedural control flow graph (IICFG) Preemption points on IICFG

Demand-Driven, Path-Based Fault Detection Task Interrupt Handler Q5 Len(input)<32:Vul Q1 Len(b)<32 1 b = input strcpy(a, b) 5 Q4 4 < 32: Safe Q3 Len(b)<32 2 b = “test” 3 4 Q2 Len(b)<32

Runtime Preemption Enforcement Record handler Invoked whenever an interrupt arrives Records the data at the hardware port Action handler Invoked only at preemption points Switches the context Executes the original interrupt handler

Conclusion Static analysis in the WSN domain Satisfy both coverage and precision Two lazy preemption models Demand-driven, path-based Implementation in progress