Embedded Software TI2725 C. 5. Software architectures. Koen Langendoen. Embedded Software Group
|
|
- Oliver Cummings
- 5 years ago
- Views:
Transcription
1 Embedded Software 5. Software architectures TI2725 C Koen Langendoen Embedded Software Group
2 Lec.2: Interrupts & data sharing volatile static long int lsecondstoday; void interrupt vupdatetime() ++lsecondstoday; long lgetseconds() long lreturn; lsecondstoday - previous lsecondstoday - current lreturn = lsecondstoday; while (lreturn!=lsecondstoday) lreturn = lsecondstoday; return (lreturn); lreturn - desired lreturn - bad 2
3 Exercise static int cerrors; void interrupt testint(void) ++cerrors; void test(void) ++cerrors; Does this code suffer from the data-sharing bug? 3
4 ++cerrors; Intel 80x86 INC (cerrors) RET 8051 controller nocarry: MOVE MOVX INC MOVX JNZ MOVE MOVX INC MOVX RET DPTR, #cerrors+01h A nocarry DPTR, #cerrors A,@DPTR A 4
5 Exercise static int cerrors; void interrupt testint(void) ++cerrors; int test(void) return (++cerrors); Modify this code in such a way to minimize the chance of a shared-data bug. 5
6 Outline Embedded system architectures Examples of architectures: Round Robin Round Robin with Interrupts Function Queue Real Time Operating Systems Task switching X32 6
7 Achitectures the book Problem (in the book): system response time Solution: software architectures Simple: systems with low load and few constraints Complex: systems with high load and many constraints Complex architectures introduce additional costs Additional information (compulsory reading) Edward A. Lee Embedded software, Advances in computers, vol. 56, 2002, p
8 Embedded software Just software on small computers? Well Timeliness (software takes time, physical processes) Concurrency (network of sensors and actuators, tools) Liveness (Turing machines) Interfaces (temporal properties, combination of objects) Heterogeneity (programming languages) Reactivity (data streaming processing, adaptive) 8
9 Models of computation Definition: the laws governing component interactions Recommended model supporting concurrency =? Sequential computation Von Neumann architecture Successive transformation of the system state Distributed systems system state unknown System/modules can be expressed in various languages VHDL + FPGA reconfigurable components Java portability + security C efficient execution 9
10 Examples of models Dataflow LabView; synchronous, boolean, dynamic Time triggered clock, time triggered architecture, discrete time models, SystemC Synchronous/reactive Signals can have no value at various moments Token ring protocol for media access control Discrete events Events (value, time stamp) Process networks Components = processes, asynchronous communication Publish/subscribe mechanisms Connections are event streams Others: finite state machines, rendevous, continuous time 10
11 Publish subscribe mechanisms Each component Create data from a set of data types Consume data from a set of data types Central entity Data type associations with components Buffers and distributed data to them Architectures can be dynamically changed C1 C2 C3 C4 Blackboard 11
12 Round Robin architecture void main(void) while(true) if (!! I/O device A needs attention )!! Take care of device A and handle its data if (!! I/O device B needs attention )!! Take care of device B and handle its data if (!! I/O device Z needs attention)!! Take care of device Z and handle its data 12
13 RR Examples Digital multimeter Measure: resistance, current and potential For each situation select the right scale Washing machine Airbag controller Anything that displays information 13
14 Round Robin Evaluation Simplicity! No priorities, no interrupts, no data sharing bugs Suited for systems with no latency concerns Worst response time of task code = sum of all task code Alternative design: interleaving devices Fragile design: timing in future versions? A B C D A B A C A D 14
15 Outline Embedded system architectures Architectures: Round Robin Round Robin with Interrupts Function Queue Real Time Operating Systems Task switching X32 15
16 Round Robin with Interrupts bool flaga=false, flagb=false,, flagz=false; void interrupt handlea (void)!! Take care of the I/O device A flaga = TRUE; void interrupt handlez (void)!! Take care of the I/O device Z flagz = TRUE; void main(void) while(true) if (flaga) flaga = FALSE!! Handle data from device A if (flagb) 16
17 RR ISR Characteristics Splits the work between interrupts and main Interrupts handle I/O of devices Main function deals with processing data Why use interrupts? Allow fast response time for handling I/O buffers (event based design vs. polling design) Set flags to indicate work has to be done Take advantage of the interrupt priority system Often the most appropriate architecture! 17
18 RR ISR Examples Systems with few components needing fast response time (limited processing needed) Most likely to be found in: Stopwatches Modern washing machines Coffee machines Microwave ovens Central heating units Traffic light controllers Other: data bridge devices and barcode scanners 18
19 RR ISR Evaluation Leads to a simple design (still ) Data sharing problem introduced All task codes have the same priority no long tasks!!! Worst response time = sum of all task code + ISR times Alternative designs: Move code in interrupts Interleaving devices in main() Fragile design: timing in future versions? Changing code or ISR priority for one device 19
20 Outline Architectures: Round Robin Round Robin with Interrupts Function Queue Real Time Operating Systems Task switching X32 20
21 Function Queue Architecture!! Queue of function pointers void interrupt handlea(void)!! Take care of I/O device A!! Put functiona on queue of function pointers!! ISR for devices B Z void functiona(void)!! Handle actions required by A!! Functions for devices B Z void main(void) while(true) while (!! Queue of function pointers is empty) ;!! Call first function on the queue 21
22 FQ Evaluation Splitting of responsibilities similar to RR ISR Interrupts handle I/O of devices Main function deals with processing data (via functions) Insert operation for the queue was not specified! FIFO queue leads to RR ISR Priority queue leads to task priorities FQ architecture gives the basis for non preemptive OSes Worst response time = longest task + tasks with higher priority + ISR routines 22
23 Non preemptive scheduling First in First out scheduling algorithm Shortest Job First scheduling Shortest Remaining Time Scheduling Priority scheduling Multilevel queue scheduling 23
24 Performance comparison RR RR-ISR FQS High priority Low priority everything Dev. A ISR Dev. B ISR Dev. Z ISR Task code Dev. A ISR Dev. B ISR Dev. Z ISR Task code A Task code B Task code Z 24
25 Outline Embedded system architectures Architectures: Round Robin Round Robin with Interrupts Function Queue Real Time Operating Systems Task switching X32 25
26 Real Time OS Architecture Characteristics Evolved from the FQ Architecture Contains a set of ISR (dealing with fast events from devices) Contains a set of tasks (one or more for each device) Signaling between ISRs and tasks is part of the OS No more while(1) loops in the main code > OS scheduler OS can stop a task to run another one (preemption) Terminology! 26
27 RTOS Evaluation System response is relatively stable Changing a piece of code has a reduced effect (changing lower priority tasks does not matter) RTOSes consume time themselves Synchronization mechanisms Task preemption Better response time vs. throughput Large number of RTOSes developed They come with an increasing set of tools 27
28 Task Synchronization Global data ( data sharing problem) Semaphores pend (semaphore, WAIT_FOREVER, err) block task post (semaphore) unblock task Queues, Mailboxes, and Pipes Synchronization + data communication No shared data problems unless you pass pointer to the original data in other task (cf. Fig. 7.4) Same pitfalls as semaphores (deadlock, etc.) 28
29 FIFO Queue Must be initialized #define MSGQ_SIZE 10 // max no of messages OS_EVENT* mymsgq; // msg Queue void* mymsgqdata[msgq_size]; // storage for msgs mymsgq = OSQCreate (mymsgqdata, MSGQ_SIZE); Can be used by the reading task msg = (char*) OSQPend(myMsgQ, WAIT_FOREVER, &err); Can be used by the writing task OSQPost(myMsgQ, (void*)msg); (uc/os, book pp. 333) 29
30 Mailbox Similar to queue Create, write, read But also check, destroy Some RTOS provide priorities in mailboxes But, Only 1 message (under X32) No blocking on the reader side (Queue WAIT_FOREVER timeout) void* OSMboxAccept (OSEvend* mbox); Blocking OSMboxPend ( ) 30
31 Pipe (not in X32 uc/os) Similar to queue and mailbox But, Variable length messages 31
32 Queue vs. Mailbox vs. Pipe Queues for FIFO communication Mailboxes for non blocking communication Communication according to priorities Pipes for Variable length messages Huge overhead compared with global variables! 32
33 Task Synchronization Pitfalls Typically no protection of queues, mailboxes, pipes Any task can use them any time Is the right task writing to/reading from the right communication channel? Pointer problems Passing pointers to a communication channel can create data sharing problems Type and length of messages Write an integer/read a byte! Potential memory leaks Malloc/free Space problems What if queue is full? some recovery mechanism! 33
34 Choosing the right architecture Select the simplest one! Think of the model first Writing code for ES is complicated enough Remember: customers will want more features in version 2! Use an RTOS if the system needs real time response Make use of the offered tools rather than reinventing them Your system will most likely require a hybrid architecture 34
35 Outline Embedded system architectures Architectures: Round Robin Round Robin with Interrupts Function Queue Real Time Operating Systems Task switching X32 35
36 Task switching Switching from current context (PC, stack, registers) to another Context Thread identity > multithreading Needs two constructs: Initialize a context Switch to a context Often used (standard C library): setjmp, longjmp X32 void *stack[1024] init_stack(stack, (void*)task, (void *)0); context_switch(new_context, &old_context) 36
37 Simple example X32 void **thread_main, **thread_a; void *stack_a[1024]; int main(void) thread_a = init_stack(stack_a, task_a); printf("now in thread_main\r\n"); context_switch(thread_a, &thread_main); printf("back in main thread\r\n"); void task_a(void) printf("now in thread_a\r\n"); context_switch(thread_main, &thread_a); 37
38 Time Slicing Example (1) void **thread_main, **thread_a; void *stack_a[1024]; int thread_id; void isr_timer(void) if (thread_id==0) thread_id = 1; context_switch(thread_a, &thread_main); else thread_id = 0; context_switch(thread_main, &thread_a); 38
39 Time Slicing Example (2) int main(void) thread_a = init_stack(stack_a, task_a); thread_id = 0; // now in main!! set timer to interrupt every 10ms while(true) printf("now in thread_main\r\n"); void task_a(void) while(true) printf("now in thread_a\r\n"); 39
40 Conclusions Architectures: Round Robin Round Robin with Interrupts Function Queue Real Time Operating Systems Some task synchronization mechanisms Task switching X32 Conclusion: Choose the simplest architecture for your system Keep in mind that design requirements will change 40
41 X32: Demo Demo.. (x32_projects.tgz, fqs.c, rrobin.c, rrobin2.c, rrobinisr.c, slicing.c) 41
Embedded Software TI2726 B. 4. Interrupts. Koen Langendoen. Embedded Software Group
Embedded Software 4. Interrupts TI2726 B Koen Langendoen Embedded Software Group What is an Interrupt? Asynchronous signal from hardware Synchronous signal from software Indicates the need for attention
More informationFaculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology
Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology exam Embedded Software TI2726-B January 28, 2019 13.30-15.00 This exam (6 pages) consists of 60 True/False
More informationIn4073 Embedded Real-Time Systems. Embedded Programming
In4073 Embedded Real-Time Systems Embedded Programming Embedded Software TI2726 B 2 nd year BSc course Fast forward (10:1) 2 Embedded Programming More difficult than classical programming Interaction with
More informationExam TI2720-C/TI2725-C Embedded Software
Exam TI2720-C/TI2725-C Embedded Software Wednesday April 16 2014 (18.30-21.30) Koen Langendoen In order to avoid misunderstanding on the syntactical correctness of code fragments in this examination, we
More informationIN4073 Embedded Real-Time Systems. X32 Microcontroller Soft core
IN4073 Embedded Real-Time Systems X32 Microcontroller Soft core FGPAs vs Standard Microcontrollers 8051, ARM,.., core architectures AD, Atmel, Dalas, Intel, MC (PIC), NS, ST, TI, Zilog ASICs with core,
More informationEmbedded Software TI2726 B. 7. Embedded software design. Koen Langendoen. Embedded Software Group
Embedded Software 7. Embedded software design TI2726 B Koen Langendoen Embedded Software Group Overview Timing services RTOS and ISRs Design of embedded systems General principles Timing Functionality
More informationFigure 4.4: code example. 4.3: The shared data problem. Figure 4.4: analysis. Fig 4.4: observations. Figure 4.5: Does this fix problem?
4.3: The shared data problem Inconsistency in data used by a task and updated by an ISR; arises because ISR runs at just the wrong time. Data is often shared because it is undesirable to have ISRs do all
More informationFaculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology
Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology exam Embedded Software TI2726-B January 29, 2018 13.30-15.00 This exam (6 pages) consists of 60 True/False
More informationLecture: Embedded Software Architectures
Lecture: Embedded Software Architectures Jan Vitek ECE/CS Spring 2011 Reading List 2 Mandatory Reading Chapter 5 of ECS textbook Optional Reading - N/A Software Architecture 3 A software architecture gives
More informationTasks. Task Implementation and management
Tasks Task Implementation and management Tasks Vocab Absolute time - real world time Relative time - time referenced to some event Interval - any slice of time characterized by start & end times Duration
More informationBringing Organization to our Code (the shared-data problem)
Bringing Organization to our Code (the shared-data problem) Reference: An Embedded Software Primer By David E Simon (two copies in lab for checkout) Figure 44 Classic Shared-Data Problem Static int itemperatures[2];
More informationReal-Time Programming
Real-Time Programming Week 7: Real-Time Operating Systems Instructors Tony Montiel & Ken Arnold rtp@hte.com 4/1/2003 Co Montiel 1 Objectives o Introduction to RTOS o Event Driven Systems o Synchronization
More informationJames E. Lumpp (Adapted from: An Embedded Software Primer by David E. Simon)
Embedded Software Architectures James E. Lumpp (Adapted from: An Embedded Software Primer by David E. Simon) Survey of Embedded Software Architectures 1. Round-Robin 2. Round-Robin with Interrupts 3. Function-Queue-Scheduling
More informationCS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University
CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):
More informationCOMP 3361: Operating Systems 1 Final Exam Winter 2009
COMP 3361: Operating Systems 1 Final Exam Winter 2009 Name: Instructions This is an open book exam. The exam is worth 100 points, and each question indicates how many points it is worth. Read the exam
More informationMidterm Exam. October 20th, Thursday NSC
CSE 421/521 - Operating Systems Fall 2011 Lecture - XIV Midterm Review Tevfik Koşar University at Buffalo October 18 th, 2011 1 Midterm Exam October 20th, Thursday 9:30am-10:50am @215 NSC Chapters included
More informationMicrium µc/os II RTOS Introduction EE J. E. Lumpp
Micrium µc/os II RTOS Introduction (by Jean Labrosse) EE599 001 Fall 2012 J. E. Lumpp μc/os II μc/os II is a highly portable, ROMable, very scalable, preemptive real time, deterministic, multitasking kernel
More informationEmbedded Operating Systems
Embedded Operating Systems Embedded Software Design 熊博安國立中正大學資訊工程研究所 pahsiung@cs.ccu.edu.tw Textbook: Programming Embedded Systems in C and C++, Michael Barr, O Reilly 1 Contents History and Purpose A
More informationUNIT -3 PROCESS AND OPERATING SYSTEMS 2marks 1. Define Process? Process is a computational unit that processes on a CPU under the control of a scheduling kernel of an OS. It has a process structure, called
More informationWhat s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable
What s An OS? Provides environment for executing programs Process abstraction for multitasking/concurrency scheduling Hardware abstraction layer (device drivers) File systems Communication Do we need an
More informationLecture 17: Threads and Scheduling. Thursday, 05 Nov 2009
CS211: Programming and Operating Systems Lecture 17: Threads and Scheduling Thursday, 05 Nov 2009 CS211 Lecture 17: Threads and Scheduling 1/22 Today 1 Introduction to threads Advantages of threads 2 User
More informationReal Time Operating System: Inter-Process Communication (IPC)
ECE3411 Fall 2015 Lecture 6c. Real Time Operating System: Inter-Process Communication (IPC) Marten van Dijk, Syed Kamran Haider Department of Electrical & Computer Engineering University of Connecticut
More informationIntertask Communication
Inter-task Communication 04/27/01 Lecture # 29 16.070 Task state diagram (single processor) Intertask Communication Global variables Buffering data Critical regions Synchronization Semaphores Mailboxes
More informationEmbedded Software TI2725-C. 8. Debugging techniques. Koen Langendoen. Embedded Software Group
Embedded Software 8. Debugging techniques TI2725-C Koen Langendoen Embedded Software Group Grace Hopper 1947 2 Overview Debugging techniques Debugging a distributed system Lab information Preparation for
More informationLesson 5: Software for embedding in System- Part 2
Lesson 5: Software for embedding in System- Part 2 Device drivers, Device manager, OS, RTOS and Software tools 1 Outline Device drivers Device manager Multitasking using an operating system (OS) and Real
More informationPutting it All Together
EE445M/EE360L.12 Embedded and Real-Time Systems/ Real-Time Operating Systems : Commercial RTOS, Final Exam, Review 1 Putting it All Together Micrium μcos-ii Reference: www.micrium.com Application Note
More informationA Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria
A Predictable RTOS Mantis Cheng Department of Computer Science University of Victoria Outline I. Analysis of Timeliness Requirements II. Analysis of IO Requirements III. Time in Scheduling IV. IO in Scheduling
More informationIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systems GPOS vs RTOS General purpose operating systems Real-time operating systems GPOS vs RTOS: Similarities Multitasking Resource management OS services to applications
More informationPreemptive Scheduling
Preemptive Scheduling Lecture 18 18-1 Big Picture Methods learned so far We ve been using a foreground/background system Interrupt service routines run in foreground Task code runs in background Limitations
More informationMidterm Exam Amy Murphy 6 March 2002
University of Rochester Midterm Exam Amy Murphy 6 March 2002 Computer Systems (CSC2/456) Read before beginning: Please write clearly. Illegible answers cannot be graded. Be sure to identify all of your
More informationSystemy RT i embedded Wykład 11 Systemy RTOS
Systemy RT i embedded Wykład 11 Systemy RTOS Wrocław 2013 Plan Introduction Tasks Queues Interrupts Resources Memory management Multiprocessor operation Introduction What s an Operating System? Provides
More informationEmbedded Systems. 6. Real-Time Operating Systems
Embedded Systems 6. Real-Time Operating Systems Lothar Thiele 6-1 Contents of Course 1. Embedded Systems Introduction 2. Software Introduction 7. System Components 10. Models 3. Real-Time Models 4. Periodic/Aperiodic
More informationLecture 3: Concurrency & Tasking
Lecture 3: Concurrency & Tasking 1 Real time systems interact asynchronously with external entities and must cope with multiple threads of control and react to events - the executing programs need to share
More informationCMPS 111 Spring 2003 Midterm Exam May 8, Name: ID:
CMPS 111 Spring 2003 Midterm Exam May 8, 2003 Name: ID: This is a closed note, closed book exam. There are 20 multiple choice questions and 5 short answer questions. Plan your time accordingly. Part I:
More informationDEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year and Semester : II / IV Subject Code : CS6401 Subject Name : Operating System Degree and Branch : B.E CSE UNIT I 1. Define system process 2. What is an
More informationHardware/Software Codesign of Schedulers for Real Time Systems
Hardware/Software Codesign of Schedulers for Real Time Systems Jorge Ortiz Committee David Andrews, Chair Douglas Niehaus Perry Alexander Presentation Outline Background Prior work in hybrid co-design
More informationOperating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski
Operating Systems Design Fall 2010 Exam 1 Review Paul Krzyzanowski pxk@cs.rutgers.edu 1 Question 1 To a programmer, a system call looks just like a function call. Explain the difference in the underlying
More informationAC OB S. Multi-threaded FW framework (OS) for embedded ARM systems Torsten Jaekel, June 2014
AC OB S Multi-threaded FW framework (OS) for embedded ARM systems Torsten Jaekel, June 2014 ACOBS ACtive OBject (operating) System Simplified FW System for Multi-Threading on ARM embedded systems ACOBS
More informationCS/ECE 6780/5780. Al Davis
CS/ECE 6780/5780 Al Davis Today s topics: Threads basic control block scheduling semaphores Midterm (next Tues) covers Chaps & Labs 1-5 sample on the web 1 CS 5780 Lab 5 Logistics Problem not enough interrupt
More informationPage 1. Lab 5 Logistics. Implicit Threads. Explicit Thread Semantics. Problem not enough interrupt pins CS/ECE 6780/5780. Al Davis
Lab 5 Logistics CS/ECE 6780/5780 Al Davis Today s topics: Threads basic control block scheduling semaphores Midterm (next Tues) covers Chaps & Labs 1-5 sample on the web Problem not enough interrupt pins
More informationInterrupts and Time. Real-Time Systems, Lecture 5. Martina Maggio 28 January Lund University, Department of Automatic Control
Interrupts and Time Real-Time Systems, Lecture 5 Martina Maggio 28 January 2016 Lund University, Department of Automatic Control Content [Real-Time Control System: Chapter 5] 1. Interrupts 2. Clock Interrupts
More informationConcurrent Programming
Concurrent Programming Real-Time Systems, Lecture 2 Martina Maggio 19 January 2017 Lund University, Department of Automatic Control www.control.lth.se/course/frtn01 Content [Real-Time Control System: Chapter
More informationConcurrent Programming. Implementation Alternatives. Content. Real-Time Systems, Lecture 2. Historical Implementation Alternatives.
Content Concurrent Programming Real-Time Systems, Lecture 2 [Real-Time Control System: Chapter 3] 1. Implementation Alternatives Martina Maggio 19 January 2017 Lund University, Department of Automatic
More informationMain Points of the Computer Organization and System Software Module
Main Points of the Computer Organization and System Software Module You can find below the topics we have covered during the COSS module. Reading the relevant parts of the textbooks is essential for a
More informationREAL TIME OPERATING SYSTEM PROGRAMMING-I: VxWorks
REAL TIME OPERATING SYSTEM PROGRAMMING-I: I: µc/os-ii and VxWorks Lesson-1: RTOSes 1 1. Kernel of an RTOS 2 Kernel of an RTOS Used for real-time programming features to meet hard and soft real time constraints,
More informationEmbedded Software Programming
Embedded Software Programming Computer Science & Engineering Department Arizona State University Tempe, AZ 85287 Dr. Yann-Hang Lee yhlee@asu.edu (480) 727-7507 Event and Time-Driven Threads taskspawn (name,
More informationSE300 SWE Practices. Lecture 10 Introduction to Event- Driven Architectures. Tuesday, March 17, Sam Siewert
SE300 SWE Practices Lecture 10 Introduction to Event- Driven Architectures Tuesday, March 17, 2015 Sam Siewert Copyright {c} 2014 by the McGraw-Hill Companies, Inc. All rights Reserved. Four Common Types
More informationReference Model and Scheduling Policies for Real-Time Systems
ESG Seminar p.1/42 Reference Model and Scheduling Policies for Real-Time Systems Mayank Agarwal and Ankit Mathur Dept. of Computer Science and Engineering, Indian Institute of Technology Delhi ESG Seminar
More informationECE 477 Digital Systems Senior Design Project. Module 10 Embedded Software Development
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 -
More informationProcess Coordination and Shared Data
Process Coordination and Shared Data Lecture 19 In These Notes... Sharing data safely When multiple threads/processes interact in a system, new species of bugs arise 1. Compiler tries to save time by not
More informationEmbedded Systems Programming
Embedded Systems Programming Overrun Management (Module 23) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Imprecise computation Overrun Management trades off precision
More information2. Introduction to Software for Embedded Systems
2. Introduction to Software for Embedded Systems Lothar Thiele ETH Zurich, Switzerland 2-1 Contents of Lectures (Lothar Thiele) 1. Introduction to Embedded System Design 2. Software for Embedded Systems
More informationThe control of I/O devices is a major concern for OS designers
Lecture Overview I/O devices I/O hardware Interrupts Direct memory access Device dimensions Device drivers Kernel I/O subsystem Operating Systems - June 26, 2001 I/O Device Issues The control of I/O devices
More informationProcesses. CS 475, Spring 2018 Concurrent & Distributed Systems
Processes CS 475, Spring 2018 Concurrent & Distributed Systems Review: Abstractions 2 Review: Concurrency & Parallelism 4 different things: T1 T2 T3 T4 Concurrency: (1 processor) Time T1 T2 T3 T4 T1 T1
More informationOperating System Concepts Ch. 5: Scheduling
Operating System Concepts Ch. 5: Scheduling Silberschatz, Galvin & Gagne Scheduling In a multi-programmed system, multiple processes may be loaded into memory at the same time. We need a procedure, or
More informationSMD149 - Operating Systems
SMD149 - Operating Systems Roland Parviainen November 3, 2005 1 / 45 Outline Overview 2 / 45 Process (tasks) are necessary for concurrency Instance of a program in execution Next invocation of the program
More informationSuggested Solutions (Midterm Exam October 27, 2005)
Suggested Solutions (Midterm Exam October 27, 2005) 1 Short Questions (4 points) Answer the following questions (True or False). Use exactly one sentence to describe why you choose your answer. Without
More informationInterrupts and Time. Interrupts. Content. Real-Time Systems, Lecture 5. External Communication. Interrupts. Interrupts
Content Interrupts and Time Real-Time Systems, Lecture 5 [Real-Time Control System: Chapter 5] 1. Interrupts 2. Clock Interrupts Martina Maggio 25 January 2017 Lund University, Department of Automatic
More informationChapter 5: CPU Scheduling
Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm Evaluation Chapter 5: CPU Scheduling
More informationUnit 3 : Process Management
Unit : Process Management Processes are the most widely used units of computation in programming and systems, although object and threads are becoming more prominent in contemporary systems. Process management
More informationCS 4410 Operating Systems. Review 1. Summer 2016 Cornell University
CS 4410 Operating Systems Review 1 Summer 2016 Cornell University 1 A modern computer system keyboard disks mouse printer monitor CPU Disk controller USB controller Graphics adapter memory OS device driver
More informationLecture 28 Multicore, Multithread" Suggested reading:" (H&P Chapter 7.4)"
Lecture 28 Multicore, Multithread" Suggested reading:" (H&P Chapter 7.4)" 1" Processor components" Multicore processors and programming" Processor comparison" CSE 30321 - Lecture 01 - vs." Goal: Explain
More informationINFO-0064 Embedded systems
16 October 2015 INFO-0064 Embedded systems Exercise session 4 Software architectures Kevin Hogan kevin.hogan@ulg.ac.be Information Slides and code exemples available on: http://www.montefiore.ulg.ac.be/~khogan/
More informationOperating System Review Part
Operating System Review Part CMSC 602 Operating Systems Ju Wang, 2003 Fall Virginia Commonwealth University Review Outline Definition Memory Management Objective Paging Scheme Virtual Memory System and
More informationCMPS 111 Spring 2013 Prof. Scott A. Brandt Midterm Examination May 6, Name: ID:
CMPS 111 Spring 2013 Prof. Scott A. Brandt Midterm Examination May 6, 2013 Name: ID: This is a closed note, closed book exam. There are 23 multiple choice questions, 6 short answer questions. Plan your
More informationCS 326: Operating Systems. CPU Scheduling. Lecture 6
CS 326: Operating Systems CPU Scheduling Lecture 6 Today s Schedule Agenda? Context Switches and Interrupts Basic Scheduling Algorithms Scheduling with I/O Symmetric multiprocessing 2/7/18 CS 326: Operating
More informationAsynchronous Events on Linux
Asynchronous Events on Linux Frederic.Rossi@Ericsson.CA Open System Lab Systems Research June 25, 2002 Ericsson Research Canada Introduction Linux performs well as a general purpose OS but doesn t satisfy
More informationProcess Description and Control
Process Description and Control 1 Process:the concept Process = a program in execution Example processes: OS kernel OS shell Program executing after compilation www-browser Process management by OS : Allocate
More informationCSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable)
CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable) Past & Present Have looked at two constraints: Mutual exclusion constraint between two events is a requirement that
More informationECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Processes and threads
ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective Part I: Operating system overview: Processes and threads 1 Overview Process concept Process scheduling Thread
More informationSIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE) UNIT I OPERATING SYSTEMS
UNIT I OPERATING SYSTEMS 1. Write a short note about [6+6M] a) Time services b) Scheduling Mechanisms 2. a) Explain the overview of Threads and Tasks. [6M] b) Draw the structure of Micro kernel and explain
More informationCSE 120 Principles of Computer Operating Systems Fall Quarter, 2001 Midterm Exam. Instructor: Geoffrey M. Voelker
CSE 120 Principles of Computer Operating Systems Fall Quarter, 2001 Midterm Exam Instructor: Geoffrey M. Voelker Name Student ID Attention: This exam has five questions worth a total of 55 points. You
More information* What are the different states for a task in an OS?
* Kernel, Services, Libraries, Application: define the 4 terms, and their roles. The kernel is a computer program that manages input/output requests from software, and translates them into data processing
More informationShort Term Courses (Including Project Work)
Short Term Courses (Including Project Work) Courses: 1.) Microcontrollers and Embedded C Programming (8051, PIC & ARM, includes a project on Robotics) 2.) DSP (Code Composer Studio & MATLAB, includes Embedded
More informationProcess Coordination and Shared Data
Process Coordination and Shared Data Lecture 26 In These Notes... Sharing data safely When multiple threads/processes interact in a system, new species of bugs arise 1. Compiler tries to save time by not
More informationALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far.
Midterm Exam Reviews ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far. Particular attentions on the following: System call, system kernel Thread/process, thread vs process
More informationCS370 Operating Systems Midterm Review
CS370 Operating Systems Midterm Review Yashwant K Malaiya Fall 2015 Slides based on Text by Silberschatz, Galvin, Gagne 1 1 What is an Operating System? An OS is a program that acts an intermediary between
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance Objectives Explore the structure of an operating
More informationOperating Systems Comprehensive Exam. Spring Student ID # 3/16/2006
Operating Systems Comprehensive Exam Spring 2006 Student ID # 3/16/2006 You must complete all of part I (60%) You must complete two of the three sections in part II (20% each) In Part I, circle or select
More informationMARUTHI SCHOOL OF BANKING (MSB)
MARUTHI SCHOOL OF BANKING (MSB) SO IT - OPERATING SYSTEM(2017) 1. is mainly responsible for allocating the resources as per process requirement? 1.RAM 2.Compiler 3.Operating Systems 4.Software 2.Which
More informationComponent-Based Design of Embedded Control Systems
Component-Based Design of Embedded Control Systems Edward A. Lee & Jie Liu UC Berkeley with thanks to the entire Berkeley and Boeing SEC teams SEC PI Meeting Annapolis, May 8-9, 2001 Precise Mode Change
More informationThe Real Time Thing. What the hack is real time and what to do with it. 22C3 30. December Erwin Erkinger e.at
The Real Time Thing What the hack is real time and what to do with it 22C3 30. December 2005 Erwin Erkinger vindaome@p e.at Content Part 1: Introduction the vocabulary and the concepts Part 2: Practical
More informationIn examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured
System Performance Analysis Introduction Performance Means many things to many people Important in any design Critical in real time systems 1 ns can mean the difference between system Doing job expected
More informationCS3733: Operating Systems
CS3733: Operating Systems Topics: Process (CPU) Scheduling (SGG 5.1-5.3, 6.7 and web notes) Instructor: Dr. Dakai Zhu 1 Updates and Q&A Homework-02: late submission allowed until Friday!! Submit on Blackboard
More informationLab 8 Real-time OS - 1
Lab 8-1 Speaker: Hao-Yun Chin Advisor: Prof. Tian-Sheuan Chang Apr 27, 2004 Outline Introduction to Real-time Operation System (RTOS) Introduction to C/OS-II Features Task & task scheduling Start C/OS-II
More informationEmbedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Embedded Systems: OS Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Standalone Applications Often no OS involved One large loop Microcontroller-based
More informationOperating Systems (Classroom Practice Booklet Solutions)
Operating Systems (Classroom Practice Booklet Solutions) 1. Process Management I 1. Ans: (c) 2. Ans: (c) 3. Ans: (a) Sol: Software Interrupt is generated as a result of execution of a privileged instruction.
More informationPlease do not handin a.doc file, a.zip file, a.tar file, or anything else
Please do not handin a.doc file, a.zip file, a.tar file, or anything else Hand in the files that are requested and only the files that are requested No executables! Lecture on Thurs is canceled Shuying
More informationAdvanced Operating Systems (CS 202) Scheduling (1)
Advanced Operating Systems (CS 202) Scheduling (1) Today: CPU Scheduling 2 The Process The process is the OS abstraction for execution It is the unit of execution It is the unit of scheduling It is the
More informationCS 160: Interactive Programming
CS 160: Interactive Programming Professor John Canny 3/8/2006 1 Outline Callbacks and Delegates Multi-threaded programming Model-view controller 3/8/2006 2 Callbacks Your code Myclass data method1 method2
More informationComputer Systems A Programmer s Perspective 1 (Beta Draft)
Computer Systems A Programmer s Perspective 1 (Beta Draft) Randal E. Bryant David R. O Hallaron August 1, 2001 1 Copyright c 2001, R. E. Bryant, D. R. O Hallaron. All rights reserved. 2 Contents Preface
More informationby I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS
by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests
More informationModule 12: I/O Systems
Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance 12.1 I/O Hardware Incredible variety of I/O devices Common
More informationLecture 2 Process Management
Lecture 2 Process Management Process Concept An operating system executes a variety of programs: Batch system jobs Time-shared systems user programs or tasks The terms job and process may be interchangeable
More informationOperating System. Chapter 4. Threads. Lynn Choi School of Electrical Engineering
Operating System Chapter 4. Threads Lynn Choi School of Electrical Engineering Process Characteristics Resource ownership Includes a virtual address space (process image) Ownership of resources including
More informationImplementation of Process Networks in Java
Implementation of Process Networks in Java Richard S, Stevens 1, Marlene Wan, Peggy Laramie, Thomas M. Parks, Edward A. Lee DRAFT: 10 July 1997 Abstract A process network, as described by G. Kahn, is a
More informationAC59/AT59/AC110/AT110 OPERATING SYSTEMS & SYSTEMS SOFTWARE DEC 2015
Q.2 a. Explain the following systems: (9) i. Batch processing systems ii. Time sharing systems iii. Real-time operating systems b. Draw the process state diagram. (3) c. What resources are used when a
More informationIntroduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras
Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Week 05 Lecture 18 CPU Scheduling Hello. In this lecture, we
More informationCODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document C28X CCS
CODE TIME TECHNOLOGIES Abassi RTOS Porting Document C28X CCS Copyright Information This document is copyright Code Time Technologies Inc. 2012-2013. All rights reserved. No part of this document may be
More informationAN 831: Intel FPGA SDK for OpenCL
AN 831: Intel FPGA SDK for OpenCL Host Pipelined Multithread Subscribe Send Feedback Latest document on the web: PDF HTML Contents Contents 1 Intel FPGA SDK for OpenCL Host Pipelined Multithread...3 1.1
More information