4 December 2001 SEESCOASEESCOA STWW - Programma Debugging of Real-Time Embedded Systems: Experiences from SEESCOA Michiel Ronsse RUG-ELIS.

Slides:



Advertisements
Similar presentations
Debugging operating systems with time-traveling virtual machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
Advertisements

CS492B Analysis of Concurrent Programs Lock Basics Jaehyuk Huh Computer Science, KAIST.
CHESS: A Systematic Testing Tool for Concurrent Software CSCI6900 George.
An efficient data race detector for DIOTA Michiel Ronsse, Bastiaan Stougie, Jonas Maebe, Frank Cornelis, Koen De Bosschere Department of Electronics and.
S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, B. Calder UCSD and Microsoft PLDI 2007.
Continuously Recording Program Execution for Deterministic Replay Debugging.
1 Design For Debug Using DAFCA system Gadi Glikberg 15/6/06.
1 CMSC 132: Object-Oriented Programming II Software Development III Department of Computer Science University of Maryland, College Park.
GCSE Computing#BristolMet Session Objectives# Must identify some common types of computer system Should describe the meaning of a computer system Could.
Systems Software Operating Systems.
Virtual Memory Tuning   You can improve a server’s performance by optimizing the way the paging file is used   You may want to size the paging file.
Introduction to Symmetric Multiprocessors Süha TUNA Bilişim Enstitüsü UHeM Yaz Çalıştayı
0 Deterministic Replay for Real- time Software Systems Alice Lee Safety, Reliability & Quality Assurance Office JSC, NASA Yann-Hang.
Lesson 4 Computer Software
Unit VI. Keil µVision3/4 IDE for 8051 Tool for embedded firmware development Steps for using keil.
Deterministic Replay of Java Multithreaded Applications Jong-Deok Choi and Harini Srinivasan slides made by Qing Zhang.
Timing and Race Condition Verification of Real-time Systems Yann–Hang Lee, Gerald Gannod, and Karam Chatha Dept. of Computer Science and Eng. Arizona State.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
MAC OS – Unit A Page: 10-11, Investigating Data Processing Understanding Memory.
15-740/ Oct. 17, 2012 Stefan Muller.  Problem: Software is buggy!  More specific problem: Want to make sure software doesn’t have bad property.
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
SSGRR A Taxonomy of Execution Replay Systems Frank Cornelis Andy Georges Mark Christiaens Michiel Ronsse Tom Ghesquiere Koen De Bosschere Dept. ELIS.
Bug Localization with Machine Learning Techniques Wujie Zheng
AADEBUG MUNCHEN Non-intrusive on-the-fly data race detection using execution replay Michiel Ronsse - Koen De Bosschere Ghent University - Belgium.
Systems Software Operating Systems. What is software? Software is the term that we use for all the programs and data that we use with a computer system.
Compactly Representing Parallel Program Executions Ankit Goel Abhik Roychoudhury Tulika Mitra National University of Singapore.
Games Development 2 Concurrent Programming CO3301 Week 9.
COMP 111 Threads and concurrency Sept 28, Tufts University Computer Science2 Who is this guy? I am not Prof. Couch Obvious? Sam Guyer New assistant.
25 April 2000 SEESCOASEESCOA STWW - Programma Evaluation of on-chip debugging techniques Deliverable D5.1 Michiel Ronsse.
CS162 Week 5 Kyle Dewey. Overview Announcements Reactive Imperative Programming Parallelism Software transactional memory.
Lab 2 Parallel processing using NIOS II processors
1 Software. 2 What is software ► Software is the term that we use for all the programs and data on a computer system. ► Two types of software ► Program.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
Virtual Application Profiler (VAPP) Problem – Increasing hardware complexity – Programmers need to understand interactions between architecture and their.
Thread basics. A computer process Every time a program is executed a process is created It is managed via a data structure that keeps all things memory.
31 Oktober 2000 SEESCOASEESCOA STWW - Programma Work Package 5 – Debugging Task Generic Debug Interface K. De Bosschere e.a.
Grigore Rosu Founder, President and CEO Professor of Computer Science, University of Illinois
Execution Replay and Debugging. Contents Introduction Parallel program: set of co-operating processes Co-operation using –shared variables –message passing.
October 24, 2003 SEESCOASEESCOA STWW - Programma Debugging Components Koen De Bosschere RUG-ELIS.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
Flashback : A Lightweight Extension for Rollback and Deterministic Replay for Software Debugging Sudarshan M. Srinivasan, Srikanth Kandula, Christopher.
SMP Basics KeyStone Training Multicore Applications Literature Number: SPRPxxx 1.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Clock Snooping and its Application in On-the-fly Data Race Detection Koen De Bosschere and Michiel Ronsse University of Ghent, Belgium Taipei, TaiwanDec.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Real-Time Operating Systems RTOS For Embedded systems.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Computer System Structures
14 Compilers, Interpreters and Debuggers
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
CSCI-235 Micro-Computer Applications
Parallel and Distributed Simulation Techniques
MONITORING MICROSOFT WINDOWS SERVER 2003
runtime verification Brief Overview Grigore Rosu
Real-time Software Design
Maintaining Data Integrity in Programmable Logic in Atmospheric Environments through Error Detection Joel Seely Technical Marketing Manager Military &
Threads and Memory Models Hal Perkins Autumn 2011
Threads and Memory Models Hal Perkins Autumn 2009
CS 501: Software Engineering Fall 1999
Chapter 5: Computer Systems Organization
Shared Memory Programming
Chapter 1 Introduction(1.1)
Operating System Introduction.
Chapter 4: Threads.
Lecture 3: Main Memory.
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
Presentation transcript:

4 December 2001 SEESCOASEESCOA STWW - Programma Debugging of Real-Time Embedded Systems: Experiences from SEESCOA Michiel Ronsse RUG-ELIS

SEESCOASEESCOA Problem description  embedded systems have become increasingly sophisticated  debugging becomes a major problem  types of bugs  computational errors  synchronisation errors  performance errors  testing and debugging is responsible for a huge part of the development time   definitive need for appropriate debugging tools

SEESCOASEESCOA Debugging embedded systems  two test/debug phases  during the development  during the actual use  an embedded system  typically runs continuously  interactive debugging?  can have hard and soft real-time constraints  Heisenbugs  parallel and/or distributed systems: absence of a global clock  uses lots of input  repeatability?  cyclic debugging?  hardware related problems: code in ROM, limited amount of RAM  Solution: hardware add-ons for on-chip debugging techniques

SEESCOASEESCOA On-chip debugging techniques (I)  Logic Analyser  ROM monitor  ROM emulator  In-Circuit Emulator  Background Debug Mode  JTAG

SEESCOASEESCOA ualmost all contemporary embedded processors have add-ons for debugging uas embedded processors get faster, these add-ons get closer to (or in) the processor uthese add-ons take up valuable chip area (up to 10%) uthese add-ons are also available in the consumer produsts, making on-site testing possible u  hardware manufacturers believe in design for debugability On-chip debugging techniques (II)

SEESCOASEESCOA Embedded software uNowadays, software engineering methods designed for `business’ applications are also used for embedded systems: wUse of `higher’ languages (C, C++, Java) wUse of reusable components wMultithreaded applications w... uDebugging/maintaining these complex applications becomes a difficult task Design for Debugability

SEESCOASEESCOA Debugging software uMost important notion: wRepeatability  cyclic debugging wObservability  what is going on? uThese are two problems for embedded systems: wNon-determinism present in most embedded systems wLow observability (real-time constraints,...)

SEESCOASEESCOA Causes of non-determinism  Sequential programs: input (keyboard, disk, network, certain system calls (e.g. gettimeofday (), …) uParallel programs: race conditions: wtwo threads waccessing the same shared variable (memory location) win an unsynchronised way wand at least one thread modifies the variable

SEESCOASEESCOA Execution Replay uGoal: make repeated equivalent re-exections possible uMethod: two phases wRecord phase: record all non-deterministic events during an execution in a trace file wReplay phase: use trace file to produce the same execution uQuestion: what & where to trace?

SEESCOASEESCOA Example code #include unsigned global=5; thread2(){ global=global+6; } thread3(){ global=global+7; } main(){ pthread_t t2,t3; pthread_create(&t2, NULL, thread1, NULL); pthread_create(&t3, NULL, thread2, NULL); pthread_join(t2, NULL); pthread_join(t3, NULL); printf(“global=%d\n”, global); }

SEESCOASEESCOA Possible executions L(5) global=12 global=18global=11 L(5) L(11) S(11) S(12) S(11) S(12) S(11) S(18) A A A A A A

SEESCOASEESCOA Example code II #include unsigned global=5; thread2(){lock(); global=global+6; unlock();} thread3(){lock(); global=global+7; unlock();} main(){ pthread_t t2,t3; pthread_create(&t2, NULL, thread1, NULL); pthread_create(&t3, NULL, thread2, NULL); pthread_join(t2, NULL); pthread_join(t3, NULL); printf(“global=%d\n”, global); }

SEESCOASEESCOA Possible executions II global=18 L(5) L(11) S(11) S(18) A A global=18 L(5) L(11) S(11) S(18) A A

SEESCOASEESCOA Race conditions uThree types of conflicts: wload/store wstore/load wstore/store uTwo types: wsynchronisation races:  doesn’t allow the use of cyclic debugging techniques  is not a bug, is desired non-determinism wdata races:  doesn’t allow the use of cyclic debugging techniques  is a bug, is undesired non-determinism

SEESCOASEESCOA Tracing all memory operations Introduces an intolerable overhead, both in time and space Due to out-of-order stores, the order in which threads see events can differ Will replay both synchronization and data races.

SEESCOASEESCOA Tracing synchronization operations The only events that are assured to be seen in the same order are synchronisation operations Synchronization operations are a subset of all memory operations => lower overhead Will replay only synchronization races. Will fail if data races occur. Solution Record: trace synchronization operations Replay: check for data races (once)

SEESCOASEESCOA Record phase Main: 1,2,3,4,5,13,14,... T2: 3,6,7,8,9,... T3: 4,5,6,8,10,11,12,...

SEESCOASEESCOA Replay phase Main: 1,2,3,4,5,13,14,... T2: 3,6,7,8,9,... T3: 4,5,6,8,10,11,12,...

SEESCOASEESCOA Implementation uRecPlay for Solaris (SPARC) and Linux (x86) uUses JiTI for dynamic instrumentation uRecord overhead: 1.6%

SEESCOASEESCOA Instrumenting Java classes

SEESCOASEESCOA The RecPlay system for Java

SEESCOASEESCOA Current Situation uRecord/replay for synchronization operations works uTo be added: wRace detection wTracing of input