RTS: Kernel Design 11/30/2018.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

Threads, SMP, and Microkernels
Operating Systems: Internals and Design Principles
Chapter 3 Process Description and Control
Mutual Exclusion.
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Real-Time Kernels and Operating Systems Basic Issue - Purchase commercial “off-the- shelf” system or custom build one Basic Functions –Task scheduling.
© Copyright 2004 Dr. Phillip A. Laplante 1 Kernel Architectures  Polled Loop  Synchronized Polled Loop  State-Based Model  Cyclic Executives  Foreground/Background.
CENG 324 Embedded Computer Systems Lecture 3 General Concepts of RTOS (Real-Time Operating System) Asst. Prof. Tolga Ayav, Ph.D. Department of Computer.
RTOS Concepts and Defn From Pseudokernels to Operating Systems
EEE 435 Principles of Operating Systems Principles and Structure of I/O Software (Modern Operating Systems 5.2 & 5.3) 5/22/20151Dr Alain Beaulieu.
Computer Systems/Operating Systems - Class 8
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
1: Operating Systems Overview
Realtime Systems Fundamnetals
Chapter 11 Operating Systems
© Copyright 2004 Dr. Phillip A. Laplante 1 Real-time operating systems: I  Operating systems taxonomy  Pseudo-kernels  Interrupt driven systems  Preemptive.
1 Chapter 13 Embedded Systems Embedded Systems Characteristics of Embedded Operating Systems.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
What do operating systems do? manage processes manage memory and computer resources provide security features execute user programs make solving user.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Operating System 4 THREADS, SMP AND MICROKERNELS
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Operating Systems Lecture 2 Processes and Threads Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
CHAPTER 4 10/29/ RTS: Kernel Design and Cyclic Executives CE321-fall2013.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
Threads G.Anuradha (Reference : William Stallings)
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
Operating System Requirements for Embedded Systems Rabi Mahapatra.
1: Operating Systems Overview 1 Jerry Breecher Fall, 2004 CLARK UNIVERSITY CS215 OPERATING SYSTEMS OVERVIEW.
6/1/ More on Cyclic Executives Simple loop cyclic executive Frame/slots Table-based predetermined schedule cyclic executive Periodic, aperiodic and.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Operating Systems: Internals and Design Principles
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Processes and Threads.
Threads-Process Interaction. CONTENTS  Threads  Process interaction.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
An operating system for a large-scale computer that is used by many people at once is a very complex system. It contains many millions of lines of instructions.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
CSCE451/851 Introduction to Operating Systems
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Input / Output Chapter 9.
Processes and threads.
Real time systems RTS Engineering.
RTS: Kernel Design and Cyclic Executives
OPERATING SYSTEMS CS3502 Fall 2017
Wayne Wolf Dept. of EE Princeton University
CS490 Windows Internals Quiz 2 09/27/2013.
Intro to Processes CSSE 332 Operating Systems
CS 286 Computer Organization and Architecture
Hardware Considerations
RTS: Kernel Design and Cyclic Executives
CS703 - Advanced Operating Systems
Process Description and Control
RTS: Kernel Design and Cyclic Executives
RTS: Kernel Design 1/2/2019.
Operating System 4 THREADS, SMP AND MICROKERNELS
Threads Chapter 4.
RTS: Kernel Design and Cyclic Executives
RTS: Kernel Design and Cyclic Executives
EE 472 – Embedded Systems Dr. Shwetak Patel.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Realtime Embedded System Design
Cyclic executives for Bare Hardware
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

RTS: Kernel Design 11/30/2018

Kernel & Device drivers Servers (application ~, web ~, component ~) Shell XWin Thread lib ftp User applications System call interface Process, memory, file system, network managers. Kernel Device drivers Hardware/controller Devices 11/30/2018

Simple kernels Polled loop: Say a kernel needs to process packets that are transferred into the DMA and a flag is set after transfer: for(;;) { if (packet_here) { process_data(); packet_here=0; } Excellent for handling high-speed data channels, a processor is dedicated to handling the data channel. Disadvantage: cannot handle bursts 11/30/2018

Simple kernels: cyclic executives Illusion of simultaneity by taking advantage of relatively short processes in a continuous loop: for(;;) { process_1(); process_2(); process_3(); … process_n(); } Different rate structures can be achieved by repeating tasks in the list: 11/30/2018

Cyclic Executives: example: Interactive games Space invaders: for(;;) { check_for_keypressed(); move_aliens(); check_collision(); update_screen(); } check_keypressed() checks for three button pressings: move tank left or right and fire missiles. If the schedule is carefully constructed we could achieve a very efficient game program with a simple kernel as shown above. 11/30/2018

Finite state automata and Co-routine based kernels void process_a(void){ for(;;) { switch (state_a) { case 1: phase_a1(); | case 2: phase_a2(); | …. case n: phase_an();}}} void process_b(void){ switch (state_b) { case 1: phase_b1(); | case 2: phase_b2(); | case n: phase_bn();}}} state_a and state_b are state counters; Communication between coroutines thru’ global variables; Example: the fanous CICS from IBM : Customer Information Control System IBM’s OS/2 uses this in Windows presentation management. 11/30/2018

Interrupt driven systems Main program is a simple loop. Various tasks in the system are schedules via software or hardware interrupts; Dispatching performed by interrupt handling routines. Hardware and software interrupts. Hardware: asynchronous Software: typically synchronous Executing process is suspended, state and context saved and control is transferred to ISR (interrupt service routine) 11/30/2018

Interrupt driven systems: code example void main() { init(); while(TRUE); } void int1(void){ save (context); taks1(); retore (context);} restore (context);} Foreground/background systems is a variation of this where main does some useful task in the background; 11/30/2018

Process scheduling Scheduling is a very important function in a real-time operating system. Two types: pre-run-time and run-time Pre-run-time scheduling: create a feasible schedule offline to meet time constraints, guarantee execution order of processes, and prevents simultaneous accesses to shared resources. Run-time scheduling: allows events to interrupt processes, on demand allocation of resources , and used complex run-time mechanisms to meet time constraints. 11/30/2018

Task characteristics of real workload Each task Ti is characterized by the following temporal parameters: Precedence constraints: specify any tasks need to precede other tasks. Release or arrival time: ri,j: jth instance of ith task Phase Φi: release time of first instant of ith task Response time: time between activation and completion Absolute deadline: instant by which task must complete Relative deadline: maximum allowable response time Period Pi: maximum length of intervals between the release times of consecutive tasks. Execution time: the maximum amount of time required to complete a instance of the task assuming all the resources are available. 11/30/2018

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. (See notes given in class) 11/30/2018 11

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 slot. 11/30/2018 12

Blind Bingo Display(); Read input(); Loop: A c b g k update display(); If all done exit(); End Loop; A c b g k V n m L s E t y w f D v z x e 11/30/2018 13

Period, Frame and Hyper-period: Cyclic Executive Design See class notes Design the slots Table-driven cyclic executive 11/30/2018