Cyclic Scheduling –Advantages Simple implementation (no real-time operating system is required). Low run-time overhead. It allows jitter control. –Disadvantages.

Slides:



Advertisements
Similar presentations
Simulation of Feedback Scheduling Dan Henriksson, Anton Cervin and Karl-Erik Årzén Department of Automatic Control.
Advertisements

Real Time Versions of Linux Operating System Present by Tr n Duy Th nh Quách Phát Tài 1.
Introduction to Embedded Systems Resource Management - III Lecture 19.
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.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Real-Time Kernels and Operating Systems Basic Issue - Purchase commercial “off-the- shelf” system or custom build one Basic Functions –Task scheduling.
Chapter 13 Embedded Systems
Chapter 13 Embedded Systems Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
1 Concurrent and Distributed Systems Introduction 8 lectures on concurrency control in centralised systems - interaction of components in main memory -
Supporting Time-sensitive Application on a Commodity OS Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presented by Wen Sun Some Slides.
Processes 1 CS502 Spring 2006 Processes Week 2 – CS 502.
Chapter 13 Embedded Systems
Figure 1.1 Interaction between applications and the operating system.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
1 Chapter 13 Embedded Systems Embedded Systems Characteristics of Embedded Operating Systems.
Chapter 13 Embedded Operating Systems Eighth Edition By William Stallings Operating Systems: Internals and Design Principles.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 19: Real-Time Systems Silberschatz, Galvin and Gagne ©2005 AE4B33OSS Chapter 19: Real-Time Systems System Characteristics Features of Real-Time.
Performance Evaluation of Real-Time Operating Systems
Final Year Project Electronic & Computer Engineering Student: Andrew Sweeney Supervisor: Dr. Peter Corcoran Design and Realisation of Experiments for an.
1 Previous lecture review n Out of basic scheduling techniques none is a clear winner: u FCFS - simple but unfair u RR - more overhead than FCFS may not.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Real Time Application Interface (RTAI) Zubair Ahmad - Ilhan Akbas.
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.
Logo RTAI & LTT Choi Sung Chul. What is the RTAI ?  Realtime Application Interface  A patch to the Linux kernel which introduces a hardware abstraction.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Real Time Operating Systems Lecture 10 David Andrews
Real-Time Operating Systems for Embedded Computing 李姿宜 R ,06,10.
Real-Time Linux Evaluation NASA Glenn Research Center Kalynnda Berens Richard Plastow
CE Operating Systems Lecture 11 Windows – Object manager and process management.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
MicroC/OS-II S O T R.  MicroC/OS-II (commonly termed as µC/OS- II or uC/OS-II), is the acronym for Micro-Controller Operating Systems Version 2.  It.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
19.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 19: Real-Time Systems.
Challenges in Porting & Abstraction. Getting Locked-In Applications are developed with a particular platform in mind The software is locked to the current.
Chapter 19: Real-Time Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 19: Real-Time Systems System Characteristics.
Processes. Process Concept Process Scheduling Operations on Processes Interprocess Communication Communication in Client-Server Systems.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
CSCI1600: Embedded and Real Time Software Lecture 17: Concurrent Programming Steven Reiss, Fall 2015.
Low Overhead Real-Time Computing General Purpose OS’s can be highly unpredictable Linux response times seen in the 100’s of milliseconds Work around this.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
CONCEPTS OF REAL-TIME OPERATING SYSTEM. OBJECTIVE  To Understand Why we need OS?  To identify Types of OS  To Define Real - Time Systems  To Classify.
Real-Time Operating Systems RTOS For Embedded systems.
Introduction to Operating Systems Concepts
Computer System Structures
Introduction to Real-Time Operating Systems
REAL-TIME OPERATING SYSTEMS
Kernel Design & Implementation
Chapter 19: Real-Time Systems
Topics Covered What is Real Time Operating System (RTOS)
Threads and Cooperation
CSCI 315 Operating Systems Design
B.Ramamurthy Chapter 2 : Appendix
Operating Systems Lecture 1.
CSCI1600: Embedded and Real Time Software
Chapter 19: Real-Time Systems
CS510 Operating System Foundations
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Cyclic Scheduling –Advantages Simple implementation (no real-time operating system is required). Low run-time overhead. It allows jitter control. –Disadvantages It is not robust during overloads. It is difficult to expand the schedule. It is not easy to handle non periodic activities.

Other Schedule Algorithms –Priority Scheduling Each task is assigned a priority based on its timing constraints We verify the feasibility of the schedule using analytical techniques Tasks are executed on a priority-based kernel –Example: Rate Monotonic (RM) Each task is assigned a fixed priority proportional to its rate

Real Time and Linux Linux is a standard time-sharing operating system –Good average performance and highly sophisticated services –Hardware management layer dealing with event polling or processor/peripheral interrupts –Scheduler classes dealing with process activation, priorities, time slice –Communications between applications.

Real Time and Linux Linux suffers from a lack of real time support Changes in the kernel sources, i.e. in the interrupt handling and scheduling policies Real time platform, with low latency and high predictability requirements –Full non real time Linux environment (access to TCP/IP, graphical display and windowing systems, file and data base systems, etc.).

Timers PC’s –Specific chip to solve the problem of generating accurate time delays under software control. –8254 Programmable interval timer/counter 4 I/O ports in the system software Three are independent 16-bit, one is a control register We configures the 8254 to match requirements (select the mode) and program one of the counters for the desired delay. After the delay, the 8254 will interrupt the CPU.

Real Time in Linux, RTAI Use low cost general purpose computers and open-free source operating systems RTAI means Real Time Application Interface. –Not a real time operating system –Based on the Linux kernel. RTAI expands Linux to hard real time

Real Time in Linux, RTAI A patch to the Linux kernel which introduces a hardware abstraction layer A broad variety of services which make real-time programmers' life easier RTAI offers the same services of the Linux kernel core, adding the features of an industrial real time operating system.

Real Time in Linux, RTAI Is an interrupt dispatcher RTAI traps the peripherals interrupts and if necessary re-routes them to Linux It uses the concept of HAL (hardware abstraction layer) to get information from Linux and to trap some fundamental functions. HAL provides few dependencies to Linux Kernel. RTAI considers Linux as a background task running when no real time activity occurs.

RT Computer Systems RTAI –Basic task management time management and conversions dynamic priority assignment scheduler policy assignment scheduling locking/unlocking counting suspend/resume to avoid trivial deadlocks –Memory Management shared memory for inter tasks inter-intra user/kernel space data sharing, dynamic memory allocations

RT Computer Systems RTAI –Semaphores Wait Send broadcast on –counting, binary and resources with full priority inheritance to avoid priority inversion.

RT Computer Systems RTAI –Conditional variables wait, signal, broadcast, equivalent to the related POSIX APIs, but with an RTAI specific implementation. –Bits synchronization Multi events/flags/signals synchronization, i.e. semaphore like operations with different logical masking/unmasking on a set of bits at call and return time.

RT Computer Systems RTAI –Mailboxes send, receive of messages with multi readers/writers capability messages queued in either FIFO or priority order. It is possible to use overwriting and urgent sends, broadcast a single message to all task waiting to receive on a mailbox queue, preview any message before reading it.

RT Computer Systems RTAI –Direct Inter-task Messages Asynchronous: send, receive Synchronous remote procedures calls (RPC) –rpc, receive, return.

RTAI Modules –To use RTAI, you have to load the modules that implement whatever RTAI capabilities you need. –Modules: Rtai, Main module. rtai_sched. scheduler module, which is in charge of distributing the CPU to different tasks –Task functions –Timing functions –Semaphore functions –Mailbox functions –Inter-task communication functions rtai_fifos.

RTAI Modules –Modules rtai_shm Lxrt rtai_pqueue rtai_pthread rtai_utils

RTAI Examples The program simply generates a sine signal and displays the instant values on the screen RT_PROCESS.C \#include \#define TICK_PERIOD \#define TASK_PRIORITY 1 \#define STACK_SIZE \#define FIFO 0

RTAI Examples static RT_TASK rt_task; static void fun(int t) { int counter = 0; float sin_value; while (1) { sin_value = sin(2*M_PI*1*rt_get_cpu_time_ns()/1E9); rtf_put(FIFO, &counter, sizeof(counter)); rtf_put(FIFO, &sin_value, sizeof(sin_value)); counter++; rt_task_wait_period(); }

RTAI Examples int init_module(void) { RTIME tick_period; rt_set_periodic_mode(); rt_task_init(&rt_task, fun, 1, STACK_SIZE, TASK_PRIORITY, 1, 0); rtf_create(FIFO, 8000); tick_period = start_rt_timer(nano2count(TICK_PERIOD)); rt_task_make_periodic(&rt_task, rt_get_time() + tick_period, tick_period); return 0; }

RTAI Examples void cleanup_module(void) { stop_rt_timer(); rtf_destroy(FIFO); rt_task_delete(&rt_task); return; }

RTAI Examples Scope: int main (void) { int fifo, counter; float sin_value; if ((fifo = open("/dev/rtf0", O_RDONLY)) < 0) { fprintf(stderr, "Error opening /dev/rtf0\n"); exit(1); } signal(SIGINT, endme); while (!end) { read(fifo, &counter, sizeof(counter)); read(fifo, &sin_value, sizeof(sin_value)); printf(" Counter : %d Seno : %f \n", counter, sin_value); } return 0; }