ECE 477 Digital Systems Senior Design Project. Module 10 Embedded Software Development

Similar documents
EMBEDDED SOFTWARE DEVELOPMENT. George Hadley 2017, Images Property of their Respective Owners

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Processes and threads

Real-Time Programming

ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far.

NanoRK. EECE 494 Sathish Gopalakrishnan

Unix SVR4 (Open Solaris and illumos distributions) CPU Scheduling

In examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured

Industrial Embedded Systems - Design for Harsh Environment -

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke

Chapter 5: CPU Scheduling

Tasks. Task Implementation and management

CS 322 Operating Systems Practice Midterm Questions


Scheduling. CS 161: Lecture 4 2/9/17

Advanced Operating Systems (CS 202) Scheduling (1)

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

Introduction to Embedded Systems

Operating Systems Comprehensive Exam. Spring Student ID # 3/20/2013

Requirements, Partitioning, paging, and segmentation

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses.

Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology

SMD149 - Operating Systems

DSP/BIOS Kernel Scalable, Real-Time Kernel TM. for TMS320 DSPs. Product Bulletin

Embedded Software TI2726 B. 7. Embedded software design. Koen Langendoen. Embedded Software Group

Embedded Systems. 5. Operating Systems. Lothar Thiele. Computer Engineering and Networks Laboratory

Midterm Exam. October 20th, Thursday NSC

Concurrent Programming. Implementation Alternatives. Content. Real-Time Systems, Lecture 2. Historical Implementation Alternatives.

Common Computer-System and OS Structures

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

Concurrent Programming

Process Scheduling Queues

Computer Systems Assignment 4: Scheduling and I/O

CS 261 Fall Mike Lam, Professor. Virtual Memory

Embedded System Curriculum

Chapter 5 CPU scheduling

SE300 SWE Practices. Lecture 10 Introduction to Event- Driven Architectures. Tuesday, March 17, Sam Siewert

Sistemi in Tempo Reale

CHAPTER 11 INTERRUPTS PROGRAMMING

Signature: 1. (10 points) Basic Microcontroller Concepts

CS 326: Operating Systems. CPU Scheduling. Lecture 6

Lesson 5: Software for embedding in System- Part 2

Hardware OS & OS- Application interface

Operating System Review Part

I/O Systems (3): Clocks and Timers. CSE 2431: Introduction to Operating Systems

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

Recall: Address Space Map. 13: Memory Management. Let s be reasonable. Processes Address Space. Send it to disk. Freeing up System Memory

Operating System Concepts Ch. 5: Scheduling

First-In-First-Out (FIFO) Algorithm

Operating Systems. Lecture Process Scheduling. Golestan University. Hossein Momeni

Operating Systems. Instructor: Dmitri A. Gusev. Spring Lecture 16, April 17, CSC : Introduction to Computer Science

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14

Micrium µc/os II RTOS Introduction EE J. E. Lumpp

Virtual Memory Outline

Asynchronous Events on Linux

ELEC 377 Operating Systems. Week 1 Class 2

I/O Devices. Nima Honarmand (Based on slides by Prof. Andrea Arpaci-Dusseau)

INPUT/OUTPUT ORGANIZATION

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Introduction to OS. Introduction MOS Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

Lecture 3: Concurrency & Tasking

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Memory management. Knut Omang Ifi/Oracle 10 Oct, 2012

Embedding OS in AVR microcontrollers. Prof. Prabhat Ranjan DA-IICT, Gandhinagar

7/20/2008. What Operating Systems Do Computer-System Organization

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals

Multitasking. Embedded Systems

Main Points of the Computer Organization and System Software Module

Running on the Bare Metal with GeekOS

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

INPUT/OUTPUT ORGANIZATION

INPUT/OUTPUT ORGANIZATION

ECEN 449 Microprocessor System Design. Hardware-Software Communication. Texas A&M University

Operating Systems 2010/2011

Chapter 09. Programming in Assembly

The control of I/O devices is a major concern for OS designers

Efficiency and memory footprint of Xilkernel for the Microblaze soft processor

Process Scheduling. Copyright : University of Illinois CS 241 Staff

Virtual Memory Oct. 29, 2002

Lecture 17: Threads and Scheduling. Thursday, 05 Nov 2009

COSC243 Part 2: Operating Systems

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 23

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013

University of Washington EE 472: Microcomputer Systems Exam Autumn 2015

8: Scheduling. Scheduling. Mark Handley

Abstractions and Reality

Two Real-Time Operating Systems and Their Scheduling Algorithms: QNX vs. RTLinux

real-time kernel documentation

Four Components of a Computer System

CS3733: Operating Systems

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

Lecture notes Lectures 1 through 5 (up through lecture 5 slide 63) Book Chapters 1-4

Assignment 3 (Due date: Thursday, 10/15/2009, in class) Part One: Provide brief answers to the following Chapter Exercises questions:

CS/ECE 6780/5780. Al Davis

Page 1. Lab 5 Logistics. Implicit Threads. Explicit Thread Semantics. Problem not enough interrupt pins CS/ECE 6780/5780. Al Davis

Chapter 1: Introduction

Process- Concept &Process Scheduling OPERATING SYSTEMS

Chapter 5: CPU Scheduling

CS 5460/6460 Operating Systems

Transcription:

2011 by D. G. Meyer ECE 477 Digital Systems Senior Design Project Module 10 Embedded Software Development

Outline Memory Models Memory Sections Discussion Application Code Organization

Memory Models - 1 What are the primary differences between generalpurpose processor memory models and embedded processor memory models? Flat memory model (typically no memory hierarchy or virtual memory) Limited (fixed, non-infinite ) SRAM data space and Flash program space Non-homogeneous memory types SRAM read/write (volatile unless battery backup used) Flash read only (non-volatile in-circuit, sectorerasable and reprogrammable) EEPROM read mostly (non-volatile in-circuit, byte-erasable and reprogrammable)

Memory Models - 2 How do these differences in memory models influence way in which high-level language code is written? Don t use too high a level of abstraction Avoid use of big library routines (e.g., printf) Avoid dynamic memory allocation Avoid complex data structures Avoid recursive constructs Watch declarations (char, int, long) Treat C like a macro-assembly language Remember that floating point support is emulated by lengthy software routines Remember that using table lookup might be a better approach for transcendental functions (sin, cos, tan, log) than calculation via software emulation

Memory Models - 3 Where do I/O devices appear in the memory model? Depends on processor architecture Most are memory-mapped (devices appear in processor s memory address space) Some (e.g., Rabbit, x86) have separate I/O and memory spaces High-level language instruction syntax may be different to address memory-mapped vs. I/O-mapped devices May also be a different syntax for accessing input vs. output ports

Memory Sections - 1 Text section Executable instructions (code) Data section Initialized global or static data (variables) BSS (block start section) Uninitialized global or static data (variables)

Memory Sections - 2 Run time sections Stack for local variables and parameter passing (also, context switch save/restore) Heap dynamic memory allocation (BSS)

Discussion - 1 What does real time mean (or, what are the key characteristics of a real time system)? there are mission critical timing constraints (usually tied to input/output data sampling rates and/or data processing overhead) service latencies are known and fairly tightly bounded are typically event-driven require low overhead context switching

Discussion - 2 What is the difference between a time sharing OS and a real time OS? (cite examples) Time sharing OS (Unix/Linux/Windows) runs as many users/tasks (quasi-simultaneously) as possible utilizes time-slice scheduling relative priority can be assigned by adjusting size of time slice has little/no concern for service latencies task scheduling is a big (round robin) loop utilizes fixed context switch rate (for Unix/Linux, about 200 Hz) has little concern for amount of context switching overhead (e.g., page thrashing)

Discussion - 3 What is the difference between a time sharing OS and a real time OS? (cite examples) Real time OS (QNX,VRTX, Embedded Linux) tries to minimize, bound service latencies utilizes preemptive, multi-tasking scheduling requires process threads that can be prioritized requires multiple interrupt levels

Discussion - 4 What does fail safe mean in the context of embedded software (firmware) development? A fail-safe or fail-secure device is one that, in the event of failure, responds in a way that will cause no harm, or at least a minimum of harm, to other devices or danger to personnel. cite examples of fail-safe device behavior cite examples of non fail-safe device behavior

Application Code - 1 What are some possibilities for organizing embedded application code? polled program-driven round robin polling loop round robin polling loop advantage: simple! disadvantage: large number of devices big loop large latency

Application Code - 2 What are some possibilities for organizing embedded application code? interrupt-driven (vectored or polled) sometimes called event driven all processing sometimes called event driven all processing (after initialization) is in response to interrupts may want CPU to sleep between interrupts to reduce power consumption

Application Code - 3 What are some possibilities for organizing embedded application code? command-driven or flag -driven (also referred to as state machine ) hybrid of program-driven and interrupt-driven service routines activated based on (ASCII string) commands received alternately, activities of polling loop can be controlled by state of various flags set by interrupt service routines (e.g., in response to button presses, time slice expiration, etc.)

Application Code - 4 What are some possibilities for organizing embedded application code? real-time OS kernel (timer-interrupt driven) data structure provides list of currently enabled tasks data structure provides list of currently enabled tasks (can be dynamically inserted/deleted) periodic interrupt (RTI) used to determine when tasks rolled in/out can vary relative priority of enabled tasks by changing time slice allocation

Team Exercise 1. Characterize the extent to which your team s design project is real time in nature, and identify the key timing constraints 2. Describe the way in which you plan to organize your application code (based on the four possibilities just discussed)