OFFLINE SCHEDULER BOF Raz Ben Yehuda Linux plumbers conference 2009.

Slides:



Advertisements
Similar presentations
Real Time Versions of Linux Operating System Present by Tr n Duy Th nh Quách Phát Tài 1.
Advertisements

Part IV: Memory Management
User-Mode Linux Ken C.K. Lee
The Process Control Block From: A Process Control Block (PCB, also called Task Control Block or Task Struct) is.
Processes CSCI 444/544 Operating Systems Fall 2008.
Operating System Support Focus on Architecture
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Jonathan.
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
Supporting Time-sensitive Application on a Commodity OS Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presented by Wen Sun Some Slides.
Supporting Time-sensitive Application on a Commodity OS By Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presenter: Shuping Tien.
Threads CSCI 444/544 Operating Systems Fall 2008.
Protocol Implementation An Engineering Approach to Computer Networking.
OS and the Computer System  Some OS programs exist permanently in the system area of the memory to monitor and control activities in the computer system.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Introduction to Embedded Systems
Computer System Architectures Computer System Software
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Systems Security & Audit Operating Systems security.
Multiple Processor Systems. Multiprocessor Systems Continuous need for faster and powerful computers –shared memory model ( access nsec) –message passing.
Cpr E 308 Input/Output Recall: OS must abstract out all the details of specific I/O devices Today –Block and Character Devices –Hardware Issues – Programmed.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-1: I/O Management Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Chapter 5 – CPU Scheduling (Pgs 183 – 218). CPU Scheduling  Goal: To get as much done as possible  How: By never letting the CPU sit "idle" and not.
Processes & Threads Bahareh Goodarzi. Single & Multiple Thread of control code files data code files data.
Operating Systems. Definition An operating system is a collection of programs that manage the resources of the system, and provides a interface between.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Mutual Exclusion.
Fall 2013 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Oindrila.
Discussion Week 2 TA: Kyle Dewey. Overview Concurrency Process level Thread level MIPS - switch.s Project #1.
CSCI1600: Embedded and Real Time Software Lecture 27: Real Time Linux Steven Reiss, Fall 2015.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
CSCI1600: Embedded and Real Time Software Lecture 9: Input Output Concepts Steven Reiss, Fall 2015.
Real Time System with MVL. © 2007 MontaVista Confidential | Overview of MontaVista Agenda Why Linux Real Time? Linux Kernel Scheduler Linux RT technology.
ECE 353 Introduction to Microprocessor Systems Michael J. Schulte Week 11.
Lecture 27 Multiprocessor Scheduling. Last lecture: VMM Two old problems: CPU virtualization and memory virtualization I/O virtualization Today Issues.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Chapter 3: Processes Process Concept.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
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.
Where Testing Fails …. Problem Areas Stack Overflow Race Conditions Deadlock Timing Reentrancy.
Interrupts and Interrupt Handling David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Ch6. Flow of Time Ch7. Getting Hold of Memory 홍원의.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Lecture 4 CPU scheduling. Basic Concepts Single Process  one process at a time Maximum CPU utilization obtained with multiprogramming CPU idle :waiting.
CPU scheduling.  Single Process  one process at a time  Maximum CPU utilization obtained with multiprogramming  CPU idle :waiting time is wasted 2.
© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. CGE7 Core Isolation Nawneet Anand.
Inside The RT Patch Steven Rostedt (Red Hat) Darren V Hart (IBM) Talk: Benchmarks :
Mohit Aron Peter Druschel Presenter: Christopher Head
CS 3214 Computer Systems Lecture 9 Godmar Back.
REAL-TIME OPERATING SYSTEMS
lecture 5: CPU Scheduling
Process Management Process Concept Why only the global variables?
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Linux Realtime Preemption and Its Impact on ULDD* - Progress Report -
Midterm Review Chris Gill CSE 422S - Operating Systems Organization
Anton Burtsev February, 2017
Interrupts and Interrupt Handling
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
Operating Systems Chapter 5: Input/Output Management
Chapter5: CPU Scheduling
CPU SCHEDULING.
Outline Scheduling algorithms Multi-processor scheduling
CPU scheduling decisions may take place when a process:
Chapter 6: CPU Scheduling
Midterm Review Brian Kocoloski
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Shortest-Job-First (SJR) Scheduling
RTOS Modelling Naren Bala.
Interrupts and Interrupt Handling
Presentation transcript:

OFFLINE SCHEDULER BOF Raz Ben Yehuda Linux plumbers conference 2009

CONCEPT PARTIAL PARTITIONING vs PURE PARTITIONING PROCESSOR is a DEVICE vs PROCESSOR is the SYSTEM

CONS 1. CANNOT RUN USER SPACE TASKS 2. RELEATIVELY HARD TO DEVELOP 3. ONLY FOR SMP/SMT/MC SYSTEMS 4. INDIRECT ACCESS TO VMALLOC AREA 5. NO CONTEXT SWITCH 6. DOES NOT PRESERVE STATES 7. NOT MAINLINE

PROS 1. PERFORMANCE 2. CONTAINMENT 3. ACCURACY 4. SPEED-UP 5. CONSISTENCY6. HYBRID SYSTEM 7. ASYMMETRIC PROCESSING 8. INDEPENDENT SYSTEMS 9. BINDING PERIPHERIAL TO AN OFFLINE PROCESSOR ( SMART IO DEVICE)

OFFLINE REAL TIME NMI undisturbed ( interrupt-less ) accurate PROGRAM SIZE best at many small programs ISOLATION easier to analyze SERIALIZATION Full preemption control SPEED-UP linear – nearly up to BUS contention CPU QUIESCE No need to walk through a quiesce state PATCH OVERHEAD Can be used with any Linux kernel that supports processor un-plugging

OFFLINE REAL TIME - OFFLETS OFFLET is a context running NMI outside the operating system OFFLET can be scheduled to a target processor and in a specific point in time.... int cpu_idx=3; offlet x;.... offsched_schedule(&x,11,cpu_idx,my_arg); schedule an offlet to run on processor 3 in 11 time units from now.

The Minimum Patch #ifdef CONFIG_HOTPLUG_CPU +void (*hotplug_cpu_dead)(void); +EXPORT_SYMBOL(hotplug_cpu_dead); DECLARE_PER_CPU(int, cpu_state); #include __get_cpu_var(cpu_state) = CPU_DEAD; local_irq_disable(); +if (hotplug_cpu_dead) +hotplug_cpu_dead(); while (1) halt(); } -1265, ,6 /* They ack this in play_dead by setting CPU_DEAD */ if (per_cpu(cpu_state, cpu) == CPU_DEAD) { - if (1 == num_online_cpus()) - alternatives_smp_switch(0); return; } msleep(100); This patch does not include the memory allocation/de-allocation and offline napi.

Real Time example - 1us timer

Real Time example - 1us timer pros and cons cons 1. no need in low resolution timers 2. use TICKLESS if can. 3. if the transition from the offlet to the application is too complicated. pros 1. the timer interrupt might be nested. 2. amount of work is too much to be handled in interrupt context. 3. Timer deadline varies bellow the defined resolution 4. No HPET available 5. 3% HPET overhead is too much.

ISOLATION EXAMPLE - RTOP How do we know what happens in a system when this system is not accessible ? OFFLINE solution: run a monitoring tool outside the operating system.

ISOLATION EXAMPLE - RTOP

ISOLATION EXAMPLE – OFFLINE NAPI

Pros 1. RX disabling latency 2. IRQ masking latency 3. Rotting Packet 4. SMP IRQ affinity Cons cost a processor

USES 1. HIGH VOLUME DEVICES 2. DELICATE LATENCY IN KERNEL SPACE 3. INTEL I/OAT DMA LIKE

Acknowledgments Jeff Roberson for creating the first implementation of the offline scheduler.