Laboratório de Mecatrônica EESC/USP SEM VxWorks/Workbench. Jean M.S.C. Yabarrena 30/04/10
|
|
- Diana Jackson
- 6 years ago
- Views:
Transcription
1 Laboratório de Mecatrônica EESC/USP SEM 0544 VxWorks/Workbench Jean M.S.C. Yabarrena 30/04/10
2 Motivação Como interagir com o VxWorks e como utilizar seus recursos
3 Objetivos Utilizar uma utilidade que utiliza o clock para medir o tempo de execução de uma tarefa. Entender como trabalha o VxWorks com múltlipas tarefas. Entender e implementar uma aplicação com semáforos. Entender e implementar uma aplicação que envia e receba mensagens.
4 Wind Microkernel
5 Memory Protection Real-Time Processes (RTPs)
6 Arquivos e tipos de Projetos 1. Project Files in VxWorks Image Projects (VIP) vxworks(default) vxworks.bin (default) vxworks.hex (default) 2. Project Files in VxWorks Source Build Projects 3. Project Files in Downloadable Kernel Module Projects (DKM) TargetName.out TargetName_partialImage.o
7 Arquivos e tipos de Projetos 4. Project Files in Real-Time Process Projects (RTP) TargetName.vxe (BuildSpec[- debug]) fully linked VxWorks executable. Librarian build tool 5. Project Files in Shared Library Projects TargetName.so The shared library used by the VxWorks executable
8 VxWorks content
9 Tempo de execução # 1 -DKM
10 Tempo # 1.5 DKM Baseado no exemplo Embry-Riddle Real-Time Laboratory #include "vxworks.h" /* Always include this as the first thing in every program */ #include "timexlib.h" #include "stdio.h" #define ITERATIONS 500 /* 0x1F4 */ int printit(void); void timing() /* Function to perform the timing */ { FUNCPTR function_ptr = printit; /* a pointer to the function "printit" */ timex(function_ptr,null,null,null,null,null,null,null,null); /* Timing the "print" function */ } int printit(void) /* Function being timed */ { int i; for(i=0; i < ITERATIONS; i++) /* Printing the task id number and the increment variable "i" */ printf("sou a tarefa %x e execução No = %d\n",taskidself(),i); return 0; } 30/04/2010 Jean M. S. C. Yabarrena
11 Tempo # 2 -DKM
12 Tempo # 3 -DKM
13 Tempo # 4 DKM 200
14 Tempo # 6 DKM timing
15 Tempo # 7 DKM timexn
16 Multitarefa #1 Comandos do shell importantes lkup ["substr"] List symbols in system symbol table lkaddr address List symbol table entries near address checkstack [task] List task stack sizes and usage i [task] Summary of tasks' TCBs ti task Complete info on TCB for task td task Delete a task devs List devices ld [syms[,noabort][,"name"]] Load stdin, or file, into memory (syms = add symbols to table: h [n] Print (or set) shell history 30/04/2010 Jean M. S. C. Yabarrena
17 Multitarefa #2 sysclkrateget ( ) value = 60 = 0x3c = '<
18 Multitarefa #3 A task's context includes: a thread of execution; that is, the task's program counter the tasks' virtual memory context (if process support is included) the CPU registers and (optionally) coprocessor registers stacks for dynamic variables and function calls I/O assignments for standard input, output, and error a delay timer a time-slice timer kernel control structures signal handlers task private environment (for environment variables) error status (errno) debugging and performance monitoring values 30/04/2010 Jean M. S. C. Yabarrena
19 Multitarefa #4 #include "vxworks.h" #include "tasklib.h" #include "stdio.h" #define ITERATIONS 10 #define LOOP /* 20 10^6*/ void print(void); 30/04/2010 Jean M. S. C. Yabarrena
20 Multitarefa #5 gerar_tarefas() /* Rotina que executa o spawning */ { int i, taskid; for(i=0; i < ITERATIONS; i++) /* Cria 10 tarefas */ taskid = taskspawn("tprint",70,0x100,2000,(funcptr)print,0,0,0,0,0,0,0,0,0,0); } void print(void) /* Subroutine to be spawned */ { int i; /*nanosleep(1000);*/ taskdelay(300); /*Bloqueamos a tarefa por 5 segundos*/ for(i=0; i < LOOP; i++); printf("saindo da tarefa %x\n",taskidself());/* Impressão task Id */ } 30/04/2010 Jean M. S. C. Yabarrena
21 Multitarefa #5.5
22 Multitarefa #6
23 Multitarefa #7
24 Multitarefa #8
25 Semáforos #1
26 Semáforos #1
27 Semáforos #1 #include"vxworks.h" #include"tasklib.h" #include"semlib.h" #include"stdio.h" /* function prototypes */ void taskone(void); void tasktwo(void); /* globals */ #define ITER 10 SEM_ID sembinary; int global = 0;
28 Semáforos #2 { void binary(void) int taskidone, taskidtwo; /* cria um semáforo baseado em FIFO */ sembinary = sembcreate(sem_q_fifo, SEM_FULL); /* Nota 1: Bloqueio o semáforo */ semtake(sembinary,wait_forever); /* spawn as 2 tarefas */ taskidone = taskspawn("t1",90,0x100,2000,(funcptr)taskone,0,0,0,0,0,0,0,0,0,0); taskidtwo = taskspawn("t2",89,0x100,2000,(funcptr)tasktwo,0,0,0,0,0,0,0,0,0,0); }
29 Semáforos #2.5 { void taskone(void) int i; for (i=0; i < ITER; i++) { semtake(sembinary,wait_forever); /* espera indefinidamente pelo semáforo */ printf("sou a taskone, o valor do recurso compartilhado = %d\n", ++global); semgive(sembinary); /* entrega semáforo */ } }
30 Semáforos #2.7 void tasktwo(void) { int i; semgive(sembinary); /* Nota 2: O escalonador entrega o semáforo */ for (i=0; i < ITER; i++) { semtake(sembinary,wait_forever); /* espera indefinidamente pelo semáforo */ printf("sou a tasktwo, o valor do recurso compartilhado = %d\n",--global); semgive(sembinary); /* entrega semáforo */ } }
31 Semáforos #3
32 Semáforos #3
33 Filas de mensagens Modern real-time applications are constructed as a set of independentbut cooperating tasks. While semaphores provide a high-speed mechanism for the synchronization and interlocking of tasks, often a higher-level mechanismis necessary to allow cooperating tasks to communicate with each other. In VxWorks, the primary intertask communication mechanism within a single CPU is message queues.
34 Filas de mensagens
35 Filas de mensagens #include "vxworks.h" #include "msgqlib.h" /* function prototypes */ void taskone_q(void); void tasktwo_q(void); /* defines */ #define MAX_MESSAGES 100 #define MAX_MESSAGE_LENGTH 50 /* globals */ MSG_Q_ID mesgqueueid; /* Identificador do recurso compartilhado */
36 Filas de mensagens void message(void) /* Cria uma fila de mensagens e 2 tarefas */ { int taskidone, taskidtwo; /* cria fila de mensagens */ if ((mesgqueueid = msgqcreate(max_messages,max_message_length,msg_q_fifo)) == NULL) printf("msgqcreate in failed\n"); /* spawn 2 tarefas que utilizarão a fila */ if((taskidone = taskspawn("t1_q",90,0x100,2000,(funcptr)taskone_q,0,0,0,0,0,0,0, 0,0,0)) == ERROR) printf("taskspawn taskone failed\n"); if((taskidtwo = taskspawn("t2_q",90,0x100,2000,(funcptr)tasktwo_q,0,0,0,0,0,0,0, 0,0,0)) == ERROR) printf("taskspawn tasktwo failed\n"); }
37 Filas de mensagens void taskone_q(void) /* tarefa escreve na fila de mensagems */ { char message[] = "Recibi a mensagem da taskone"; /* envia mensagem */ if((msgqsend(mesgqueueid,message,max_message_length, WAIT_FOREVER, MSG_PRI_NORMAL)) == ERROR) printf("msgqsend in taskone failed\n"); } void tasktwo_q(void) /* tarefa lê a fila de mensagens */ { char msgbuf[max_message_length]; /* receve mensagem */ if(msgqreceive(mesgqueueid,msgbuf,max_message_length, WAIT_FOREVER) == ERROR) printf("msgqreceive in tasktwo failed\n"); else printf("%s\n",msgbuf); msgqdelete(mesgqueueid); /* apago a fila */ }
38 Multitarefa #9
39 Multitarefa #10
40 Multitarefa #11
Experiment #3 Semaphores
Experiment #3 Semaphores Introduction Semaphores permit multitasking applications to coordinate their activities. The most obvious way for tasks to communicate is via various shared data structures. Because
More informationAppendix Example Code
Appendix A Example Code Tornado Training Workshop Copyright A-1 ynchronization essage Queues: Data Collection essage Queues: Client - Server xception Handling elect ( ) DP CP emo code Synchronization Solution
More informationLecture 6: Real-Time Timing + Real-Time Objects
Lecture 6: Real-Time Timing + Real-Time Objects 1 Lecture: RT Timing (30) Lab Exercise: Watchdog + auxiliary clock timers (25) Lecture: RT Objects-Events (15) Lab Exercise: Events (30) Project Work (rest
More informationExperiment #7 Priority Inversion
Experiment #7 Priority Inversion Introduction Priority inversion occurs when a higher-priority task is forced to wait an indefinite period for the completion of a lower priority task. For example, priohigh,
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 informationLab Manual for VxWorks
Lab Manual for VxWorks Session 1: Introduction to Tornado tool 1] A program to display hello world on the console window. Also find the size of the structure with a char an as the data member of the structure.
More informationSemaphores. Chapter. verview inary Semaphores for Task Synchronization utex Semaphores to Solve Mutual Exclusion Problems
Chapter 7 Semaphores Tornado Training Workshop Copyright 7-1 verview inary Semaphores for Task Synchronization utex Semaphores to Solve Mutual Exclusion Problems 7.1 Overview Semaphores Binary Semaphores
More informationProcesses. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware
es CS 217 Operating System Supports virtual machines Promises each process the illusion of having whole machine to itself Provides services: Protection Scheduling Memory management File systems Synchronization
More informationEECS 482 Introduction to Operating Systems
EECS 482 Introduction to Operating Systems Winter 2018 Baris Kasikci Slides by: Harsha V. Madhyastha Use of CVs in Project 1 Incorrect use of condition variables: while (cond) { } cv.signal() cv.wait()
More informationCPSC/ECE 3220 Fall 2017 Exam Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts.
CPSC/ECE 3220 Fall 2017 Exam 1 Name: 1. Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts.) Referee / Illusionist / Glue. Circle only one of R, I, or G.
More informationChapter 3 Process Description and Control
Operating Systems: Internals and Design Principles Chapter 3 Process Description and Control Seventh Edition By William Stallings Process Control Block Structure of Process Images in Virtual Memory How
More informationRoadmap. Tevfik Ko!ar. CSC Operating Systems Fall Lecture - III Processes. Louisiana State University. Processes. September 1 st, 2009
CSC 4103 - Operating Systems Fall 2009 Lecture - III Processes Tevfik Ko!ar Louisiana State University September 1 st, 2009 1 Roadmap Processes Basic Concepts Process Creation Process Termination Context
More informationCS510 Operating System Foundations. Jonathan Walpole
CS510 Operating System Foundations Jonathan Walpole Threads & Concurrency 2 Why Use Threads? Utilize multiple CPU s concurrently Low cost communication via shared memory Overlap computation and blocking
More informationRealtime Linux (RTAI) Multi-Tasking
Realtime Linux (RTAI) Multi-Tasking Introduction Modern real-time systems are based on the complementary concepts of multitasking and intertask communications. A multitasking environment allows real-time
More informationSistemas Distribuídos com Redes de Sensores. Noemi Rodriguez
2012 TinyOS SO para motes com recursos limitados aplicação única bateria deve ter vida longa memória muito limitada Exemplo: micaz Atmel ATmega128: microcontrolador de 8 bits 4K memória RAM 128K memória
More informationIntrodução e boas práticas em UX Design (Portuguese Edition)
Introdução e boas práticas em UX Design (Portuguese Edition) By Fabricio Teixeira Introdução e boas práticas em UX Design (Portuguese Edition) By Fabricio Teixeira Cada vez mais o desenvolvimento do front-end
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 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 information6/20/2018. Lecture 5: Real Time Messages
Lecture 5: Real Time Messages 1 Quiz (10 min) Groups Presentations (45) Lecture: RT Messages (45) Lab exercise Messages and Pipes (60) Exam 1: Discussion 2 1 3 The message-driven approach is used both
More informationCS333 Intro to Operating Systems. Jonathan Walpole
CS333 Intro to Operating Systems Jonathan Walpole Threads & Concurrency 2 Threads Processes have the following components: - an address space - a collection of operating system state - a CPU context or
More informationSpring CS 170 Exercise Set 1 (Updated with Part III)
Spring 2015. CS 170 Exercise Set 1 (Updated with Part III) Due on May 5 Tuesday 12:30pm. Submit to the CS170 homework box or bring to the classroom. Additional problems will be added as we cover more topics
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 informationEECS 482 Introduction to Operating Systems
EECS 482 Introduction to Operating Systems Winter 2018 Harsha V. Madhyastha Monitors vs. Semaphores Monitors: Custom user-defined conditions Developer must control access to variables Semaphores: Access
More informationThread and Synchronization
Thread and Synchronization pthread Programming (Module 19) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Real-time Systems Lab, Computer Science and Engineering, ASU Pthread
More informationFall 2015 COMP Operating Systems. Lab #3
Fall 2015 COMP 3511 Operating Systems Lab #3 Outline n Operating System Debugging, Generation and System Boot n Review Questions n Process Control n UNIX fork() and Examples on fork() n exec family: execute
More informationCS510 Operating System Foundations. Jonathan Walpole
CS510 Operating System Foundations Jonathan Walpole The Process Concept 2 The Process Concept Process a program in execution Program - description of how to perform an activity instructions and static
More informationComputer Systems Lecture 9
Computer Systems Lecture 9 CPU Registers in x86 CPU status flags EFLAG: The Flag register holds the CPU status flags The status flags are separate bits in EFLAG where information on important conditions
More information! The Process Control Block (PCB) " is included in the context,
CSE 421/521 - Operating Systems Fall 2012 Lecture - III Processes Tevfik Koşar Roadmap Processes Basic Concepts Process Creation Process Termination Context Switching Process Queues Process Scheduling
More informationFYS4220 / RT-lab no SIGNALS
FYS4220 / 9220 12 Oct 2011 /TBS RT-lab no 2-2011 SIGNALS 1 The VxWorks signal IPC facility VxWorks provides a software signal facility. Signals asynchronously alter the control flow of a task or process.
More informationQ1. State True/false with jusification if the answer is false:
Paper Title: Operating System (IOPS332C) Quiz 1 Time : 1 hr Q1. State True/false with jusification if the answer is false: a. Multiprogramming (having more programs in RAM simultaneously) decreases total
More informationCS 475. Process = Address space + one thread of control Concurrent program = multiple threads of control
Processes & Threads Concurrent Programs Process = Address space + one thread of control Concurrent program = multiple threads of control Multiple single-threaded processes Multi-threaded process 2 1 Concurrent
More informationHigh Performance Computing Course Notes Shared Memory Parallel Programming
High Performance Computing Course Notes 2009-2010 2010 Shared Memory Parallel Programming Techniques Multiprocessing User space multithreading Operating system-supported (or kernel) multithreading Distributed
More informationEmbedded Systems. 5. Operating Systems. Lothar Thiele. Computer Engineering and Networks Laboratory
Embedded Systems 5. Operating Systems Lothar Thiele Computer Engineering and Networks Laboratory Embedded Operating Systems 5 2 Embedded Operating System (OS) Why an operating system (OS) at all? Same
More informationComputer Systems Assignment 2: Fork and Threads Package
Autumn Term 2018 Distributed Computing Computer Systems Assignment 2: Fork and Threads Package Assigned on: October 5, 2018 Due by: October 12, 2018 1 Understanding fork() and exec() Creating new processes
More informationRTOS Real T i Time me Operating System System Concepts Part 2
RTOS Real Time Operating System Concepts Part 2 Real time System Pitfalls - 4: The Ariane 5 satelite launch rocket Rocket self destructed in 4 June -1996. Exactly after 40 second of lift off at an attitude
More informationProf. Tiago G. S. Carneiro DECOM - UFOP. Threads em Qt. Prof. Tiago Garcia de Senna Carneiro
Threads em Qt Prof. Tiago Garcia de Senna Carneiro 2007 Thread - Fundamentos Uma thread é um processo leve, portanto possui um fluxo de execução independente e troca de contexto mais rápida que um processo.
More informationThe Kernel Abstraction
The Kernel Abstraction Debugging as Engineering Much of your time in this course will be spent debugging In industry, 50% of software dev is debugging Even more for kernel development How do you reduce
More informationThe Process Abstraction. CMPU 334 Operating Systems Jason Waterman
The Process Abstraction CMPU 334 Operating Systems Jason Waterman How to Provide the Illusion of Many CPUs? Goal: run N processes at once even though there are M CPUs N >> M CPU virtualizing The OS can
More informationCMPSCI 377: Operating Systems Exam 1: Processes, Threads, CPU Scheduling and Synchronization. October 9, 2002
Name: Student Id: General instructions: CMPSCI 377: Operating Systems Exam 1: Processes, Threads, CPU Scheduling and Synchronization October 9, 2002 This examination booklet has 10 pages. Do not forget
More informationLecture 3. Introduction to Real-Time kernels. Real-Time Systems
Real-Time Systems Lecture 3 Introduction to Real-Time kernels Task States Generic architecture of Real-Time kernels Typical structures and functions of Real-Time kernels Last lecture (2) Computational
More informationProcesses. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems
OS Structure Processes COMP755 Advanced Operating Systems An OS has many parts. The Kernel is the core of the OS. It controls the execution of the system. Many OS features run outside of the kernel, such
More informationReview: Program Execution. Memory program code program data program stack containing procedure activation records
Threads and Concurrency 1 Review: Program Execution Registers program counter, stack pointer,... Memory program code program data program stack containing procedure activation records CPU fetches and executes
More informationScope. Scope. Region of a program in which a defined object is visible. Defined Objects. Two types of regions. Variables Functions
Scope & Repetition Scope Scope Region of a program in which a defined object is visible Defined Objects Variables Functions Two types of regions Blocks Not in a block 2 tj Scope Program Prototype Blocks
More informationProcesses. Process Management Chapter 3. When does a process gets created? When does a process gets terminated?
Processes Process Management Chapter 3 1 A process is a program in a state of execution (created but not terminated) Program is a passive entity one on your disk (survivor.class, kelly.out, ) Process is
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 informationCS 322 Operating Systems Practice Midterm Questions
! CS 322 Operating Systems 1. Processes go through the following states in their lifetime. time slice ends Consider the following events and answer the questions that follow. Assume there are 5 processes,
More informationOperating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst
Operating Systems CMPSCI 377 Spring 2017 Mark Corner University of Massachusetts Amherst Clicker Question #1 Program == Process (A) True (B) False Answer on Next Slide The Big Picture So Far Hardware abstraction
More informationQuadros. RTXC Kernel Services Reference, Volume 1. Levels, Threads, Exceptions, Pipes, Event Sources, Counters, and Alarms. Systems Inc.
Quadros Systems Inc. RTXC Kernel Services Reference, Volume 1 Levels, Threads, Exceptions, Pipes, Event Sources, Counters, and Alarms Disclaimer Quadros Systems, Inc. makes no representations or warranties
More informationProcesses. Process Concept
Processes These slides are created by Dr. Huang of George Mason University. Students registered in Dr. Huang s courses at GMU can make a single machine readable copy and print a single copy of each slide
More informationCS5460: Operating Systems
CS5460: Operating Systems Lecture 5: Processes and Threads (Chapters 3-4) Context Switch Results lab2-15 gamow home 3.8 us 1.6 us 1.0 us VirtualBox on lab2-25 VirtualBox on gamow VirtualBox on home 170
More informationThreads. What is a thread? Motivation. Single and Multithreaded Processes. Benefits
CS307 What is a thread? Threads A thread is a basic unit of CPU utilization contains a thread ID, a program counter, a register set, and a stack shares with other threads belonging to the same process
More informationCS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University
CS 333 Introduction to Operating Systems Class 3 Threads & Concurrency Jonathan Walpole Computer Science Portland State University 1 Process creation in UNIX All processes have a unique process id getpid(),
More informationSolution for Data Structure
Solution for Data Structure May 2016 INDEX Q1 a 2-3 b 4 c. 4-6 d 7 Q2- a 8-12 b 12-14 Q3 a 15-18 b 18-22 Q4- a 22-35 B..N.A Q5 a 36-38 b N.A Q6- a 39-42 b 43 1 www.brainheaters.in Q1) Ans: (a) Define ADT
More informationPROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)
MANAGEMENT OF APPLICATION EXECUTION PROCESS CONTROL BLOCK Resources (processor, I/O devices, etc.) are made available to multiple applications The processor in particular is switched among multiple applications
More informationCS3MH3/6MH3 Final 2005 Page 1 COMP SCI 3MH3/6MH3. Day Class Duration of examination: two hours McMaster University Final Examination April 2005
CS3MH3/6MH3 Final 2005 Page 1 Name Student Number Instructor: S. Qiao COMP SCI 3MH3/6MH3 Day Class Duration of examination: two hours McMaster University Final Examination April 2005 This examination paper
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 informationChapter 3 Process Description and Control
Operating Systems: Internals and Design Principles Chapter 3 Process Description and Control Seventh Edition By William Stallings Example of Standard API Consider the ReadFile() function in the Win32 API
More informationLab 3c Performance Debugging Page 3c.1
Lab 3c Performance Debugging Page 3c.1 Lab 3c Performance Debugging This laboratory assignment accompanies the book, Embedded Microcomputer Systems: Real Time Interfacing, by, published by Brooks-Cole,
More informationVariation of Pointers
Variation of Pointers A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant, you must declare a pointer before
More informationProcesses. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005
INF060: Introduction to Operating Systems and Data Communication Operating Systems: Processes & CPU Pål Halvorsen /9-005 Overview Processes primitives for creation and termination states context switches
More informationData Races and Deadlocks! (or The Dangers of Threading) CS449 Fall 2017
Data Races and Deadlocks! (or The Dangers of Threading) CS449 Fall 2017 Data Race Shared Data: 465 1 8 5 6 209? tail A[] thread switch Enqueue(): A[tail] = 20; tail++; A[tail] = 9; tail++; Thread 0 Thread
More informationWhat is concurrency? Concurrency. What is parallelism? concurrency vs parallelism. Concurrency: (the illusion of) happening at the same time.
What is concurrency? Concurrency Johan Montelius KTH 2017 Concurrency: (the illusion of) happening at the same time. A property of the programing model. Why would we want to do things concurrently? What
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 informationPart II Processes and Threads Process Basics
Part II Processes and Threads Process Basics Fall 2017 Program testing can be used to show the presence of bugs, but never to show their absence 1 Edsger W. Dijkstra From Compilation to Execution A compiler
More informationWhy use an Operating System? Operating System Definition
Why use an Operating System? Operating System Definition Provides a set of services to system users (collection of service programs) Shield between the user and the hardware Resource manager: CPU(s) memory
More informationW4118 Operating Systems. Junfeng Yang
W4118 Operating Systems Junfeng Yang What is a process? Outline Process dispatching Common process operations Inter-process Communication What is a process Program in execution virtual CPU Process: an
More informationOperating Systems & Concurrency: Process Concepts
Operating Systems & Concurrency: Process Concepts Michael Brockway October 6, 2011 Outline Processes - context, data area, states Process creation, termination unix examples Processes and threads Processes
More information13-2 EE 4770 Lecture Transparency. Formatted 8:18, 13 March 1998 from lsli
13-1 13-1 Operating Systems Definition: An operating system is the software that manages resources in a computer. Resources A resource is (usually) hardware that needs to be accessed. There are rules for
More informationICS-121. VxWORKS DEVICE DRIVER MANUAL
ICS-121 VxWORKS DEVICE DRIVER MANUAL Interactive Circuits And Systems Ltd. February 1999 The information in this manual has been carefully checked and is believed to be reliable; however, no responsibility
More informationConcurrency. Johan Montelius KTH
Concurrency Johan Montelius KTH 2017 1 / 32 What is concurrency? 2 / 32 What is concurrency? Concurrency: (the illusion of) happening at the same time. 2 / 32 What is concurrency? Concurrency: (the illusion
More informationCS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University
CS 333 Introduction to Operating Systems Class 3 Threads & Concurrency Jonathan Walpole Computer Science Portland State University 1 The Process Concept 2 The Process Concept Process a program in execution
More informationPowerQUICC Platform Debugging
PowerPC Debugging PowerQUICC Platform Debugging Application Note: CT-PPC-860T-1 Date: 7 th Febuary, 2000 Ian Clark Originally written while running CIMple technology cc now available at www.secondvalleysoftware.com/hardware/powerpc/app-ppc2.pdf
More informationLecture 4: Process Management
Lecture 4: Process Management (Chapters 2-3) Process: execution context of running program. A process does not equal a program! Process is an instance of a program Many copies of same program can be running
More informationC programming for beginners
C programming for beginners Lesson 2 December 10, 2008 (Medical Physics Group, UNED) C basics Lesson 2 1 / 11 Main task What are the values of c that hold bounded? x n+1 = x n2 + c (x ; c C) (Medical Physics
More information6/20/2018. Lecture 2: Platforms & RTOS. Outline. Lab Setup (20 min) Labs work. Lecture: Platform + RTOS
Lecture 2: Platforms & RTOS 1 Outline Lab Setup (20 min) Labs work Workbench + vxworks Documentations (15 min) Project Management (25 min) Host Shell (25 min) Lecture: Platform + RTOS 2 1 3 Microcomputer
More informationThreads Chapter 5 1 Chapter 5
Threads Chapter 5 1 Chapter 5 Process Characteristics Concept of Process has two facets. A Process is: A Unit of resource ownership: a virtual address space for the process image control of some resources
More informationProcesses (Intro) Yannis Smaragdakis, U. Athens
Processes (Intro) Yannis Smaragdakis, U. Athens Process: CPU Virtualization Process = Program, instantiated has memory, code, current state What kind of memory do we have? registers + address space Let's
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 informationA New Real-time Kernel development on an embedded platform
A New Real-time Kernel development on an embedded platform CSC714: Real Time Systems Project Final Report Spring 2009 BALASUBRAMANYA BHAT (bbhat@ncsu.edu) SANDEEP BUDANUR RAMANNA (sbudanu@ncsu.edu) - 1
More informationAMCAT Automata Coding Sample Questions And Answers
1) Find the syntax error in the below code without modifying the logic. #include int main() float x = 1.1; switch (x) case 1: printf( Choice is 1 ); default: printf( Invalid choice ); return
More informationMutex Implementation
COS 318: Operating Systems Mutex Implementation Jaswinder Pal Singh Computer Science Department Princeton University (http://www.cs.princeton.edu/courses/cos318/) Revisit Mutual Exclusion (Mutex) u Critical
More informationMultitasking. Embedded Systems
Multitasking in Embedded Systems 1 / 39 Multitasking in Embedded Systems v1.0 Multitasking in ES What is Singletasking? What is Multitasking? Why Multitasking? Different approaches Realtime Operating Systems
More informationTHE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7
THE PROCESS ABSTRACTION CS124 Operating Systems Winter 2015-2016, Lecture 7 2 The Process Abstraction Most modern OSes include the notion of a process Term is short for a sequential process Frequently
More informationRELEVANT MANUALS...2 CHAPTER 1 INTRODUCTION 3 CHAPTER 2 USING C CONTROLLER MODULE 5
CONTENTS RELEVANT MANUALS......................................................................2 CHAPTER 1 INTRODUCTION 3 CHAPTER 5 2.1 Preparing for Operation...................................................................
More informationReview: Program Execution. Memory program code program data program stack containing procedure activation records
Threads and Concurrency 1 Review: Program Execution Registers program counter, stack pointer,... Memory program code program data program stack containing procedure activation records CPU fetches and executes
More informationToday s Topics. u Thread implementation. l Non-preemptive versus preemptive threads. l Kernel vs. user threads
Today s Topics COS 318: Operating Systems Implementing Threads u Thread implementation l Non-preemptive versus preemptive threads l Kernel vs. user threads Jaswinder Pal Singh and a Fabulous Course Staff
More informationIntroduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar
Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Mahmoud El-Gayyar / Introduction to OS 1 Processes in Unix, Linux, and Windows Unix pre-empted
More informationToday s Topics. u Thread implementation. l Non-preemptive versus preemptive threads. l Kernel vs. user threads
Today s Topics COS 318: Operating Systems Implementing Threads u Thread implementation l Non-preemptive versus preemptive threads l Kernel vs. user threads Jaswinder Pal Singh Computer Science Department
More informationCSC 716 Advanced Operating System Fall 2007 Exam 1. Answer all the questions. The maximum credit for each question is as shown.
CSC 716 Advanced Operating System Fall 2007 Exam 1 Answer all the questions. The maximum credit for each question is as shown. 1. (15) Multiple Choice(3 points for each): 1) Which of the following statement
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 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 informationSystems Programming/ C and UNIX
Systems Programming/ C and UNIX Alice E. Fischer November 22, 2013 Alice E. Fischer () Systems Programming Lecture 12... 1/27 November 22, 2013 1 / 27 Outline 1 Jobs and Job Control 2 Shared Memory Concepts
More information1. port 2: 'a' 3. port 2: '\n' 5. port 1: 'y' 2. port 1: 'x' 4. port 2: 'b' 6. port 1: '\n'
CS 7600 Intensive Computer Systems February 24, 2010 Midterm Sample questions These are sample questions previous midterms of mine. Context Switching user processes operating system HW current process
More informationProject 1. Soumya Basu. Department of Computer Science Cornell University February 5, 2016
Project 1 Soumya Basu Department of Computer Science Cornell University February 5, 2016 Administrivia Project 1 will be released tomorrow Due on February 18th at noon We re using Github! Read the assignment
More informationTTC BLE SDK RTOS Introduction
TTC BLE SDK RTOS Introduction Version:V1.0 Shenzhen Shengrun Technology Co.,Ltd 5 th Dec,2016 Vers ion Revised Date Revisionist Reviewer Modified content 1.0 2016-12-05 郭高亮 张眼 First release Content 1.TI
More informationSistemi in Tempo Reale
Laurea Specialistica in Ingegneria dell'automazione Sistemi in Tempo Reale Giuseppe Lipari Introduzione alla concorrenza Fundamentals Algorithm: It is the logical procedure to solve a certain problem It
More informationReview: Program Execution. Memory program code program data program stack containing procedure activiation records
Threads and Concurrency 1 Review: Program Execution Registers program counter, stack pointer,... Memory program code program data program stack containing procedure activiation records CPU fetches and
More informationImplementation of the ART Real Time Micro Kernel
Implementation of the ART Real Time Micro Kernel This document describes the functions constituting the application interface of the ART kernel. Task administration exception init_kernel() This function
More informationPartition magic 10 portable. Partition magic 10 portable.zip
Partition magic 10 portable Partition magic 10 portable.zip Norton Partition Magic Windows 10 solidworks premium buy buy camtasia 3ds max 2010 portablepartition magic for portable Windows 7 computer is
More informationChapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,
Chapter 19: Real-Time Systems, Silberschatz, Galvin and Gagne 2009 Chapter 19: Real-Time Systems System Characteristics Features of Real-Time Systems Implementing Real-Time Operating Systems Real-Time
More information