Interrupt Handler Migration and Direct Interrupt Scheduling for Rapid Scheduling of Interrupt-driven Tasks Reviewer: Kim, Hyukjoong ESLab.

Slides:



Advertisements
Similar presentations
Introduction to Embedded Systems Resource Management - III Lecture 19.
Advertisements

Tutorial 3 - Linux Interrupt Handling -
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Resource Containers: A new Facility for Resource Management in Server Systems G. Banga, P. Druschel,
Bilgisayar Mühendisliği Bölümü GYTE - Bilgisayar Mühendisliği Bölümü Multithreading the SunOS Kernel J. R. Eykholt, S. R. Kleiman, S. Barton, R. Faulkner,
Flash: An efficient and portable Web server Authors: Vivek S. Pai, Peter Druschel, Willy Zwaenepoel Presented at the Usenix Technical Conference, June.
Fast Paths in Concurrent Programs Wen Xu, Princeton University Sanjeev Kumar, Intel Labs. Kai Li, Princeton University.
Chapter 7 Protocol Software On A Conventional Processor.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Chapter 5 Processes and Threads Copyright © 2008.
Tiny OS Optimistic Lightweight Interrupt Handler Simon Yau Alan Shieh CS252, CS262A, Fall The.
Supporting Time-sensitive Application on a Commodity OS Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presented by Wen Sun Some Slides.
Improving IPC by Kernel Design Jochen Liedtke Shane Matthews Portland State University.
Supporting Time-sensitive Application on a Commodity OS By Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presenter: Shuping Tien.
1 Inferring Scheduling Behavior with Hourglass John Regehr School of Computing, University of Utah 6/14/2002.
CS533 Concepts of Operating Systems Class 7 Integrated Task and Stack Management.
CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management.
Protocol Implementation An Engineering Approach to Computer Networking.
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Comparative Operating Systems Fall 2001 An Examination of Embedded Linux as a Real Time Operating System Mark Mahoney.
1Chapter 05, Fall 2008 CPU Scheduling The CPU scheduler (sometimes called the dispatcher or short-term scheduler): Selects a process from the ready queue.
Performance Evaluation of Real-Time Operating Systems
Synchronization and Scheduling in Multiprocessor Operating Systems
Exception and Interrupt Handling
Introduction to Embedded Systems
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.
Linux and Real Time Real-time systems are characterized by deadlines. When a missed deadline results in inconvenience or a diminished customer experience,
Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker.
Fast Multi-Threading on Shared Memory Multi-Processors Joseph Cordina B.Sc. Computer Science and Physics Year IV.
Scheduling Basic scheduling policies, for OS schedulers (threads, tasks, processes) or thread library schedulers Review of Context Switching overheads.
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.
Scheduling Strategies Operating Systems Spring 2004 Class #10.
Real-Time Systems Design1 Priority Inversion When a low-priority task blocks a higher-priority one, a priority inversion is said to occur Assume that priorities:
Processes and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
Cpr E 308 Spring 2004 Real-time Scheduling Provide time guarantees Upper bound on response times –Programmer’s job! –Every level of the system Soft versus.
1 Process Scheduling in Multiprocessor and Multithreaded Systems Matt Davis CS5354/7/2003.
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
Fall 2013 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
CSE 451: Operating Systems Section 5 Midterm review.
ECE 720T5 Fall 2012 Cyber-Physical Systems Rodolfo Pellizzoni.
The Performance of μ-Kernel-Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presenter: Sunita Marathe.
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Oindrila.
Multithreaded Programing. Outline Overview of threads Threads Multithreaded Models  Many-to-One  One-to-One  Many-to-Many Thread Libraries  Pthread.
ITFN 2601 Introduction to Operating Systems Lecture 4 Scheduling.
Real Time System with MVL. © 2007 MontaVista Confidential | Overview of MontaVista Agenda Why Linux Real Time? Linux Kernel Scheduler Linux RT technology.
Lecture 27 Multiprocessor Scheduling. Last lecture: VMM Two old problems: CPU virtualization and memory virtualization I/O virtualization Today Issues.
Lab 4 : Real-Time OS Team #7 P 李彥勳 P 謝嵩淮 R 侯凱文.
CORE Lab. E.E. 1 Soft timers : efficient microsecond so ftware timer support for network proc essing Mohit Aron and Peter Druschel 17 th ACM Symposium.
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.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
Interrupts and Interrupt Handling David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Bolt : Faster Reconfiguration in Operating Systems Sankaralingam Panneerselvam Michael M. Swift Nam Sung Kim University of Wisconsin, Madison, WI ATC 2015.
Preventing Interrupt Overload Presented by Jiyong Park Seoul National University, Korea John Regehr, Usit Duogsaa, School of Computing, University.
REAL-TIME OPERATING SYSTEMS
Linux Realtime Preemption and Its Impact on ULDD* - Progress Report -
CS 6560: Operating Systems Design
Realtime Linux Clark Williams Tech Lead
Thread Fundamentals Header Advanced .NET Threading, Part 1
Midterm Review David Ferry, Chris Gill
Networks and Operating Systems: Exercise Session 2
Semester Review Chris Gill CSE 422S - Operating Systems Organization
Threads & multithreading
Chapter 15 – Part 1 The Internal Operating System
Lecture Topics: 11/1 General Operating System Concepts Processes
CPU scheduling decisions may take place when a process:
Top Half / Bottom Half Processing
February 5, 2004 Adrienne Noble
Supporting Time-Sensitive Applications on a Commodity OS
CS 5204 Operating Systems Lecture 5
Presentation transcript:

Interrupt Handler Migration and Direct Interrupt Scheduling for Rapid Scheduling of Interrupt-driven Tasks Reviewer: Kim, Hyukjoong ESLab

2/26 Embedded Software Lab. Abstract To minimize the scheduling latency of high-priority interrupt-driven tasks Interrupt Handler Migration(IHM) –Avoid additional context switch –Improve cache hit ratio Direct Interrupt Scheduling(DIS) –Non-deferrable Interrupt vs. Deferrable Interrupt –Urgent interrupt -> handle fast Experimental result Linux kernel with real-time patches scheduling latency is reduced by up to 84.2%(at both IHM, DIS), and as low as hard-ware specific limitations(at ARM based CPU 200MHz)

3/26 Embedded Software Lab. Introduction IHM(Interrupt Handler Migration) Avoid context switch overhead Improve cache hit ratio DIS(Direct Interrupt Scheduling) Determine ‘Is these urgent interrupt-process pairs? or not?’ If urgent, reserved shortest path can be used.

4/26 Embedded Software Lab. Related Work –Preemptibility of Linux Spinlock-based approach non-preemptible -> preemptible Spinlock session -> non-preemptible session Disadvantage: even can’t execute Spinlock-to-mutex approach Spinlock -> mutex Non-preemptible only when necessary mutex is already locked. Disadvantage: considerable delay -> at least two context switches Delayed locking technique Rearrange preemptible & non-preemptible session –Interrupt prediction & lock hold time prediction Delaying lock-hold task & wait interrupt, handle high priority process

5/26 Embedded Software Lab. Related Work –Interrupt Handler Thread Interrupt handler with interrupt context Interrupt handling: non-preemptible Interrupt handler thread Interrupt handling: interrupt context -> thread context additional context switch per interrupt arrival Lazy Receiver Processing(LRP) On network protocol environment Network protocol processing(originally handled in the interrupt context) is performed lazily in target process. aim to improve fairness, stability, throughput do not consider the interrupt handler thread, only on network interrupt need to redesign UDP/TCP protocol stacks

6/26 Embedded Software Lab. IHM –Basic Concept IHM(Interrupt Handler Migration) kernel wakes up the target process(not iht) call the interrupt handler function in its own context enter original entry point

7/26 Embedded Software Lab. IHM –Basic Concept(cont) IHM’s additional advantage Improving the cache hit ratio Resolving the priority inversion problem Improving interrupt accounting Following questions for IHM if miss-predict for target process if multiple processes are waiting for the same interrupt source if multiple number of interrupt handler threads are interposed

8/26 Embedded Software Lab. IHM –Basic Operation

9/26 Embedded Software Lab. IHM –Basic Operation(cont)

10/26 Embedded Software Lab. IHM –Operation under multiple processes If target process can be predicted? early demultiplexing

11/26 Embedded Software Lab. IHM –Operation under multiple IHT

12/26 Embedded Software Lab. IHM –Resolving the Priority Inversion P1 > P2 > interrupt

13/26 Embedded Software Lab. DIS –Basic Concept If interrupt is urgent -> activated process also urgent not on scheduler, directly schedule activated process Separate OS latency(between interrupt arrival and target process start) into non-deferrable deferrable

14/26 Embedded Software Lab. DIS -Operation

15/26 Embedded Software Lab. DIS –Operation(cont) Deferrable operations recording the current time calculating & updating time-dependent variables of the prev process updating performance statistics changing the sates of the prev process Deferred operations should be treated immediately after handling target process. Change on target process priority Apply DIS to real-time processes only(used on this paper) Execute the adjust block before the check block Recalculate the updated priority of the target process in advance

16/26 Embedded Software Lab. Implementation Prototype was implemented based on the Linux added Ingo Molnar’s real-time patch: hardirq, softirq handler threads applied spinlock-to-mutex conversion modified the kernel related to the interrupt processing and scheduling Recent version of(in paper) Linux is ARM-based Linux kernel: most recent is has same problem with OS latency –additional context switches by interrupt handler thread –interrupt-driven priority inversion problem –real-time process is still activated on scheduler

17/26 Embedded Software Lab. Implementation –Pseudo code for IHM

18/26 Embedded Software Lab. Implementation –Pseudo code for DIS

19/26 Embedded Software Lab. Implementation –Additional Issues Deferring Address Space Switching(LAS)

20/26 Embedded Software Lab. Experiments Experimental Setup ARM-based embedded evaluation board –Intel PXA270 processor(ARM920T core) 200MHz –128MB DRAM –10Mbps ethernet transceiver Linux with Ingo Molnar’s real-time patch, IHM and DIS Processes used in the experiments Timer_task: sleeps while waiting for a ‘urgent’ timer interrupt Net_task: sleeps while waiting for a network packet Calc_task: repeats calculation. Disturbing & low priority process Schemes used in the experiments baseline with IHM with IHM and DIS

21/26 Embedded Software Lab. Experiments -1 Process waiting for a Timer

22/26 Embedded Software Lab. Experiments -1 Process waiting for a network

23/26 Embedded Software Lab. Experiments -2 Processes waiting for network, timer interrupt

24/26 Embedded Software Lab. Experiments -2 Processes waiting for network

25/26 Embedded Software Lab. Experiments –Effect of mis-prediction of trgt

26/26 Embedded Software Lab. Conclusion IHM(Interrupt Handler Migration) Interrupt handler thread -> target process Reduce context switching overhead Improve cache hit ratio LAS(Lazy Address space Switching) DIS(Direct Interrupt Scheduling) Urgent interrupt & target process -> handle together Minimize scheduling overhead for urgent process