6/1/2013 1 More on Cyclic Executives Simple loop cyclic executive Frame/slots Table-based predetermined schedule cyclic executive Periodic, aperiodic and.

Slides:



Advertisements
Similar presentations
Process management Information maintained by OS for process management  process context  process control block OS virtualization of CPU for each process.
Advertisements

HW/Study Guide. Synchronization Make sure you understand the HW problems!
Real-Time Library: RTX
Microprocessors General Features To be Examined For Each Chip Jan 24 th, 2002.
An introduction to: The uRT51 Microprocessor and Real-Time Programming Suite.
Chapter 5 – Fixed-Priority Servers Typical Real-Time systems are hybrids characterized by: periodic tasks that execute critical control activities aperiodic.
1 Lecture 11 Interfaces and Exception Handling from Chapters 9 and 10.
Real-Time Kernels and Operating Systems Basic Issue - Purchase commercial “off-the- shelf” system or custom build one Basic Functions –Task scheduling.
Putting the Cyclic Executive into Practice T. P. BakerAlan Shaw, “The Cyclic Executive Model and Ada” Implementation approaches for a Cyclic Executive:
OS Spring ’ 04 Scheduling Operating Systems Spring 2004.
Fixed-Priority Servers
Lock Inference for Systems Software John Regehr Alastair Reid University of Utah March 17, 2003.
CprE 458/558: Real-Time Systems
Chapter 6 Real-Time Embedded Multithreading The Thread – The Essential Component.
Figure Figure 18-1 part 1 Figure 18-1 part 2.
BINA RAMAMURTHY UNIVERSITY AT BUFFALO System Structure and Process Model 5/30/2013 Amrita-UB-MSES
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 1.
Real Time Operating System
Chapter 4 Processor Management
CORTEX-M0 Structure Discussion 2 – Core Peripherals
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
CHAPTER 4 10/29/ RTS: Kernel Design and Cyclic Executives CE321-fall2013.
B. RAMAMURTHY Simulating Motion and Implementing Animation.
SE-3910 Real-time Systems Week 5, Class 2 – Lab turn-in page is up! – Use interrupts in a Linux/C environment – Scheduling – Watchdog follow-up Watchdog.
CS140 Project 1: Threads Slides by Kiyoshi Shikuma.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
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.
Lesson 3: Arrays and Loops. Arrays Arrays are like collections of variables Picture mailboxes all lined up in a row, or storage holes in a shelf – You.
B. RAMAMURTHY 12/25/2015 Realtime System Fundamentals : Scheduling and Priority-based scheduling Pag e 1.
Multi-Threading in Java
Multithreaded programming  Java provides built-in support for multithreaded programming. A multithreaded program contains two or more parts that can run.
Real time scheduling G.Anuradha Ref:- Stallings. Real time computing Correctness of the system depends not only on the logical result of computation,
Software Engineering INTRODUCTION TO SOFTWARE DEVELOPMENT.
Managing Processors Jeff Chase Duke University. The story so far: protected CPU mode user mode kernel mode kernel “top half” kernel “bottom half” (interrupt.
1 Run-to-Completion Non-Preemptive Scheduler. 2 In These Notes... What is Scheduling? What is non-preemptive scheduling? Examples Run to completion (cooperative)
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
3/1/2016Page 1 Realtime System Fundamentals : Scheduling B. Ramamurthy.
Clock Driven Scheduling
SE3910 Week 8, Class 3 Week 4 Lab: Please return your graded Lab 4 to me so I can enter it in my gradebook Week 9 Lab: Individual demos of working sub-modules.
6.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 6.5 Semaphore Less complicated than the hardware-based solutions Semaphore S – integer.
Clock-Driven Scheduling (in-depth) Task Scheduler: i := 0; k := 0; BEGIN LOOP i := i+1; k:= i mod N; IF J(t k-1 )is empty THEN wakeup(aperiodic) ELSE wakeup(J(t.
Process Tables; Threads
RTS: Kernel Design and Cyclic Executives
A Step By Step Picture of How Processes Schedule (Using Test4 and TestX as examples) Version 4.40: September 2017.
VDK Concepts and Features How to Create a Project with VDK support
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy cse321-fall2014 9/20/2018.
RTS: Kernel Design and Cyclic Executives
Reconfigurable Hardware Scheduler for RTS
Process management Information maintained by OS for process management
Implementation of Cyclic Executive
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy 11/22/2018.
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy cse321-fall /27/2018.
Clock-driven Static scheduling
Process Tables; Threads
RTS: Kernel Design 11/30/2018.
Clock-driven Static scheduling
Clock-driven Static scheduling
PROCESS MANAGEMENT Information maintained by OS for process management
RTS: Kernel Design and Cyclic Executives
RTS: Kernel Design 1/2/2019.
RTS: Kernel Design and Cyclic Executives
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy Amrita-UB-MSES /11/2013.
RTS: Kernel Design and Cyclic Executives
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Practical Session 8, Memory Management 2
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Cyclic executives for Bare Hardware
VDK Concepts and Features How to Create a Project with VDK support
Practical Session 9, Memory Management continues
Multiplication Facts 3 x Table.
Presentation transcript:

6/1/ More on Cyclic Executives Simple loop cyclic executive Frame/slots Table-based predetermined schedule cyclic executive Periodic, aperiodic and interrupt-based task Lets design a cyclic-executive with multiple periodic tasks. 1 Amrita-UB-MSES

6/1/ The basic systems Several functions are called in a prearranged sequence Some kind of cooperative scheduling You a have a set of tasks and a scheduler that schedules these tasks Types of tasks: base tasks (background), interrupt tasks, clock tasks Frame of slots, slots of cycles, each task taking a cycle, burn tasks to fill up the left over cycles in a frame. 2 Amrita-UB-MSES

Cyclic Executive Design 1 (pages 81-87) 6/1/ Base tasks, clock tasks, interrupt tasks – Base: no strict requirements, background activity – Clock: periodic with fixed runtime – Interrupt: event-driven preemption, rapid response but little processing Design the slots Table-driven cyclic executive Amrita-UB-MSES

Cyclic executive 6/1/ Each task implemented as a function All tasks see global data and share them Cyclic executive for three priority level The execution sequence of tasks within a cyclic executive will NOT vary in any unpredictable manner (such as in a regular fully featured Operating Systems) Clock tasks, clock sched, base tasks, base sched, interrupt tasks Each clock slot executes, clock tasks, at the end a burn task that is usually the base task Study the figures in pages of your text Amrita-UB-MSES

RT Cyclic Executive Program 6/1/ Lets examine the code: Identify the tasks Identify the cyclic schedule specified in the form of a table Observe how the functions are specified as table entry Understand the scheduler is built-in Learn how the function in the table are dispatched Amrita-UB-MSES

Implementation of a cyclic executive #include #define SLOTX 4 #define CYCLEX 5 #define SLOT_T 5000 int tps,cycle=0,slot=0; clock_t now, then; struct tms n; void one() { printf("Task 1 running\n"); sleep(1); } void two() { printf("Task 2 running\n"); sleep(1); } 6/1/2013Amrita-UB-MSES

Implementation (contd.) void three() { printf("Task 3 running\n"); sleep(1); } void four() { printf("Task 4 running\n"); sleep(1); } void five() { printf("Task 5 running\n"); sleep(1); } 6/1/2013Amrita-UB-MSES

Implementation (contd.) void burn() { clock_t bstart = times(&n); while ((( now = times(&n)) - then) < SLOT_T * tps / 1000) { } printf (" brn time = %2.2dms\n\n", (times(&n)- bstart)*1000/tps); then = now; cycle = CYCLEX; } 6/1/2013Amrita-UB-MSES

Implementation (contd.) void (*ttable[SLOTX][CYCLEX])() = { {one, two, burn, burn, burn}, {one, three, four, burn, burn}, {one, two, burn, burn, burn}, {one, five, four, burn, burn}}; main() { tps = sysconf(_SC_CLK_TCK); printf("clock ticks/sec = %d\n\n", tps); then = times(&n); while (1) { for (slot=0; slot <SLOTX; slot++) for (cycle=0; cycle<CYCLEX; cycle++) (*ttable[slot][cycle])(); }} 6/1/2013Amrita-UB-MSES

Summary The cyclic executive discussed the scheduler is built-in. You can also use clock ticks RTC etc to schedule the tasks In order use the cyclic executive discussed here in other applications simply change table configuration, and rewrite the dummy functions we used. 6/1/2013Amrita-UB-MSES