Engineering Open House Need students to demo their players on –Friday 3-4 –Saturday 10-2.

Slides:



Advertisements
Similar presentations
A Sample RTOS Presentation 4 Group A4: Sean Hudson, Manasi Kapadia Syeda Taib.
Advertisements

Real-Time Library: RTX
Big Picture Lab 4 Operating Systems Csaba Andras Moritz.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Chapter 2: Processes Topics –Processes –Threads –Process Scheduling –Inter Process Communication (IPC) Reference: Operating Systems Design and Implementation.
CSE Fall Introduction - 1 What is an Embedded Systems  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
Race Conditions CS550 Operating Systems. Review So far, we have discussed Processes and Threads and talked about multithreading and MPI processes by example.
Embedded Systems Interrupts C.-Z. Yang Sept.-Dec
CSE 466 – Fall Introduction - 1 Remainder of Syllabus  Lecture  RTOS  Maestro In Linux  Distributed Control Architecture – distributed state.
IN2305-II Embedded Programming Lecture 5: Survey of SW Architectures.
Embedded Systems 7763B Mt Druitt College of TAFE
Real Time Operating System
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
Advanced Operating Systems CIS 720 Lecture 1. Instructor Dr. Gurdip Singh – 234 Nichols Hall –
Chapter 5 – CPU Scheduling (Pgs 183 – 218). CPU Scheduling  Goal: To get as much done as possible  How: By never letting the CPU sit "idle" and not.
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.
Chapter 6 Scheduling. Basic concepts Goal is maximum utilization –what does this mean? –cpu pegged at 100% ?? Most programs are I/O bound Thus some other.
Getting Started with the µC/OS-III Real Time Kernel Akos Ledeczi EECE 6354, Fall 2015 Vanderbilt University.
Multiprocessor and Real-Time Scheduling Chapter 10.
Linux Kernel introduction COSC 513 Xiaoping Yang.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
Cpr E 308 Spring 2005 Process Scheduling Basic Question: Which process goes next? Personal Computers –Few processes, interactive, low response time Batch.
RTX - 51 Objectives  Resources needed  Architecture  Components of RTX-51 - Task - Memory pools - Mail box - Signals.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
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.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Big Picture Lab 4 Operating Systems C Andras Moritz
Outlines  Introduction  Kernel Structure  Porting.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Real-Time Operating Systems RTOS For Embedded systems.
REAL-TIME OPERATING SYSTEMS
Advanced Operating Systems CIS 720
Real time systems RTS Engineering.
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Topics Covered What is Real Time Operating System (RTOS)
Safe Queue? … while (next(head) == tail); // block if full
OPERATING SYSTEMS CS3502 Fall 2017
Networks and Operating Systems: Exercise Session 2
REAL TIME OPERATING SYSTEM
Getting Started with the µC/OS-III Real Time Kernel
CSE 466 – Fall Introduction - 1
Process Synchronization and Communication
Real-time Software Design
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
An Embedded Software Primer
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Chapter 2: The Linux System Part 3
Chapter5: CPU Scheduling
Chapter 6: CPU Scheduling
CPU SCHEDULING.
Outline Scheduling algorithms Multi-processor scheduling
Multiprocessor and Real-Time Scheduling
Chapter 6: CPU Scheduling
Process Scheduling Decide which process should run and for how long
EE 472 – Embedded Systems Dr. Shwetak Patel.
Chapter 10 Multiprocessor and Real-Time Scheduling
CSE 153 Design of Operating Systems Winter 19
Shortest-Job-First (SJR) Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Presentation transcript:

Engineering Open House Need students to demo their players on –Friday 3-4 –Saturday 10-2.

Embedded Software Architectures No Operating System –Round robin: sequential polling for events –Round robin w/ interrupts –Function Queue Scheduling Real Time Operating System

Maestro in RR+INT volatile bit fEndOfSlice, fSerial; void isr(void) interrupt … { process_tones(); if (!--sliceCount) { changeTones(); sliceCount = SliceSize fEndOfSlice = TRUE; } void serial(void) interrupt …{ timeCritical(); fSerial = TRUE; } main () { if (fSerial) {process_serial_data(); fSerial = FALSE;} if (fEndOfSlice) { if (--TNE==0) process_next_event(); fEndOfSlice = FALSE; } What are the time critical functions? Flipping channels, change tones at end of timeslice What are the housekeeping functions? TNE count down and stream processing (TNE, Tones) Do these have hard time constraints too? Yes, one time slice (18ms)…good enough? Not necessarily…serial is undefined!

Task Diagram Worst case analysis: character comes one cycle before TF0 Worst case latency: Sum of max of all task functions. Advantage over RR: Critical Stuff happens in ISR main housekeeping serial char arrives timer0 overflow occurs (TF0) Can we do better? isr time slice starttime slice end deadline serial_isr

Function Queue void isr(void) interrupt … { process_tones(); if (!--sliceCount) { changeTones(); sliceCount = SliceSize; enq(process_time_slice); } void serial(void) interrupt …{ timeCritical(); enq(process_serial_data); } void main(void) { while (1) if (f = deq()) { *f()); } What is the advantage of this? Programmer can set priority for task functions. Worst case latency for priority n task function? Sum of max execution time for all task functions of priority > n + max current task With only two tasks, it is the same as RR+INT. And it does not allow any non- deterministic tasks. You get a scheduling opportunity every time a task completes.

Task Diagram Worst case analysis: Its actually different…serial has to get started Worst case latency: Sum of max of all task functions Advantage: Can support priorities, but still at mercy of slowest task. main housekeeping serial char arrives timer0 overflow occurs (TF0) Can we do better? isr time slice starttime slice end deadline serial_isr

Comparison Non OS Architectures See Chapter 5, table 5.1 Simon

Real Time Operating Systems What is the basic thing we want the OS to do to help us improve worst case latency? Enable multithreading How? Define an OS time-slice (tick) at which highest priority ‘runnable’ task is continued. Priority function determines response behavior. Simplest Scheduling algorithm: each task gets at most 1 tick at a time to run. Round Robin Scheduling. Worst case task latency = #tasks*tick. Worst case run time = ticks/task * #tasks Some properties of such system: liveness, safety, fairness, latency, overhead. Other niceties: Device Drivers, Synchronization, Data Sharing (messages, queues, etc.), Memory Management

Programmers View void tone_isr(void) interrupt … { process_tones(); if (!--sliceCount) { changeTones(); sliceCount = SliceSize isr_send_signal(MUSIC); } void serial_isr(void) interrupt …{ timeCritical(); os_send_signal(SERIAL); } void play(void) _task_ MUSIC { os_create(SERIAL); while (1) {os_wait(); process_next_event();} } void serial(void) _task_ SERIAL { while (1) {os_wait(); process_serial_data();} // os_create(MUSIC)? } Advantages: Deterministic response time even w/ non deterministic tasks lengths. Incremental development Resources: Task switching overhead Memory overhead Use of system timer Degrades best case response time. Tasks are threads

Task Diagram music serial music_isr serial_isr OS music time slice start music time slice end os time slice os time slice os time slice Char arrives os time slice Music task is never more than one OS time slice away

Another Solution Multiprocessor: Dedicate one processor to each (or a few) tasks. Still need synchronization and communication. Our Orchestra network could be an example of a multiprocessor system

Design Meeting What’s next? –Streaming

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)

Basic Architecture of an RT OS Task Table –Process state, signal flag, time_out counter, context System Interrupt Service Routine (timer) System Calls (Code, time)

Benefits

Embedded Software Software States v. Finite State Machines Hierarchical State Thread/Process Communication –Critical Sections –Synchronization –Messaging and Signaling