How Linux RT_PREEMPT Works
|
|
- Lucinda Miles
- 5 years ago
- Views:
Transcription
1
2 How Linux RT_PREEMPT Works A common observation about real time systems is that the cost of the increased determinism of real time is decreased throughput and increased average latency. This presentation enumerates some of the design choices and implementation that enable Linux PREEMPT_RT_FULL real time and the resulting performance implications. Frank Rowand, Sony Network Entertainment September 20, _1647
3 The Trade-off The cost of the increased determinism of real time - Increased average latency - Decreased throughput
4 Some Random Data Compare the latency of an application on kernels built with: 1) CONFIG_PREEMPT_NONE 2) CONFIG_PREEMPT_RT_FULL
5 Some Random Data Test System: - ARM11 MPCore development system - 4 cpus Mhz processor clock - L1 cache 64 Kbyte per processor - L2 cache 1 Mbyte unified - Linux rt17
6
7 Latency (Response Time) Kernel without RT patchset: + smaller average + smaller minimum - larger maximum PREEMPT RT enabled: - larger average - larger minimum + smaller maximum + more consistent
8 Statistics Min Avg Max PREEMPT_NONE PREEMPT_RT_FULL
9 Latency (Response Time) Next graph shows an old kernel, circa 2009 Hardware configuration: unknown, server class
10 Red Hat Enterprise Linux Red Hat MRG tuned Messaging Workload source: Red Hat
11 The Trade-off The previous graphs illustrate real results on: - variety of kernel versions - range of hardware, from embedded to server
12 The Trade-off The cost of the increased determinism of real time - Increased average latency - Decreased throughput
13 Some Random Data Compare the throughput of an application on kernels built with: 1) CONFIG_PREEMPT_NONE 2) CONFIG_PREEMPT_RT_FULL
14 Some Random Data The workload I used for the throughput results - is not realistic - is not reasonable - violates real time application design rules - is stupid! - but was easy to implement...
15 Some Random Data Test System (same as first test system): - ARM11 MPCore development system - 4 cpus Mhz processor clock - L1 cache 64 Kbyte per processor - L2 cache 1 Mbyte unified - Linux rt17
16 Test Variables UP vs SMP SMP, maxcpus=4 vs SMP maxcpus=1 workload: SCHED_FIFO vs SCHED_NORMAL 1, 2, or 4 instances of the workload Permutations of variables results in 10 tests
17 Test Data The following graphs show the duration of each test. Longer duration means lower throughput, so larger duration is worse throughput.
18
19
20
21 The Trade-off The previous graphs illustrate real results on: - variety of test loads - range of hardware, UP and SMP
22 The Trade-off The cost of the increased determinism of real time - Increased average latency - Decreased throughput
23 What Latency Can I Expect? It depends...
24
25
26 Part 2 This presentation enumerates some of the design choices and implementation that enable Linux PREEMPT_RT_FULL real time and the resulting performance implications.
27 Real Time 001 Working definition of latency The duration of time from when an event occurs until real time application code begins to execute.
28 Real Time 001 Examples of events - hardware clock (timer expires) - switch closes - optical sensor triggers - changed data between video frames predicts contact of beer bottle by robotic hand
29 Real Time 001 Working definition of deadline Maximum allowable elapsed time after event for RT code to begin executing + RT code to respond to the event
30 Real Time 001 deadline = latency + RT execution (1) Max allowed latency = deadline - max RT execution (2) Max allowed RT execution = deadline - max latency (1) max RT executed is a given (2) max latency is a given
31 Real Time 001 deadline = latency + RT execution (1) Max allowed latency = deadline - max RT execution (2) Max allowed RT execution = deadline - max latency (1) is a kernel developer's view (2) is a real time app developer's view
32 Real Time 001 deadline = latency + RT execution (1) Max allowed latency = deadline - max RT execution (1) is a kernel developer's view This presentation is the kernel developer's view
33 Required for Real-Time - Deterministic latency small enough to meet deadline - Real-time is NOT real-fast But fast (small latency) is often required in order to meet real-time application deadline.
34 Components of Latency while kernel code is not allowed to process event - interrupts disabled
35 Components of Latency cost of kernel code path to process event - save processor state - decode and acknowledge IRQ - driver handles device and transfers data - wake up real time thread
36 Components of Latency while RT code is not allowed to run - interrupts disabled - preemption disabled
37 Components of Latency cost of kernel code path to schedule RT task
38 Components of Latency while kernel code is not allowed to process event - interrupts disabled cost of kernel code path to process event while RT code is not allowed to run - interrupts disabled - preemption disabled cost of kernel code path to schedule RT task
39 Critical Components of Latency while kernel code is not allowed to process event - interrupts disabled cost of kernel code path to process event while RT code is not allowed to run - interrupts disabled - preemption disabled cost of kernel code path to schedule RT task
40 Side track... Q. How can the developer of a real time system negatively impact latency? A. Invoke code that leads to: - interrupts disabled - preemption disabled - block on lock
41 Features enabling real-time Linux - preemptible kernel - locking - threaded interrupt handlers - threaded softirq
42 Non-Preemptible Kernel When a task invokes a system call, the system call must complete (or sleep due to blocking on a resource) before another task can be scheduled. Preemption can not occur during the execution of the system call.
43 Non-Preemptible Kernel Preemption can not occur during the execution of the system call. Scheduling may occur on: - completion of system call - system call sleeping
44 Non-Preemptible Kernel Problems of typical non-preemptible kernel: - kernel path lengths non-deterministic - longest kernel path has long duration - large variance in kernel path length
45 Non-Preemptible Kernel Next slide illustrates non-preemptible kernel.
46 syscall external syscall event completes RT task Normal task syscall IRQ handler wake RT task RT task runs
47 Non-Preemptible Kernel Next slide illustrates non-preemptible kernel. Adding some complexity: - 2 external events occur - lock (critical section) during syscall
48 critical section syscall external syscall events completes RT task Normal task syscall IRQ 1 handler IRQ 2 handler wake RT task RT task runs
49 Preemptible Kernel Mainline 2.6 and 3.0 kernel CONFIG_PREEMPT_NONE No forced kernel preemption CONFIG_PREEMPT_VOLUNTARY Explicit preemption points in kernel CONFIG_PREEMPT All kernel code (not in critical section) preemptible
50 Preemptible Kernel RT_PREEMPT patch renames config option: Vanilla 2.6 kernel CONFIG_PREEMPT RT_PREEMPT 2.6 kernel CONFIG_PREEMPT_DESKTOP
51 Preemptible Kernel RT_PREEMPT patch renames config option: Vanilla 3.0 kernel CONFIG_PREEMPT RT_PREEMPT 3.0 kernel CONFIG_PREEMPT_LL
52 Preemptible Kernel Mainline 2.6 and 3.0 kernel CONFIG_PREEMPT fully preemptible - except when preemption is explicitly disabled - except when interrupts are explicitly disabled - except when a lock is held ( in a critical section )
53 Preemptible Kernel Next slide illustrates preemptible kernel.
54 critical section syscall external syscall events completes RT task Normal task syscall IRQ 1 handler IRQ 2 handler wake RT task RT task runs
55 Score - added 0 schedule with context switch + shorter maximum wakeup latency
56 Preemptible Kernel RT_PREEMPT 2.6 kernel CONFIG_PREEMPT_RT fully preemptible - except when preemption is explicitly disabled - except when interrupts are explicitly disabled - except when a raw spinlock is held
57 Preemptible Kernel RT_PREEMPT 3.0 kernel CONFIG_PREEMPT_RT_FULL fully preemptible - except when preemption is explicitly disabled - except when interrupts are explicitly disabled - except when a raw spinlock is held
58 Preemptible Kernel CONFIG_PREEMPT_RT CONFIG_PREEMPT_RT_FULL Most kernel locks are converted to preemptible priority inheritance mutex. Some kernel locks are converted to non-preemptible raw spinlock.
59 Score: Spinlock vs Mutex Acquire, Release Spinlock shorter code path Mutex longer code path
60 Score: Spinlock vs Mutex Contention Spinlock spin until lock is available Mutex if owner is executing spin until lock is available else sleep, wake when lock is available (2 schedules)
61 Score: Spinlock vs Mutex Result with contention Spinlock is cheaper than mutex if: spinlock lock path + spinlock unlock path + lock contention time < mutex lock path + mutex unlock path + 2 schedules
62 Score: Spinlock vs Mutex Result with contention Previous slide ignores: - extra schedules due to priority inheritance - cache effects
63 Preemptible Kernel Next slide illustrates preemptible kernel with spinlocks converted to mutexes.
64 critical section (mutex) syscall external syscall events completes RT task Normal task syscall IRQ 1 handler IRQ 2 handler wake RT task RT task runs
65 Score - added 0 schedule with context switch + shorter maximum wakeup latency
66 Priority Inheritance Mutex - May result in more schedule events. - Avoids priority inversion. - Typically larger execution cost than spinlock. - Reader-Writer lock limited to one concurrent reader to minimize PI complexity. - Limits scalability of multiple readers.
67 non-pi Mutex Priority Inversion higher number is higher priority A p = 1 B p = 2 C p = 3 A gets lock B wakes C wakes C blocks on lock
68 PI Mutex higher number is higher priority A B C p = 1 p = 3 p = 1 p = 2 p = 3 A gets lock B wakes C wakes C blocks on lock, A boosted to 3 A releases lock, unboosted back to 1, C gets lock
69 Threaded Interrupt Handler
70 Overview Of Interrupt handling algorithm - Save context - Handle highest priority interrupt Interrupt handler executes in interrupt mode irq_exit() may process softirq or wake softirqd - Iterate over active interrupts (arch dependent) - Schedule - Restore context returning either to previous process or to newly scheduled process
71 Overview Of Threaded Interrupt handling algorithm - Save context - Handle highest priority interrupt Wake Interrupt handler thread. irq_exit() may process softirq or wake softirqd - Iterate over active interrupts (arch dependent) - Schedule - Restore context returning either to previous process or to newly scheduled process Interrupt handler thread executes when scheduled.
72 Threaded Interrupt Handler RT_PREEMPT patchset converts almost all drivers to threaded model. (Timer handler executes in interrupt context.)
73 Threaded Interrupt Handler Priorities must be properly set for: - interrupt handler threads - softirq threads - other kernel threads - real time application processes / threads Do not expect default priorities to be proper.
74 Preemptible Kernel Next slide illustrates preemptible kernel with interrupt threads.
75 critical section (mutex) syscall external syscall events completes RT task Normal task syscall IRQ 1 handler IRQ 2 handler wake RT task RT task runs
76 Score - added 2 schedule with context switch + shorter maximum wakeup latency
77 Other Interrupt Overhead
78 Other Interrupt Overhead CONFIG_PREEMPT_RT and CONFIG_PREEMPT_RT_FULL changes: to: irq_exit() may process softirq or wake ksoftirqd thread irq_exit() may wake ksoftirqd thread
79 syscall external syscall events completes RT task Normal task syscall IRQ 1 IRQ 2 softirq
80 syscall external syscall events completes RT task Normal task syscall IRQ 1 IRQ 2 softirq
81 Score - added 1 schedule with context switch + shorter maximum wakeup latency
82 Other Interrupt Overhead raise_softirq(), (softirq trigger) typically called from: irq context (timer softirq) interrupt thread but can be called from anywhere in the kernel. Previous slides show trigger from irq context.
83 Other Locking Overhead CONFIG_TREE_PREEMPT_RCU Evolving in the early 3.0 RT patches... Not analyzed in this presentation.
84 Other Locking Overhead local_lock get_local_var() uses migrate_disable() instead of preempt_disable(). Evolving in the early 3.0 RT patches... Not analyzed in this presentation.
85 Real Life Real systems are much more complicated than the previous diagrams. Other scenarios can generate different performance improvements or penalties.
86 Real Life The flow of control diagrams are not an exhaustive analysis of why and how much PREEMPT_RT_FULL impacts performance metrics. But instead provide scenarios illustrating the impacts.
87 Full Analysis of Overhead Would Include: Lock implementation overhead Reduced concurrency for Reader-Writer locks Increased lock contention, due to sleeping while holding lock Additional schedules Additional context switches
88 Recap: Enabling real-time Linux - preemptible kernel - locking - interrupt handlers - threaded softirq
89 Impact of Real-Time Features + Variance of real-time task latency decreased + Maximum real-time task latency decreased - Average real-time task latency may be increased - Throughput decreased
90 Questions?
91 How to get a copy of the slides 1) leave a business card with me 2) frank.rowand@am.sony.com
92
Real Time Linux patches: history and usage
Real Time Linux patches: history and usage Presentation first given at: FOSDEM 2006 Embedded Development Room See www.fosdem.org Klaas van Gend Field Application Engineer for Europe Why Linux in Real-Time
More informationAdventures In Real-Time Performance Tuning, Part 2
Adventures In Real-Time Performance Tuning, Part 2 The real-time for Linux patchset does not guarantee adequate real-time behavior for all target platforms. When using real-time Linux on a new platform
More informationEvaluation of Real-time Performance in Embedded Linux. Hiraku Toyooka, Hitachi. LinuxCon Europe Hitachi, Ltd All rights reserved.
Evaluation of Real-time Performance in Embedded Linux LinuxCon Europe 2014 Hiraku Toyooka, Hitachi 1 whoami Hiraku Toyooka Software engineer at Hitachi " Working on operating systems Linux (mainly) for
More informationDevelopment of Real-Time Systems with Embedded Linux. Brandon Shibley Senior Solutions Architect Toradex Inc.
Development of Real-Time Systems with Embedded Linux Brandon Shibley Senior Solutions Architect Toradex Inc. Overview Toradex ARM-based System-on-Modules Pin-Compatible SoM Families In-house HW and SW
More informationSupporting Time-sensitive Applications on a Commodity OS
Supporting Time-sensitive Applications on a Commodity OS Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Department of Computer Science and Engineering Oregon Graduate Institute, Portland
More informationMeasuring the impacts of the Preempt-RT patch
Measuring the impacts of the Preempt-RT patch maxime.chevallier@smile.fr October 25, 2017 RT Linux projects Simulation platform : bi-xeon, lots ot RAM 200µs wakeup latency, networking Test bench : Intel
More informationReal-Time Technology in Linux
Real-Time Technology in Linux Sven-Thorsten Dietrich Real-Time Architect Introductions MontaVista Software is a leading global supplier of systems software and development tools for intelligent connected
More informationPreempt-RT Raspberry Linux. VMware Tiejun Chen
Preempt-RT Raspberry Linux VMware Tiejun Chen The declaration of this development This is my personal exploration. This is not a roadmap or commitment from VMware. Agenda Motivation
More informationTesting real-time Linux: What to test and how.
Testing real-time Linux: What to test and how. Sripathi Kodi sripathik@in.ibm.com Agenda IBM Linux Technology Center What is a real-time Operating System? Enterprise real-time Real-Time patches for Linux
More informationUsing and Understanding the Real-Time Cyclictest Benchmark
Using and Understanding the Real-Time Cyclictest Benchmark Cyclictest results are the most frequently cited real-time Linux metric. The core concept of Cyclictest is very simple. However the test options
More informationMultiprocessor Systems. Chapter 8, 8.1
Multiprocessor Systems Chapter 8, 8.1 1 Learning Outcomes An understanding of the structure and limits of multiprocessor hardware. An appreciation of approaches to operating system support for multiprocessor
More informationA TimeSys Perspective on the Linux Preemptible Kernel Version 1.0. White Paper
A TimeSys Perspective on the Linux Preemptible Kernel Version 1.0 White Paper A TimeSys Perspective on the Linux Preemptible Kernel A White Paper from TimeSys Corporation Introduction One of the most basic
More informationRealtime BoF Session RealTime Testing Best Practice of RealTime WG YungJoon Jung
Realtime BoF Session RealTime Testing Best Practice of RealTime WG YungJoon Jung April 15th, 2008 CE Linux Forum 1 Contents Introduction Current RealTime Testing Methods Plan April 15th, 2008 CE Linux
More informationMultiprocessor System. Multiprocessor Systems. Bus Based UMA. Types of Multiprocessors (MPs) Cache Consistency. Bus Based UMA. Chapter 8, 8.
Multiprocessor System Multiprocessor Systems Chapter 8, 8.1 We will look at shared-memory multiprocessors More than one processor sharing the same memory A single CPU can only go so fast Use more than
More informationMultiprocessor Systems. COMP s1
Multiprocessor Systems 1 Multiprocessor System We will look at shared-memory multiprocessors More than one processor sharing the same memory A single CPU can only go so fast Use more than one CPU to improve
More informationReal-Time Performance of Linux. OS Latency
Real-Time Performance of Linux Among others: A Measurement-Based Analysis of the Real- Time Performance of Linux (L. Abeni, A. Goel, C. Krasic, J. Snow, J. Walpole) [RTAS 2002] OS Latency Definition [OS
More informationPROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13
PROCESS SCHEDULING II CS124 Operating Systems Fall 2017-2018, Lecture 13 2 Real-Time Systems Increasingly common to have systems with real-time scheduling requirements Real-time systems are driven by specific
More informationLinux - Not real-time!
Linux - Not real-time! Date: 16.01.2015 Author(s): Michal Koziel www.bitvis.no 1 Abstract A system is said to be real-time if it can respond to external triggers and perform periodic tasks with deterministic
More informationMusings on Analysis of Measurements of a Real-Time Workload
Musings on Analysis of Measurements of a Real-Time Workload Analysis of real-time performance is often focused on the worst case "bad" value, such as maximum latency or maximum interrupt disabled time.
More informationImplementation and Evaluation of the Synchronization Protocol Immediate Priority Ceiling in PREEMPT-RT Linux
Implementation and Evaluation of the Synchronization Protocol Immediate Priority Ceiling in PREEMPT-RT Linux Andreu Carminati, Rômulo Silva de Oliveira, Luís Fernando Friedrich, Rodrigo Lange Federal University
More informationUnderstanding Real Time Linux. Alex Shi
Understanding Real Time Linux Alex Shi Agenda What s real time OS RTL project status RT testing and tracing Reasons of latency and solutions for them Resources Summary What s real time OS Real time and
More informationRealtime Tuning 101. Tuning Applications on Red Hat MRG Realtime Clark Williams
Realtime Tuning 101 Tuning Applications on Red Hat MRG Realtime Clark Williams Agenda Day One Terminology and Concepts Realtime Linux differences from stock Linux Tuning Tools for Tuning Tuning Tools Lab
More informationReservation-Based Scheduling for IRQ Threads
Reservation-Based Scheduling for IRQ Threads Luca Abeni, Nicola Manica, Luigi Palopoli luca.abeni@unitn.it, nicola.manica@gmail.com, palopoli@dit.unitn.it University of Trento, Trento - Italy Reservation-Based
More informationA Comparison of Scheduling Latency in Linux, PREEMPT_RT, and LITMUS RT. Felipe Cerqueira and Björn Brandenburg
A Comparison of Scheduling Latency in Linux, PREEMPT_RT, and LITMUS RT Felipe Cerqueira and Björn Brandenburg July 9th, 2013 1 Linux as a Real-Time OS 2 Linux as a Real-Time OS Optimizing system responsiveness
More informationScheduling, part 2. Don Porter CSE 506
Scheduling, part 2 Don Porter CSE 506 Logical Diagram Binary Memory Formats Allocators Threads Today s Lecture Switching System to CPU Calls RCU scheduling File System Networking Sync User Kernel Memory
More informationEvaluation of uclinux and PREEMPT_RT for Machine Control System
Evaluation of uclinux and PREEMPT_RT for Machine Control System 2014/05/20 Hitachi, Ltd. Yokohama Research Lab Linux Technology Center Yoshihiro Hayashi yoshihiro.hayashi.cd@hitachi.com Agenda 1. Background
More informationProcess management. Scheduling
Process management Scheduling Points of scheduler invocation (recap) User Kernel Return from system call Process Schedule Return from interrupt handler Timer interrupts to ensure OS control Return from
More informationNuttX Realtime Programming
NuttX RTOS NuttX Realtime Programming Gregory Nutt Overview Interrupts Cooperative Scheduling Tasks Work Queues Realtime Schedulers Real Time == == Deterministic Response Latency Stimulus Response Deadline
More informationTimers 1 / 46. Jiffies. Potent and Evil Magic
Timers 1 / 46 Jiffies Each timer tick, a variable called jiffies is incremented It is thus (roughly) the number of HZ since system boot A 32-bit counter incremented at 1000 Hz wraps around in about 50
More informationCSE 120 Principles of Operating Systems
CSE 120 Principles of Operating Systems Spring 2018 Lecture 15: Multicore Geoffrey M. Voelker Multicore Operating Systems We have generally discussed operating systems concepts independent of the number
More informationScheduling - Overview
Scheduling - Overview Quick review of textbook scheduling Linux 2.4 scheduler implementation overview Linux 2.4 scheduler code Modified Linux 2.4 scheduler Linux 2.6 scheduler comments Possible Goals of
More informationThe PREEMPT_RT Approach To Real Time
The PREEMPT_RT Approach To Real Time Wu Zhangjin / Falcon wuzhangjin@gmail.com 泰晓科技 TinyLab.org http://tinylab.org March 21, 2014 The PREEMPT_RT Approach To Real Time March 21, 2014 1 / 51 Overview 1 Introduction
More informationUtilizing Linux Kernel Components in K42 K42 Team modified October 2001
K42 Team modified October 2001 This paper discusses how K42 uses Linux-kernel components to support a wide range of hardware, a full-featured TCP/IP stack and Linux file-systems. An examination of the
More informationEnhancing Linux Scheduler Scalability
Enhancing Linux Scheduler Scalability Mike Kravetz IBM Linux Technology Center Hubertus Franke, Shailabh Nagar, Rajan Ravindran IBM Thomas J. Watson Research Center {mkravetz,frankeh,nagar,rajancr}@us.ibm.com
More informationHow to get realistic C-states latency and residency? Vincent Guittot
How to get realistic C-states latency and residency? Vincent Guittot Agenda Overview Exit latency Enter latency Residency Conclusion Overview Overview PMWG uses hikey960 for testing our dev on b/l system
More informationCSE 4/521 Introduction to Operating Systems
CSE 4/521 Introduction to Operating Systems Lecture 7 Process Synchronization II (Classic Problems of Synchronization, Synchronization Examples) Summer 2018 Overview Objective: 1. To examine several classical
More informationReal-Time Operating Systems Issues. Realtime Scheduling in SunOS 5.0
Real-Time Operating Systems Issues Example of a real-time capable OS: Solaris. S. Khanna, M. Sebree, J.Zolnowsky. Realtime Scheduling in SunOS 5.0. USENIX - Winter 92. Problems with the design of general-purpose
More informationFast on Average, Predictable in the Worst Case
Fast on Average, Predictable in the Worst Case Exploring Real-Time Futexes in LITMUSRT Roy Spliet, Manohar Vanga, Björn Brandenburg, Sven Dziadek IEEE Real-Time Systems Symposium 2014 December 2-5, 2014
More informationSMD149 - Operating Systems
SMD149 - Operating Systems Roland Parviainen November 3, 2005 1 / 45 Outline Overview 2 / 45 Process (tasks) are necessary for concurrency Instance of a program in execution Next invocation of the program
More informationConcurrency Race Conditions and Deadlocks
Concurrency Race Conditions and Deadlocks Kartik Gopalan Chapters 2 (2.3) and 6 Tanenbaum s Modern OS Sequential Loosely, doing many things, but one after another E.g. Finish one assignment, then another
More informationReal-time in embedded Linux systems
Real-time in embedded Linux systems Michael Opdenacker Copyright 2004-2011, Free Electrons. Creative Commons BY-SA 3.0 license Latest update: Nov 2, 2011, Document sources, updates and translations: http://free-electrons.com/docs/realtime
More informationStatus of Linux 3.x Real Time and Changes From 2.6
Status of Linux 3.x Real Time and Changes From 2.6 The current OSADL "Latest Stable" RT version is 2.6.33.7.2-rt30, but the current RT development release has moved forward to Linux 3.2.12. The RT patches
More informationChapter 6 Process Synchronization
Chapter 6 Process Synchronization Cooperating Process process that can affect or be affected by other processes directly share a logical address space (threads) be allowed to share data via files or messages
More informationApplication Testing under Realtime Linux. Luis Claudio R. Gonçalves Red Hat Realtime Team Software Engineer
Application Testing under Realtime Linux Luis Claudio R. Gonçalves Red Hat Realtime Team Software Engineer Agenda * Realtime Basics * Linux and the PREEMPT_RT patch * About the Tests * Looking for bad
More informationData Processing on Modern Hardware
Data Processing on Modern Hardware Jens Teubner, TU Dortmund, DBIS Group jens.teubner@cs.tu-dortmund.de Summer 2014 c Jens Teubner Data Processing on Modern Hardware Summer 2014 1 Part V Execution on Multiple
More informationReal-Time and Performance Improvements in the
1 of 7 6/18/2006 8:21 PM Real-Time and Performance Improvements in the 2.6 Linux Kernel William von Hagen Abstract Work on improving the responsiveness and real-time performance of the Linux kernel holds
More informationComparison of soft real-time CPU scheduling in Linux kernel 2.6 series with Solaris 10
Comparison of soft real-time CPU scheduling in Linux kernel 2.6 series with Solaris 10 Kristoffer Eriksson Philip Frising Department of Computer and Information Science Linköping University 1(15) 1. About
More informationCatching two rabbits: adaptive real-time support for embedded Linux
SOFTWARE PRACTICE AND EXPERIENCE Softw. Pract. Exper. 2009; 39:531 550 Published online 8 December 2008 in Wiley InterScience (www.interscience.wiley.com)..911 Catching two rabbits: adaptive real-time
More informationSTEPS TOWARDS A FULLY PREEMPTABLE LINUX KERNEL. Arnd C. Heursch Dirk Grambow Alexander Horstkotte Helmut Rzehak
STEPS TOWARDS A FULLY PREEMPTABLE LINUX KERNEL Arnd C. Heursch Dirk Grambow Alexander Horstkotte Helmut Rzehak Department of Computer Science, University of Federal Armed Forces, Munich, Werner-Heisenberg-Weg
More informationComputer Science Window-Constrained Process Scheduling for Linux Systems
Window-Constrained Process Scheduling for Linux Systems Richard West Ivan Ganev Karsten Schwan Talk Outline Goals of this research DWCS background DWCS implementation details Design of the experiments
More informationCS 326: Operating Systems. CPU Scheduling. Lecture 6
CS 326: Operating Systems CPU Scheduling Lecture 6 Today s Schedule Agenda? Context Switches and Interrupts Basic Scheduling Algorithms Scheduling with I/O Symmetric multiprocessing 2/7/18 CS 326: Operating
More informationSUSE Linux Enterprise Real Time. Carl Drisko, Linux & Open Source Principal
SUSE Linux Enterprise Real Time Carl Drisko, Linux & Open Source Principal cdrisko@novell.com Customer Results with Real Time 2 Business Results A large investment bank has said that for every 1 millisecond
More informationImplementation Alternatives. Lecture 2: Implementation Alternatives & Concurrent Programming. Current Implementation Alternatives
Lecture 2: Implementation Alternatives & Concurrent ming Implementation Alternatives Controllers can be implemented using a number of techniques [RTCS Ch 3] Implementation Alternatives Processes and threads
More informationAbstract. Testing Parameters. Introduction. Hardware Platform. Native System
Abstract In this paper, we address the latency issue in RT- XEN virtual machines that are available in Xen 4.5. Despite the advantages of applying virtualization to systems, the default credit scheduler
More informationCase Study: Challenges and Benefits in Integrating Real Time patch in PowerPc Based Media System
Case Study: Challenges and Benefits in Integrating Real Time patch in PowerPc Based Media System Manikandan Ramachandran Infosys Technologies Limited Electronic City, Hosur Road, Bengaluru 560100,India
More informationProcess & Thread Management II. Queues. Sleep() and Sleep Queues CIS 657
Process & Thread Management II CIS 657 Queues Run queues: hold threads ready to execute Not a single ready queue; 64 queues All threads in same queue are treated as same priority Sleep queues: hold threads
More informationProcess & Thread Management II CIS 657
Process & Thread Management II CIS 657 Queues Run queues: hold threads ready to execute Not a single ready queue; 64 queues All threads in same queue are treated as same priority Sleep queues: hold threads
More informationSUSE Linux Enterprise Real Time
SUSE Linux Enterprise Real Time Matthias Nagorni Product Manager SUSE Linux Enterprise 22. März 2007 What is SUSE Linux Enterprise Real Time? An add-on to SUSE Linux Enterprise Server providing deterministic
More informationShielded Processors: Guaranteeing Sub-millisecond Response in Standard Linux
Shielded Processors: Guaranteeing Sub-millisecond Response in Standard Linux Steve Brosky and Steve Rotolo Concurrent Computer Corporation 2881 Gateway Drive, Pompano Beach, FL 33069 Abstract The low latency
More informationKernel Korner Kernel Locking Techniques
Kernel Korner Kernel Locking Techniques Robert explains the various locking primitives in the Linux kernel, why you need them and how kernel developers can use them to write safe code. by Robert Love Proper
More informationMicrokernel Construction
Real-Time Scheduling Preemptive Priority-Based Scheduling User assigns each thread a set of scheduling attributes (time quantum, priority) When the current thread s time quantum is exhausted, the kernel
More informationScheduling policy. Reference: ULK3e 7.1. Scheduling in Linux 1 / 20
Scheduling policy Reference: ULK3e 7.1. Goals fast process response time good throughput for background jobs avoidance of process starvation reconciliation of needs of low- and high-priority processes
More informationAdvanced Operating Systems (CS 202) Scheduling (2)
Advanced Operating Systems (CS 202) Scheduling (2) Lottery Scheduling 2 2 2 Problems with Traditional schedulers Priority systems are ad hoc: highest priority always wins Try to support fair share by adjusting
More informationThe Deadlock Lecture
Concurrent systems Lecture 4: Deadlock, Livelock, and Priority Inversion DrRobert N. M. Watson The Deadlock Lecture 1 Reminder from last time Multi-Reader Single-Writer (MRSW) locks Alternatives to semaphores/locks:
More informationSporadic Server Scheduling in Linux Theory vs. Practice. Mark Stanovich Theodore Baker Andy Wang
Sporadic Server Scheduling in Linux Theory vs. Practice Mark Stanovich Theodore Baker Andy Wang Real-Time Scheduling Theory Analysis techniques to design a system to meet timing constraints Schedulability
More informationOperating Systems. Process scheduling. Thomas Ropars.
1 Operating Systems Process scheduling Thomas Ropars thomas.ropars@univ-grenoble-alpes.fr 2018 References The content of these lectures is inspired by: The lecture notes of Renaud Lachaize. The lecture
More informationKernels and Locking. Luca Abeni
Kernels and Locking Luca Abeni luca.abeni@santannapisa.it Critical Sections in Kernel Code Old Linux kernels used to be non-preemptable... Kernel Big critical section Mutual exclusion was not a problem...
More information2. Which of the following resources is not one which can result in deadlocking processes? a. a disk file b. a semaphore c. the central processor (CPU)
CSCI 4500 / 8506 Sample Questions for Quiz 4 Covers Modules 7 and 8 1. Deadlock occurs when each process in a set of processes a. is taking a very long time to complete. b. is waiting for an event (or
More informationADVANCED trouble-shooting of real-time systems. Bernd Hufmann, Ericsson
ADVANCED trouble-shooting of real-time systems Bernd Hufmann, Ericsson AGENDA 1 Introduction 2 3 Timing Analysis 4 References 5 Q&A Trace Compass Overview ADVANCED trouble-shooting of critical real-time
More informationSynchronization. CSE 2431: Introduction to Operating Systems Reading: Chapter 5, [OSC] (except Section 5.10)
Synchronization CSE 2431: Introduction to Operating Systems Reading: Chapter 5, [OSC] (except Section 5.10) 1 Outline Critical region and mutual exclusion Mutual exclusion using busy waiting Sleep and
More informationImplementation and Evaluation of the Synchronization Protocol Immediate Priority Ceiling in PREEMPT-RT Linux
Implementation and Evaluation of the Synchronization Protocol Immediate Priority Ceiling in PREEMPT-RT Linux Andreu Carminati, Rômulo Silva de Oliveira, Luís Fernando Friedrich, Rodrigo Lange Federal University
More informationChapter 6: CPU Scheduling. Operating System Concepts 9 th Edition
Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time
More informationKernel Synchronization I. Changwoo Min
1 Kernel Synchronization I Changwoo Min 2 Summary of last lectures Tools: building, exploring, and debugging Linux kernel Core kernel infrastructure syscall, module, kernel data structures Process management
More informationReal-time Support in Operating Systems
Real-time Support in Operating Systems Colin Perkins teaching/2003-2004/rtes4/lecture11.pdf Lecture Outline Overview of the rest of the module Real-time support in operating systems Overview of concepts
More informationCHAPTER 6: PROCESS SYNCHRONIZATION
CHAPTER 6: PROCESS SYNCHRONIZATION The slides do not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. TOPICS Background
More informationPROCESS SCHEDULING Operating Systems Design Euiseong Seo
PROCESS SCHEDULING 2017 Operating Systems Design Euiseong Seo (euiseong@skku.edu) Histogram of CPU Burst Cycles Alternating Sequence of CPU and IO Processor Scheduling Selects from among the processes
More informationAnalysis of the BFS Scheduler in FreeBSD
CS2106R Final Report Analysis of the BFS Scheduler in FreeBSD By Vaarnan Drolia Department of Computer Science School of Computing National University of Singapore 2011/12 CS2106R Final Report Analysis
More informationL4-Linux Based System As A Platform For EPICS ioccore
L4-Linux Based System As A Platform For EPICS ioccore J. Odagiri, N. Yamamoto and T. Katoh High Energy Research Accelerator Organization, KEK ICALEPCS 2001, Nov 28, San Jose Contents Backgrounds Causes
More informationPerformance Evaluation of Xenomai 3
Performance Evaluation of Xenomai 3 Ching-Chun (Jim) Huang **, Chan-Hsiang Lin **, and Che-Kang Wu * * Department of Computer Science and Information Engineering, National Cheng Kung University, Taiwan
More informationCPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )
CPU Scheduling CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections 6.7.2 6.8) 1 Contents Why Scheduling? Basic Concepts of Scheduling Scheduling Criteria A Basic Scheduling
More informationChapter 6: Process Synchronization
Chapter 6: Process Synchronization Chapter 6: Process Synchronization Background The Critical-Section Problem Peterson s Solution Synchronization Hardware Mutex Locks Semaphores Classic Problems of Synchronization
More informationReview of the Stable Realtime Release Process
Review of the Stable Realtime Release Process An unscientific, slightly opinionated stab at the current status... With the intent of generating some discussion. Frank Rowand, Sony Network Entertainment
More informationComputer Systems Assignment 4: Scheduling and I/O
Autumn Term 018 Distributed Computing Computer Systems Assignment : Scheduling and I/O Assigned on: October 19, 018 1 Scheduling The following table describes tasks to be scheduled. The table contains
More informationOperating System Design and Implementation
Operating System Design and Implementation Kernel Synchronization Shiao Li Tsao Why Kernel Synchroni zation Semaphor es and Mutexes Atomic Operation s Other mechanis ms Spin Lock Summary 國立交通大學資訊工程學系曹孝櫟老師
More informationMultiprocessors and Locking
Types of Multiprocessors (MPs) Uniform memory-access (UMA) MP Access to all memory occurs at the same speed for all processors. Multiprocessors and Locking COMP9242 2008/S2 Week 12 Part 1 Non-uniform memory-access
More informationCPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)
CPU Scheduling Daniel Mosse (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013) Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process
More informationOperating Systems Antonio Vivace revision 4 Licensed under GPLv3
Operating Systems Antonio Vivace - 2016 revision 4 Licensed under GPLv3 Process Synchronization Background A cooperating process can share directly a logical address space (code, data) or share data through
More informationCSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke
CSCI-GA.2250-001 Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke frankeh@cs.nyu.edu Processes Vs Threads The unit of dispatching is referred to as a thread or lightweight
More informationThe read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with Linux
ibms-47-02-01 Š Page 1 The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with Linux & D. Guniguntala P. E. McKenney J. Triplett J. Walpole Read-copy
More informationChapter 6: Process Synchronization. Operating System Concepts 9 th Edit9on
Chapter 6: Process Synchronization Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Objectives To present the concept of process synchronization. To introduce the critical-section
More informationReminder from last time
Concurrent systems Lecture 2: More mutual exclusion, semaphores, and producer-consumer relationships DrRobert N. M. Watson 1 Reminder from last time Definition of a concurrent system Origins of concurrency
More informationCS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University
CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):
More informationCS Computer Systems. Lecture 6: Process Scheduling
CS 5600 Computer Systems Lecture 6: Process Scheduling Scheduling Basics Simple Schedulers Priority Schedulers Fair Share Schedulers Multi-CPU Scheduling Case Study: The Linux Kernel 2 Setting the Stage
More informationChapter 5: CPU Scheduling
Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm Evaluation Chapter 5: CPU Scheduling
More informationOperating systems and concurrency (B10)
Operating systems and concurrency (B10) David Kendall Northumbria University David Kendall (Northumbria University) Operating systems and concurrency (B10) 1 / 26 Introduction This lecture looks at Some
More informationLesson 6: Process Synchronization
Lesson 6: Process Synchronization Chapter 5: Process Synchronization Background The Critical-Section Problem Peterson s Solution Synchronization Hardware Mutex Locks Semaphores Classic Problems of Synchronization
More informationCS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University
Frequently asked questions from the previous class survey CS 370: SYSTEM ARCHITECTURE & SOFTWARE [CPU SCHEDULING] Shrideep Pallickara Computer Science Colorado State University OpenMP compiler directives
More informationLatency on preemptible Real-Time Linux
Appendix 1 Latency on preemptible Real-Time Linux on DCP-SH7780 Contents 1.1 Getting Started.......................................... 1 1.2 Rtrtc Driver........................................... 2 1.3
More informationAUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann
AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel Alexander Züpke, Marc Bommert, Daniel Lohmann alexander.zuepke@hs-rm.de, marc.bommert@hs-rm.de, lohmann@cs.fau.de Motivation Automotive and Avionic industry
More informationMore on Synchronization and Deadlock
Examples of OS Kernel Synchronization More on Synchronization and Deadlock Two processes making system calls to read/write on the same file, leading to possible race condition on the file system data structures
More information