CSE 370 - Fall 1999 - Introduction - 1 What is an Embedded Systems  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)

Slides:



Advertisements
Similar presentations
Threads, SMP, and Microkernels
Advertisements

CSC 360- Instructor: K. Wu Overview of Operating Systems.
Operating Systems ECE344 Midterm review Ding Yuan
A Sample RTOS Presentation 4 Group A4: Sean Hudson, Manasi Kapadia Syeda Taib.
Real-Time Library: RTX
OS/2 Warp Chris Ashworth Cameron Davis John Weatherley.
Engineering Open House Need students to demo their players on –Friday 3-4 –Saturday 10-2.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
5.6 Semaphores Semaphores –Software construct that can be used to enforce mutual exclusion –Contains a protected variable Can be accessed only via wait.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
A. Frank - P. Weisberg Operating Systems Introduction to Tasks/Threads.
Comparative Operating Systems Fall 2001 An Examination of Embedded Linux as a Real Time Operating System Mark Mahoney.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
Wind River VxWorks Presentation
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
1 Previous lecture review n Out of basic scheduling techniques none is a clear winner: u FCFS - simple but unfair u RR - more overhead than FCFS may not.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
CSE466 Autumn ‘00- 1 Music Format if amp = 0, note is a command switch(note) 0: turn off specified channel 1: continue for specified tne w/ no change else.
2001 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 3.
Operating Systems Lecture 2 Processes and Threads Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of.
Real-Time Systems Design1 Priority Inversion When a low-priority task blocks a higher-priority one, a priority inversion is said to occur Assume that priorities:
Getting Started with the µC/OS-III Real Time Kernel Akos Ledeczi EECE 6354, Fall 2015 Vanderbilt University.
2-1 The critical section –A piece of code which cannot be interrupted during execution Cases of critical sections –Modifying a block of memory shared by.
Real-Time Operating Systems for Embedded Computing 李姿宜 R ,06,10.
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
Cpr E 308 Spring 2004 Real-time Scheduling Provide time guarantees Upper bound on response times –Programmer’s job! –Every level of the system Soft versus.
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling.
RTX - 51 Objectives  Resources needed  Architecture  Components of RTX-51 - Task - Memory pools - Mail box - Signals.
ECGR-6185 µC/OS II Nayana Rao University of North Carolina at Charlotte.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
MicroC/OS-II S O T R.  MicroC/OS-II (commonly termed as µC/OS- II or uC/OS-II), is the acronym for Micro-Controller Operating Systems Version 2.  It.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
6.0 INTRODUCTION TO REAL-TIME OPERATING SYSTEMS (RTOS) 6.0 Introduction A more complex software architecture is needed to handle multiple tasks, coordination,
CSE466 - Fall What is an Embedded System  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)  Lacks some or.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
DSP/BIOS Real Time Operating system using DSP /ARM processor.
CSE466 Autumn ‘00- 1 Task Diagram music serial music_isr serial_isr OS music time slice…signal music task music time slice os time slice os time slice.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
SOC Consortium Course Material SoC Design Laboratory Lab 8 Real-time OS - 1 Speaker: Yung-Chih Chen Advisor: Prof. Chun-Yao Wang November 17, 2003 Department.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Big Picture Lab 4 Operating Systems C Andras Moritz
Outlines  Introduction  Kernel Structure  Porting.
Real-Time Operating Systems RTOS For Embedded systems.
REAL-TIME OPERATING SYSTEMS
Processes and threads.
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
CS 6560: Operating Systems Design
Topics Covered What is Real Time Operating System (RTOS)
6.0 INTRODUCTION TO REAL-TIME OPERATING SYSTEMS (RTOS/RTK)
Lesson Objectives Aims Key Words Interrupt, Buffer, Priority, Stack
Safe Queue? … while (next(head) == tail); // block if full
Getting Started with the µC/OS-III Real Time Kernel
CSE 466 – Fall Introduction - 1
Process Synchronization and Communication
Real-time Software Design
EE 472 – Embedded Systems Dr. Shwetak Patel.
February 5, 2004 Adrienne Noble
CSE 153 Design of Operating Systems Winter 19
CSE 153 Design of Operating Systems Winter 2019
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:

CSE Fall Introduction - 1 What is an Embedded Systems  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)  Lacks some or all traditional human interfaces: screen, keyboard, pointing device, audio  May have stringent real-time requirements (Hard and Soft)  Usually has sensors and actuators for interface to physical world  Figures of Merit  Reliability – it can never crash  Safety – Involves things that move and can harm/kill a person  Power Consumption – may run on limited power supply. Want slowest possible clock, least amount of memory. You will always be resource constrained!  Cost – Engineering Cost, Mfg Cost, Schedule tradeoffs  Product life cycle issues: maintainability, upgradability, servicability  Performance

CSE Fall Introduction - 2 Features of an Embedded Operating System  Live Without  User Interface  Dynamic Linking and Loading  Virtual Memory, Protection Modes (Processes)  Disk  Device Drivers?  Instead we have  Low Latency Interrupts  Tasks (threads)  Task communication primitives  Data sharing primitives  Device Drivers?

CSE Fall Introduction - 3 Embedded OS Features  Task Scheduling/Multithreading  Memory Management (Threads v. Processes)  Synchronization and Communication Primitives  Multitasking Overhead (Context Switch)  Interrupt Latency  Do Timer 1 interrupts trigger during operating system calls (? (use simulator to find out, or look at source code)

CSE Fall Introduction - 4 Multitasking – state maintained for each task Running Ready BlockedDisabled time-slice wait() signal() delete() create() delete() only one task in this state at a time For TINY, this takes cycles per update…is this okay?

CSE Fall Introduction - 5 Interrupt Priorities  Key question: Can Tone Generator Interrupt the OS? OS Task1 Task2 ISR Why is this important?

CSE Fall Introduction - 6 Preemptive vs. Non preemptive OS T1/hi T2/lo ISR Pre-emptive: All tasks have a different priority… hi priority task can preempt low priority task. Highest priority task always runs to completion (wait). Advantage: Lower latency, faster response for high priority tasks. Disadvantage: Potential to starve a low priority task Tiny: no priority, round robin only. No starvation. signal T2 signal T1, preempt T2 T2 Completes

CSE Fall Introduction - 7 Sharing Code between Tasks  Shared functions are useful! deq? enq? next (same for head or tail)? Q declaration and initialization?  Shared data issues  What happens when one of these functions is interrupted by the OS unsigned char next(unsigned char current, unsigned char size) { if (current == size-1) return 0; else return (current+1); } it depends on where the parameters and the automatic variables are stored

CSE Fall Introduction - 8 Encapsulation and Re-use typedef struct qstruct { unsigned char head; unsigned char tail; unsigned char *array; unsigned char size; } qtype; // global variable: qtype Q; void taskID(void) _task_ 0{ unsigned char d; unsigned char i; unsigned char array[QSIZE]; unsigned char x; initq(&Q, array, QSIZE); while (1) { do { ET0 = 0; x = enq(&Q,i++); ET0 = 1; } while (!x); do { ET0 = 0; x = deq(&Q,&d); ET0 = 1; } while (!x); } shared functions are okay if we disallow swapping during calls. why? re-entrant stack not protected by Tiny OS. But shared C libraries are okay. Why? not sure yet.

CSE Fall Introduction - 9 Ways to Protect a Critical Section  Disable Interrupts … be as specific as possible  Semaphores wait() – signal()  each system call is guaranteed to be atomic:  wait block until the flag is set, and clears the flag before returning.  signal sets the flag.  most OS allow you to declare a semaphore as a data type. As many as you want. Tiny limits us to one/task, and it is used to signal the task. Therefore we use semaphores to protect shared data/critical sections.  Disable task switching via a system call…about the same as disabling interrupts to the OS.

CSE Fall Introduction - 10 Embedded System Types  Control Dominated Systems  Software State machines, state synchronization, etc … nuclear power plan  Data flow dominated Systems  our music player  a network router  queues, messages, packets, routing,

CSE Fall Introduction - 11 Homework for Friday/Monday  Propose what our systems should do, and a general architecture for doing it.  Can we handle multiple streams to/from the pilot  Can we stream music while sending a song to another player?  Can we receive a tune while at the same time?  What do we have to do in the system  What do we have to do in the protocol with the host?

CSE Fall Introduction - 12 General Binary Semaphores

CSE Fall Introduction - 13 Comparative Real Time OSes  Compare Tiny to Full to VxWorks

CSE Fall Introduction - 14 Orchestra Functions  Time of day  Get data from net, send to player or to pilot  Send music to net  Get music from net  Play music  Task to play music from net  Task to create/delete other tasks (master)

CSE Fall Introduction - 15 Benefits

CSE Fall Introduction - 16 Embedded Software  Software States v. Finite State Machines  Hierarchical State  Thread/Process Communication  Critical Sections  Synchronization  Messaging and Signaling

CSE Fall Introduction - 17 Live without?  Live Without  User Interface  Dynamic Linking and Loading  Virtual Memory, Protection Modes  Disk  Processes  Instead we have  Real Time Kernel (very small OS)  Tasks (threads)  Task communication primitives  ADC  Timers  Event Capture  PWM