ESD2531- Embedded RTOS Module Leader Deepak V. 1
Module Aims and Summary This module intends to prepare students to design and develop the embedded software using Real-Time Operating System (RTOS). Students will be taught to apply RTOS concepts like multi tasking, memory protection, sharing & managing of resources, schedulability, Inter-process communication, deadlocks, timers, I/O and interrupt handling for developing embedded software; in addition, porting RTOS on embedded target and fault tolerance will be discussed. Students will be trained on the IDE of open source & commercial RTOS s for developing embedded applications 2
Intended Module Learning Outcomes After undergoing this module, students will be able to: Describe real-time system and different RTOS features for developing embedded software Design and implement time critical applications using RTOS Reconfigure and port RTOS (open source & commercial RTOS - VxWorks/QNX/MicroC OS- II/OSEK) based applications on embedded target 3
Indicative Contents Overview of RTOS and VxWorks Need for RTOS, RTOS for embedded applications, Issues & challenges, Key concepts in real-time computing, POSIX 1003.13 standard for real-time operating systems and Operating systems specifically targeted for embedded systems, Multiprocessor support and Fault tolerance & Redundancy management Real-Time Multitasking - Multitasking, Scheduling basics, models, Performance metrics and Pre-emptive priority scheduling Real-time task Schedulability of Real-Time Applications Basic rate monotonic analysis, Extended rate monotonic analysis, Blocking time, Scheduling overhead, Interrupt overhead, Timer overhead, Consideration of aperiodic events, Earliest deadline first and Implementation methods of multitasking in open source & commercial RTOS (VxWorks/QNX/MicroC OS- II/OSEK) Inter-Process Communication - Shared memory, Pipes, Message passing, Binary & counting semaphores, Priority inversion, Bounded priority inversion, Unbounded priority inversion, Solution to the unbounded priority inversion like priority inheritance & priority ceiling, Mutual exclusion with optional priority inheritance, Local or global event flags and open source & commercial RTOS (VxWorks/QNX/MicroC OS- II/OSEK) semaphores, message queues & pipes 4
Indicative Contents Deadlocks Deadlock scenario, Resource allocation graph, Necessary conditions for deadlock, Dealing with deadlocks, Deadlock prevention, Deadlock avoidance, Deadlock detection and Deadlock recovery Memory Management - Multiple memory areas with both fixed- & variablesized blocks allocation policies, No memory protection, Application runs in privileged (supervisor) mode, System executable size and Memory requirements are major constraints Timer Need of timer support, System time, Clock ticks, Timeouts on all blocking services in units of clock ticks, Watchdog timers and Timer implementation in open source & commercial RTOS (VxWorks/QNX/MicroC OS- II/OSEK) Interrupt Handling - Hardware interrupt control, User interrupt handlers, Signals and Exception handling 5
Indicative Contents I/O Systems - Files, Devices, Drivers, Methods of data transfer between device driver & I/O device, Typical APIs available for I/O operations, Typical device driver responsibilities, Support for serial I/O lines, Installable user device drivers, Memory mapped I/O minimal synchronous I/O interface, Debugger interface, I/O subsystem in open source & commercial RTOS (VxWorks/QNX/MicroC OS- II/OSEK) Local File System - Hierarchical file-system (directories), Contiguous preallocation of disk space, Media compatibility with another file-system (e.g. MS- DOS or RT-11) and File systems in open source & commercial RTOS (VxWorks/QNX/MicroC OS- II/OSEK) Network Communications - Compatibility with a protocol stack (e.g. TCP/IP), Applications support such as FTP, TELNET & TFTP, Sockets, Remote Procedure Call (RPC) and Network communication in open source & commercial RTOS (VxWorks/QNX/MicroC OS- II/OSEK) RTOS Initialization and Starting - Booting, Board Support Packages (BSP) for RTOS and Reconfiguration, making kernel image & porting of open source & commercial RTOS (VxWorks/QNX/MicroC OS- II/OSEK) on the embedded target 6
Laboratory Practice IDE for open source & commercial RTOS - VxWorks/MicroC OS- II/OSEK Real-time multitasking for time critical application Inter-process communication (semaphore, Message queues, pipes) for time critical application Interrupts handling Signals Timers for time critical application I/O systems Network programming Reconfiguration and porting of RTOS on embedded target 7
Teaching and Learning Methods Lecture Sessions Demonstrations using VxWorks, MicroC OS, OSEK operating systems and WindRiver Workbench Practical Sessions using VxWorks operating systems and WindRiver Workbench Programming assignments Self-study 8
Evaluation Written Examination: 100 marks (50% weightage) Presentations (04/07/2014) 20 marks Laboratory (14/07/2014) 20 marks ICT (11/07/2014) 60 marks Assignments: 100 marks (50% weightage) Submission Date (26/07/2014) Pass requirement: 40% A minimum of 40 % marks in the written examination and a minimum of 40% marks in the assignment are required for a pass A student failing in any one of the components or both is considered as FAIL 9
Module Resources Essential Reading 1. Module Notes Recommended Reading 1. Penumuchu, C. V. (2007) Simple Real-time Operating System: A Kernel Inside View for a Beginner, Trafford Publishing. 2. Jane, W. S. and Liu. (2000) Real-Time Systems, Prentice-Hall. 3. Burns. (2005) Real-Time Systems and Their Programming Language, 4th edn, Addison- Wesley. 4. Shaw, A. C. (2001) Real-Time Systems and Software, John Wiley. 5. Laplante, P. A. (2001) Real-Time Systems Design and Analysis - An Engineers Handbook, IEEE Press/PHI. Journals 1. IEEE Transactions on Consumer Electronics 2. Transactions on Design Automation of Electronic Systems, TODAES Magazines 1. IEEE Internet Computing Magazine 2. Embedded Systems Engineering Internet Sites 1. https://computing.llnl.gov/tutorials/pthreads/ (accessed on 18th January 2012) 10
Software and Manuals Tornado tool Pentium Target Board Tornado manuals MPLAB IDE PIC Microcontroller FreeOSEK ARM Processor 11
Module Delivery Theory & Laboratory: Mr. Deepak V. Dept of Computer Engineering MSRSAS deepak@msrsas.org 12