Download presentation
Presentation is loading. Please wait.
Published bySharyl Florence Anthony Modified over 8 years ago
1
Interrupt Handler Migration and Direct Interrupt Scheduling for Rapid Scheduling of Interrupt-driven Tasks Reviewer: Kim, Hyukjoong ESLab
2
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 2.6.19 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
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
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
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
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
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
8/26 Embedded Software Lab. IHM –Basic Operation
9
9/26 Embedded Software Lab. IHM –Basic Operation(cont)
10
10/26 Embedded Software Lab. IHM –Operation under multiple processes If target process can be predicted? early demultiplexing
11
11/26 Embedded Software Lab. IHM –Operation under multiple IHT
12
12/26 Embedded Software Lab. IHM –Resolving the Priority Inversion P1 > P2 > interrupt
13
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
14/26 Embedded Software Lab. DIS -Operation
15
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
16/26 Embedded Software Lab. Implementation Prototype was implemented based on the Linux 2.6.19 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 2.6.29 ARM-based Linux kernel: most recent is 2.6.19 2.6.29 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
17/26 Embedded Software Lab. Implementation –Pseudo code for IHM
18
18/26 Embedded Software Lab. Implementation –Pseudo code for DIS
19
19/26 Embedded Software Lab. Implementation –Additional Issues Deferring Address Space Switching(LAS)
20
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 2.6.19 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
21/26 Embedded Software Lab. Experiments -1 Process waiting for a Timer
22
22/26 Embedded Software Lab. Experiments -1 Process waiting for a network
23
23/26 Embedded Software Lab. Experiments -2 Processes waiting for network, timer interrupt
24
24/26 Embedded Software Lab. Experiments -2 Processes waiting for network
25
25/26 Embedded Software Lab. Experiments –Effect of mis-prediction of trgt
26
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.