EMBEDDED SYSTEMS 9 April 2013 William W. McMillan.

Slides:



Advertisements
Similar presentations
Operating System.
Advertisements

Chapter 20- Embedded Systems Lecture 1. Topics covered  Embedded systems design  Architectural patterns  Timing analysis  Real-time operating systems.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
IT Systems Multiprocessor System EN230-1 Justin Champion C208 –
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
Big Picture Lab 4 Operating Systems Csaba Andras Moritz.
Chapter 2: Processes Topics –Processes –Threads –Process Scheduling –Inter Process Communication (IPC) Reference: Operating Systems Design and Implementation.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
1: Operating Systems Overview
OS Spring 2004 Concurrency: Principles of Deadlock Operating Systems Spring 2004.
OPERATING SYSTEM OVERVIEW
OS Fall’02 Concurrency: Principles of Deadlock Operating Systems Fall 2002.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
Race Conditions CS550 Operating Systems. Review So far, we have discussed Processes and Threads and talked about multithreading and MPI processes by example.
Using Two Queues. Using Multiple Queues Suspended Processes Processor is faster than I/O so all processes could be waiting for I/O Processor is faster.
EMBEDDED SOFTWARE Team victorious Team Victorious.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 1.
Course Outline DayContents Day 1 Introduction Motivation, definitions, properties of embedded systems, outline of the current course How to specify embedded.
Selecting and Implementing An Embedded Database System Presented by Jeff Webb March 2005 Article written by Michael Olson IEEE Software, 2000.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
CS 153 Design of Operating Systems Spring 2015 Lecture 11: Scheduling & Deadlock.
1 소프트웨어공학 강좌 Chap 11. Real-time software Design - Designing embedded software systems whose behaviour is subject to time constraints -
Round Robin Scheduling A preemptive scheduling designed for Time Sharing Systems The Ready Queue is treated as a circular queue A small execution.
CS 346 – Chapter 1 Operating system – definition Responsibilities What we find in computer systems Review of –Instruction execution –Compile – link – load.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
6 Memory Management and Processor Management Management of Resources Measure of Effectiveness – On most modern computers, the operating system serves.
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Slide 1 Chapter 11 Real –time Software Designs. Slide 2 Real-time systems l Systems which monitor and control their environment l Inevitably associated.
Systems II San Pham CS /20/03. Topics Operating Systems Resource Management – Process Management – CPU Scheduling – Deadlock Protection/Security.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
RELIABILITY ENGINEERING 28 March 2013 William W. McMillan.
1: Operating Systems Overview 1 Jerry Breecher Fall, 2004 CLARK UNIVERSITY CS215 OPERATING SYSTEMS OVERVIEW.
©Ian Sommerville, Robin Abraham 2004CS 361, Summer 2004 Slide 1 Real-time Software Design.
Real-time Software Design King Saud University College of Computer and Information Sciences Department of Computer Science Dr. S. HAMMAMI.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Deadlock Operating Systems: Internals and Design Principles.
Chapter 8 System Management Semester 2. Objectives  Evaluating an operating system  Cooperation among components  The role of memory, processor,
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
OPERATING SYSTEM REVIEW. System Software The programs that control and maintain the operation of the computer and its devices The two parts of system.
An operating system for a large-scale computer that is used by many people at once is a very complex system. It contains many millions of lines of instructions.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Big Picture Lab 4 Operating Systems C Andras Moritz
9691 Computing Paper 3 Section 3.1 The functions of Operating Systems.
CONCEPTS OF REAL-TIME OPERATING SYSTEM. OBJECTIVE  To Understand Why we need OS?  To identify Types of OS  To Define Real - Time Systems  To Classify.
CPU Scheduling Scheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource.
Computer Organisation
Real-time Software Design
Real-time Software Design
Real-time Software Design
REAL-TIME OPERATING SYSTEMS
Resource Management IB Computer Science.
Chapter 2 Memory and process management
Component 2 6G, H, I, J, K.
Processes and Threads Processes and their scheduling
Real-time Software Design
Processor Fundamentals
Unit 1: Introduction to Operating System
CPU scheduling decisions may take place when a process:
Chapter 2: Operating-System Structures
EE 472 – Embedded Systems Dr. Shwetak Patel.
Chapter 2: Operating-System Structures
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

EMBEDDED SYSTEMS 9 April 2013 William W. McMillan

What embedded systems existed in 1980? How many do you have on your person right now?

Kinds of Real-Time Operations  Monitor and record.  Actuate (move, release).  Alarm, shut down, or take other emergency action.  Control access.  Deliver content.  Communicate.  Translate, decode, or interpret.

Challenges of Real-Time  Small memory.  Slow processor.  Low power.  Need to be fast.  Deadlines need to be met.  Concurrent processes.  Need for reliability.

When have you programmed a real- time or embedded system? What challenges did you face?

Management Challenges  Programming language trade-offs.  Choosing hardware platform.  Choosing software platform.  Getting staff who know physics and electronics.  Deciding deployment.  Maintenance.

Decision Tables  “Stimulus-response” table.  E.g., if power low and buffer nearly full, write data in alternate storage.  Arrange by columns:  Condition, action.  Likely preliminary to state diagrams and are less formal.

State Diagrams  A principal tool for real-time systems.  Used in design, of course.  Critical for communicating how system works.  Need to keep up-to-date.  Use software tools to support.

Besides state diagrams, what other UML diagrams come to mind as useful for real-time and embedded systems?

Programming Practices  See reliability engineering.  Special premium on algorithm efficiency.  Memory is precious.  Pack data, e.g., bits for Booleans.  Use short representations when you can.  Need to control access.  Avoid dynamic memory allocation.  Protect stacks, etc. from overflow.

Programming Practices  Can have many “global” devices and data, e.g.,  Ports.  Status bits.  Video memory.  Buffers.  Need much more discipline in accessing these.  Code inspection and formal analysis are useful.

Programming Practices  Data structures  Circular queue: Producer prevented from adding to full queue. Consumer prevented from taking from empty queue.  Pipeline: Data handed from process to process.  General: hashing, logarithmic search, etc.  Timing analysis  Model processes to predict.  Based on finite state machines.

Think of a typical programming construct or method that would be inappropriate in many embedded systems.

Ways to Get Data and Status  Keep channels open  Switch-style, continuous communication.  Simplex or duplex.  Polling  Ask devices at regular intervals how things are going, if there are data, etc.  Interrupts  Device has low-level access to event loop.  Actively sends message when needs attention.

Scheduling (OS Issue)  Round robin  Each process gets a time unit in turn.  Priority queue  Most important goes first…  … but do the less important ever get a chance?  Multiple queues, by priority  Higher priority get less time.  As run more often, get more time, but lower priority.

Scheduling (OS Issue)  Shortest first  Run smaller jobs first.  Policy-driven, e.g.,  If get less than share of CPU time, raise priority.  If impending deadline, raise priority.  If related to alarm, raise priority.

For a mobile device application, describe a policy for scheduling concurrent processes.

Sticky Wickets (OS Issues)  Deadlock, e.g.,  ThreadA holds printer, waits for File1.  ThreadB holds File1, waits for printer.  Race condition, e.g.,  ThreadA: if (x == y)  ThreadB: if (x == y)  ThreadA: { x++; }  ThreadB { x++; }