CSE 466 – Fall Introduction - 1

Slides:



Advertisements
Similar presentations
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Advertisements

Engineering Open House Need students to demo their players on –Friday 3-4 –Saturday 10-2.
The Kernel Abstraction. Challenge: Protection How do we execute code with restricted privileges? – Either because the code is buggy or if it might be.
Informationsteknologi Wednesday, September 26, 2007 Computer Systems/Operating Systems - Class 91 Today’s class Mutual exclusion and synchronization 
Chapter 11 Distributed Processing Co-routines Each co-routine has own stack for activation records Keeps track of point to RESUME Symmetric (peer) relationship.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
CSE Fall Introduction - 1 What is an Embedded Systems  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)
OS Spring’03 Introduction Operating Systems Spring 2003.
CPS110: Implementing threads/locks on a uni-processor Landon Cox.
CSE 466 – Fall Introduction - 1 Remainder of Syllabus  Lecture  RTOS  Maestro In Linux  Distributed Control Architecture – distributed state.
CSE 466 – Fall Introduction - 1 Fuel Cell Power Plant A Control Dominated Example H2H2 Air H20H20 Heat controller sense: Temperature H 2 Output.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
SOC Consortium Course Material SoC Design Laboratory Lab 8 Real-time OS - 2 Speaker: Yung-Chih Chen Advisor: Prof. Chun-Yao Wang November 17, 2003 Department.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 10 Real Time System Design.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Threads and Processes.
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.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Operating Systems Lecture 7 OS Potpourri Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software.
Simulation of Distributed Application and Protocols using TOSSIM Valliappan Annamalai.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
1 CSE451 Architectural Supports for Operating Systems Autumn 2002 Gary Kimura Lecture #2 October 2, 2002.
RTX - 51 Objectives  Resources needed  Architecture  Components of RTX-51 - Task - Memory pools - Mail box - Signals.
414/415 Review Session Emin Gun Sirer. True/False Multiprogramming offers increased response time Instructions to access a raw disk device need to be.
Operating Systems CSE 411 CPU Management Sept Lecture 10 Instructor: Bhuvan Urgaonkar.
12/22/ Thread Model for Realizing Concurrency B. Ramamurthy.
Operating Systems CMPSC 473 Signals, Introduction to mutual exclusion September 28, Lecture 9 Instructor: Bhuvan Urgaonkar.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Types of shedulars Process.
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.
Interrupts and Interrupt Handling David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Variables Bryce Boe 2012/09/05 CS32, Summer 2012 B.
Introduction to Operating Systems
Processes and threads.
Process concept.
Microprocesors, Advanced What You Need to Know About RTOSes
Simulation of Distributed Application and Protocols using TOSSIM
Chapter 6 CS 3370 – C++ Functions.
Multi-processor Scheduling
Protection and OS Structure
CS 6560: Operating Systems Design
Safe Queue? … while (next(head) == tail); // block if full
CSCS 511 Operating Systems Ch3, 4 (Part B) Further Understanding Threads Dr. Frank Li Skipped sections 3.5 & 3.6 
CS399 New Beginnings Jonathan Walpole.
Intro to Processes CSSE 332 Operating Systems
Homework Reading Machine Projects Labs
Process Synchronization and Communication
Threads and Cooperation
Interrupts and Interrupt Handling
CSCI1600: Embedded and Real Time Software
CSCI 511 Operating Systems Ch3, 4 (Part B) Further Understanding Threads Dr. Frank Li Skipped sections 3.5 & 3.6 
Concurrency: Mutual Exclusion and Synchronization
Introduction to Operating Systems
Synchronization Issues
CSE 451: Operating Systems Spring 2012 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Processes and Threads.
Thread Implementation Issues
Lecture Topics: 11/1 General Operating System Concepts Processes
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
CSE 451: Operating Systems Winter 2007 Module 2 Architectural Support for Operating Systems Brian Bershad 562 Allen Center 1.
CSE 451: Operating Systems Autumn 2003 Lecture 7 Synchronization
CSE 451: Operating Systems Autumn 2005 Lecture 7 Synchronization
CSE 451: Operating Systems Winter 2003 Lecture 7 Synchronization
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
CSE 153 Design of Operating Systems Winter 19
CSCI1600: Embedded and Real Time Software
Process/Code Migration and Cloning
Interrupts and Interrupt Handling
Embedded System Development Lecture 12 4/4/2007
Presentation transcript:

CSE 466 – Fall 2000 - Introduction - 1 Threads and Stacks Process: entire address space is private Threads: heap is common, but stack is private. What if stack wasn’t private? DATA DATA stack stack task 1 context ? task 1 context sp globals globals sp context swap OS OS regs regs CSE 466 – Fall 2000 - Introduction - 1

How TINY manages the stack worst case stack size is sum of worst case for each task, plus ISR’s. One stack/thread stack 3 stack 3 stack 3 stack 2 stack 2 stack 1 stack 2 stack 1 stack 1 sp globals sp globals sp globals OS OS OS regs regs regs CSE 466 – Fall 2000 - Introduction - 2

CSE 466 – Fall 2000 - Introduction - 3 Reentrant Stack re-stack 3 I don’t know why the compiler doesn’t use the regular stack for re-entrant function calls! Probably so that user can put re-entrant stack into external data memory this is inefficient, so limit use of re-entrant functions. re-stack 2 re-stack 1 re-sp stack 3 stack 2 stack 1 sp globals OS regs CSE 466 – Fall 2000 - Introduction - 3

Is this safe (this is about parameter passing, not stack stuff) int function average(int a, int b, int c, int d, int e, int f) { return ((a+b+c+d+e+f)/6); } void task1 _task_ 1 (void) { int a,b,c,d,e,f; … disable(); average(a,b,c,d,e,f); enable() CSE 466 – Fall 2000 - Introduction - 4

CSE 466 – Fall 2000 - Introduction - 5 Embedded System Types Data flow dominated Systems our music player a network router queues, messages, packets, routing Control Dominated Systems Software State machines, distributed state management/synchronization, e.g. power plant, autopilot, etc. CSE 466 – Fall 2000 - Introduction - 5

CSE 466 – Fall 2000 - Introduction - 6 Design Meeting Music Packet format: TNE.CHAN,(CHAN==0?OPCODE:TONE),[TONE,[TONE]] even if CHAN == 0, TNE is valid. That’s why we can’t use TNE field for OPCODE. TNE is not always 31 when CHAN==0. From last week: player has “modes”. IDLE, all commands from the pilot are in the form of ASCII characters: ‘S’ and ‘T’? STREAMING all commands come in the form of music opcodes: OPCODE == 0 means stop. This is a good choice because, if we set TNE == 0, then okay if interpreted as TONE, we will start turning off the music anyway. So: x.0,0 means stop. The player should send at least 0’s to stop the player. Is it safe to set TNE == 0? Check your software!! Stop means return to IDLE mode. OPCODE == 1 means CONTINUE, and TNE is valid OPCODE == 2 means PAUSE (was stop). Okay?? if we are paused… how do we resume? What if we want to clear the buffer and start over? do we need more commands? Do we need to define a new mode? -- PAUSED? Do we need any other opcodes? TRANSMITTING How to we enter that mode? what form do commands take? is PAUSE supported? What is the format for a complete song? What does the pilot send to the player to transmit a song? CSE 466 – Fall 2000 - Introduction - 6

Mode (State) Diagram for the Player IDLE STREAM what is the difference between IDLE and PAUSED? Modes are like states in an FSM…but they are not static. What does that mean? There is an execution sequence associated with each mode. Mode determines response to events and choice of next mode Tx PAUSED CSE 466 – Fall 2000 - Introduction - 7

An Alternative: Is this equivalent? ‘S’/clearb() ‘R’ STREAM IDLE STOP STOP ‘T’/clearb() Tx CSE 466 – Fall 2000 - Introduction - 8

Communication and Synchronization Semaphores Queues: Messages, Mailboxes, and Pipes Events Rendezvous CSE 466 – Fall 2000 - Introduction - 9