Is Parallel Programming Hard, And, If So, What Can You Do About It?

Total Page:16

File Type:pdf, Size:1020Kb

Is Parallel Programming Hard, And, If So, What Can You Do About It? Is Parallel Programming Hard, And, If So, What Can You Do About It? Edited by: Paul E. McKenney Linux Technology Center IBM Beaverton [email protected] January 2, 2017 ii Legal Statement This work represents the views of the editor and the authors and does not necessarily represent the view of their respective employers. Trademarks: • IBM, zSeries, and PowerPC are trademarks or registered trademarks of Interna- tional Business Machines Corporation in the United States, other countries, or both. • Linux is a registered trademark of Linus Torvalds. • i386 is a trademark of Intel Corporation or its subsidiaries in the United States, other countries, or both. • Other company, product, and service names may be trademarks or service marks of such companies. The non-source-code text and images in this document are provided under the terms of the Creative Commons Attribution-Share Alike 3.0 United States license.1 In brief, you may use the contents of this document for any purpose, personal, commercial, or otherwise, so long as attribution to the authors is maintained. Likewise, the document may be modified, and derivative works and translations made available, so long as such modifications and derivations are offered to the public on equal terms as the non-source-code text and images in the original document. Source code is covered by various versions of the GPL.2 Some of this code is GPLv2-only, as it derives from the Linux kernel, while other code is GPLv2-or-later. See the comment headers of the individual source files within the CodeSamples directory in the git archive3 for the exact licenses. If you are unsure of the license for a given code fragment, you should assume GPLv2-only. Combined work © 2005-2016 by Paul E. McKenney. 1 http://creativecommons.org/licenses/by-sa/3.0/us/ 2 http://www.gnu.org/licenses/gpl-2.0.html 3 git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/perfbook.git Contents 1 How To Use This Book 1 1.1 Roadmap . .1 1.2 Quick Quizzes . .2 1.3 Alternatives to This Book . .3 1.4 Sample Source Code . .4 1.5 Whose Book Is This? . .4 2 Introduction 7 2.1 Historic Parallel Programming Difficulties . .7 2.2 Parallel Programming Goals . .9 2.2.1 Performance . .9 2.2.2 Productivity . 11 2.2.3 Generality . 12 2.3 Alternatives to Parallel Programming . 14 2.3.1 Multiple Instances of a Sequential Application . 15 2.3.2 Use Existing Parallel Software . 15 2.3.3 Performance Optimization . 15 2.4 What Makes Parallel Programming Hard? . 16 2.4.1 Work Partitioning . 17 2.4.2 Parallel Access Control . 18 2.4.3 Resource Partitioning and Replication . 18 2.4.4 Interacting With Hardware . 19 2.4.5 Composite Capabilities . 19 2.4.6 How Do Languages and Environments Assist With These Tasks? 19 2.5 Discussion . 20 3 Hardware and its Habits 21 3.1 Overview . 21 3.1.1 Pipelined CPUs . 21 3.1.2 Memory References . 23 3.1.3 Atomic Operations . 24 3.1.4 Memory Barriers . 25 3.1.5 Cache Misses . 26 3.1.6 I/O Operations . 26 3.2 Overheads . 27 3.2.1 Hardware System Architecture . 27 3.2.2 Costs of Operations . 28 3.3 Hardware Free Lunch? . 30 iii iv CONTENTS 3.3.1 3D Integration . 31 3.3.2 Novel Materials and Processes . 31 3.3.3 Light, Not Electrons . 32 3.3.4 Special-Purpose Accelerators . 32 3.3.5 Existing Parallel Software . 33 3.4 Software Design Implications . 33 4 Tools of the Trade 35 4.1 Scripting Languages . 35 4.2 POSIX Multiprocessing . 36 4.2.1 POSIX Process Creation and Destruction . 36 4.2.2 POSIX Thread Creation and Destruction . 38 4.2.3 POSIX Locking . 39 4.2.4 POSIX Reader-Writer Locking . 42 4.2.5 Atomic Operations (gcc Classic) . 45 4.2.6 Atomic Operations (C11) . 46 4.2.7 Per-Thread Variables . 47 4.3 Alternatives to POSIX Operations . 47 4.3.1 Organization and Initialization . 47 4.3.2 Thread Creation, Destruction, and Control . 47 4.3.3 Locking . 49 4.3.4 Atomic Operations . 51 4.3.5 Per-CPU Variables . 51 4.3.6 Performance . 53 4.4 The Right Tool for the Job: How to Choose? . 53 5 Counting 55 5.1 Why Isn’t Concurrent Counting Trivial? . 56 5.2 Statistical Counters . 58 5.2.1 Design . 58 5.2.2 Array-Based Implementation . 59 5.2.3 Eventually Consistent Implementation . 60 5.2.4 Per-Thread-Variable-Based Implementation . 63 5.2.5 Discussion . 64 5.3 Approximate Limit Counters . 64 5.3.1 Design . 64 5.3.2 Simple Limit Counter Implementation . 65 5.3.3 Simple Limit Counter Discussion . 71 5.3.4 Approximate Limit Counter Implementation . 72 5.3.5 Approximate Limit Counter Discussion . 72 5.4 Exact Limit Counters . 72 5.4.1 Atomic Limit Counter Implementation . 73 5.4.2 Atomic Limit Counter Discussion . 77 5.4.3 Signal-Theft Limit Counter Design . 77 5.4.4 Signal-Theft Limit Counter Implementation . 79 5.4.5 Signal-Theft Limit Counter Discussion . 85 5.5 Applying Specialized Parallel Counters . 85 5.6 Parallel Counting Discussion . 86 5.6.1 Parallel Counting Performance . 86 5.6.2 Parallel Counting Specializations . 87 CONTENTS v 5.6.3 Parallel Counting Lessons . 88 6 Partitioning and Synchronization Design 91 6.1 Partitioning Exercises . 91 6.1.1 Dining Philosophers Problem . 91 6.1.2 Double-Ended Queue . 95 6.1.3 Partitioning Example Discussion . 103 6.2 Design Criteria . 103 6.3 Synchronization Granularity . 106 6.3.1 Sequential Program . 106 6.3.2 Code Locking . 107 6.3.3 Data Locking . 109 6.3.4 Data Ownership . 111 6.3.5 Locking Granularity and Performance . 112 6.4 Parallel Fastpath . 115 6.4.1 Reader/Writer Locking . 116 6.4.2 Hierarchical Locking . 116 6.4.3 Resource Allocator Caches . 117 6.5 Beyond Partitioning . 123 6.5.1 Work-Queue Parallel Maze Solver . 123 6.5.2 Alternative Parallel Maze Solver . 126 6.5.3 Performance Comparison I . 127 6.5.4 Alternative Sequential Maze Solver . 130 6.5.5 Performance Comparison II . 131 6.5.6 Future Directions and Conclusions . 132 6.6 Partitioning, Parallelism, and Optimization . 133 7 Locking 135 7.1 Staying Alive . 136 7.1.1 Deadlock . 137 7.1.2 Livelock and Starvation . 145 7.1.3 Unfairness . 146 7.1.4 Inefficiency . 147 7.2 Types of Locks . 147 7.2.1 Exclusive Locks . 148 7.2.2 Reader-Writer Locks . 148 7.2.3 Beyond Reader-Writer Locks . 148 7.2.4 Scoped Locking . 150 7.3 Locking Implementation Issues . 152 7.3.1 Sample Exclusive-Locking Implementation Based on Atomic Exchange . 152 7.3.2 Other Exclusive-Locking Implementations . 153 7.4 Lock-Based Existence Guarantees . 155 7.5 Locking: Hero or Villain? . 157 7.5.1 Locking For Applications: Hero! . 157 7.5.2 Locking For Parallel Libraries: Just Another Tool . 157 7.5.3 Locking For Parallelizing Sequential Libraries: Villain! . 161 7.6 Summary . 163 vi CONTENTS 8 Data Ownership 165 8.1 Multiple Processes . 165 8.2 Partial Data Ownership and pthreads . 166 8.3 Function Shipping . 166 8.4 Designated Thread . 167 8.5 Privatization . ..
Recommended publications
  • Is Parallel Programming Hard, And, If So, What Can You Do About It?
    Is Parallel Programming Hard, And, If So, What Can You Do About It? Edited by: Paul E. McKenney Linux Technology Center IBM Beaverton [email protected] December 16, 2011 ii Legal Statement This work represents the views of the authors and does not necessarily represent the view of their employers. IBM, zSeries, and Power PC are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. Linux is a registered trademark of Linus Torvalds. i386 is a trademarks of Intel Corporation or its subsidiaries in the United States, other countries, or both. Other company, product, and service names may be trademarks or service marks of such companies. The non-source-code text and images in this doc- ument are provided under the terms of the Creative Commons Attribution-Share Alike 3.0 United States li- cense (http://creativecommons.org/licenses/ by-sa/3.0/us/). In brief, you may use the contents of this document for any purpose, personal, commercial, or otherwise, so long as attribution to the authors is maintained. Likewise, the document may be modified, and derivative works and translations made available, so long as such modifications and derivations are offered to the public on equal terms as the non-source-code text and images in the original document. Source code is covered by various versions of the GPL (http://www.gnu.org/licenses/gpl-2.0.html). Some of this code is GPLv2-only, as it derives from the Linux kernel, while other code is GPLv2-or-later.
    [Show full text]
  • 11. Kernel Design 11
    11. Kernel Design 11. Kernel Design Interrupts and Exceptions Low-Level Synchronization Low-Level Input/Output Devices and Driver Model File Systems and Persistent Storage Memory Management Process Management and Scheduling Operating System Trends Alternative Operating System Designs 269 / 352 11. Kernel Design Bottom-Up Exploration of Kernel Internals Hardware Support and Interface Asynchronous events, switching to kernel mode I/O, synchronization, low-level driver model Operating System Abstractions File systems, memory management Processes and threads Specific Features and Design Choices Linux 2.6 kernel Other UNIXes (Solaris, MacOS), Windows XP and real-time systems 270 / 352 11. Kernel Design – Interrupts and Exceptions 11. Kernel Design Interrupts and Exceptions Low-Level Synchronization Low-Level Input/Output Devices and Driver Model File Systems and Persistent Storage Memory Management Process Management and Scheduling Operating System Trends Alternative Operating System Designs 271 / 352 11. Kernel Design – Interrupts and Exceptions Hardware Support: Interrupts Typical case: electrical signal asserted by external device I Filtered or issued by the chipset I Lowest level hardware synchronization mechanism Multiple priority levels: Interrupt ReQuests (IRQ) I Non-Maskable Interrupts (NMI) Processor switches to kernel mode and calls specific interrupt service routine (or interrupt handler) Multiple drivers may share a single IRQ line IRQ handler must identify the source of the interrupt to call the proper → service routine 272 / 352 11. Kernel Design – Interrupts and Exceptions Hardware Support: Exceptions Typical case: unexpected program behavior I Filtered or issued by the chipset I Lowest level of OS/application interaction Processor switches to kernel mode and calls specific exception service routine (or exception handler) Mechanism to implement system calls 273 / 352 11.
    [Show full text]
  • Understanding the Linux Kernel, 3Rd Edition by Daniel P
    1 Understanding the Linux Kernel, 3rd Edition By Daniel P. Bovet, Marco Cesati ............................................... Publisher: O'Reilly Pub Date: November 2005 ISBN: 0-596-00565-2 Pages: 942 Table of Contents | Index In order to thoroughly understand what makes Linux tick and why it works so well on a wide variety of systems, you need to delve deep into the heart of the kernel. The kernel handles all interactions between the CPU and the external world, and determines which programs will share processor time, in what order. It manages limited memory so well that hundreds of processes can share the system efficiently, and expertly organizes data transfers so that the CPU isn't kept waiting any longer than necessary for the relatively slow disks. The third edition of Understanding the Linux Kernel takes you on a guided tour of the most significant data structures, algorithms, and programming tricks used in the kernel. Probing beyond superficial features, the authors offer valuable insights to people who want to know how things really work inside their machine. Important Intel-specific features are discussed. Relevant segments of code are dissected line by line. But the book covers more than just the functioning of the code; it explains the theoretical underpinnings of why Linux does things the way it does. This edition of the book covers Version 2.6, which has seen significant changes to nearly every kernel subsystem, particularly in the areas of memory management and block devices. The book focuses on the following topics: • Memory management, including file buffering, process swapping, and Direct memory Access (DMA) • The Virtual Filesystem layer and the Second and Third Extended Filesystems • Process creation and scheduling • Signals, interrupts, and the essential interfaces to device drivers • Timing • Synchronization within the kernel • Interprocess Communication (IPC) • Program execution Understanding the Linux Kernel will acquaint you with all the inner workings of Linux, but it's more than just an academic exercise.
    [Show full text]
  • Hacking for Dummies.Pdf
    01 55784X FM.qxd 3/29/04 4:16 PM Page i Hacking FOR DUMmIES‰ by Kevin Beaver Foreword by Stuart McClure 01 55784X FM.qxd 3/29/04 4:16 PM Page v 01 55784X FM.qxd 3/29/04 4:16 PM Page i Hacking FOR DUMmIES‰ by Kevin Beaver Foreword by Stuart McClure 01 55784X FM.qxd 3/29/04 4:16 PM Page ii Hacking For Dummies® Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 Copyright © 2004 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permis- sion of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, e-mail: permcoordinator@ wiley.com. Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc.
    [Show full text]
  • Linux Kernel Synchronization
    10/27/12 Logical Diagram Binary Memory Threads Formats Allocators Linux kernel Today’s Lecture User SynchronizationSystem Calls Kernel synchronization in the kernel RCU File System Networking Sync Don Porter CSE 506 Memory Device CPU Management Drivers Scheduler Hardware Interrupts Disk Net Consistency Why Linux Warm-up synchronization? ò What is synchronization? ò A modern OS kernel is one of the most complicated parallel programs you can study ò Code on multiple CPUs coordinate their operations ò Examples: ò Other than perhaps a database ò Includes most common synchronization patterns ò Locking provides mutual exclusion while changing a pointer-based data structure ò And a few interesting, uncommon ones ò Threads might wait at a barrier for completion of a phase of computation ò Coordinating which CPU handles an interrupt The old days: They didn’t Historical perspective worry! ò Why did OSes have to worry so much about ò Early/simple OSes (like JOS, pre-lab4): No need for synchronization back when most computers have only synchronization one CPU? ò All kernel requests wait until completion – even disk requests ò Heavily restrict when interrupts can be delivered (all traps use an interrupt gate) ò No possibility for two CPUs to touch same data 1 10/27/12 Slightly more recently A slippery slope ò Optimize kernel performance by blocking inside the kernel ò We can enable interrupts during system calls ò Example: Rather than wait on expensive disk I/O, block and ò More complexity, lower latency schedule another process until it completes ò We can block in more places that make sense ò Cost: A bit of implementation complexity ò Better CPU usage, more complexity ò Need a lock to protect against concurrent update to pages/ inodes/etc.
    [Show full text]
  • High Performance Web Servers: a Study in Concurrent Programming Models
    High Performance Web Servers: A Study In Concurrent Programming Models by Srihari Radhakrishnan A thesis presented to the University of Waterloo in fulfillment of the thesis requirement for the degree of Master of Mathematics in Computer Science Waterloo, Ontario, Canada, 2019 c Srihari Radhakrishnan 2019 Author’s Declaration I hereby declare that I am the sole author of this thesis. This is a true copy of the thesis, including any required final revisions, as accepted by my examiners. I understand that my thesis may be made electronically available to the public. ii Abstract With the advent of commodity large-scale multi-core computers, the performance of software running on these computers has become a challenge to researchers and enterprise developers. While academic research and industrial products have moved in the direction of writing scalable and highly available services using distributed computing, single machine performance remains an active domain, one which is far from saturated. This thesis selects an archetypal software example and workload in this domain, and de- scribes software characteristics affecting performance. The example is highly-parallel web- servers processing a static workload. Particularly, this work examines concurrent programming models in the context of high-performance web-servers across different architectures — threaded (Apache, Go and µKnot), event-driven (Nginx, µServer) and staged (WatPipe) — compared with two static workloads in two different domains. The two workloads are a Zipf distribution of file sizes representing a user session pulling an assortment of many small and a few large files, and a 50KB file representing chunked streaming of a large audio or video file.
    [Show full text]
  • Towards Scalable Synchronization on Multi-Cores
    Towards Scalable Synchronization on Multi-Cores THÈSE NO 7246 (2016) PRÉSENTÉE LE 21 OCTOBRE 2016 À LA FACULTÉ INFORMATIQUE ET COMMUNICATIONS LABORATOIRE DE PROGRAMMATION DISTRIBUÉE PROGRAMME DOCTORAL EN INFORMATIQUE ET COMMUNICATIONS ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE POUR L'OBTENTION DU GRADE DE DOCTEUR ÈS SCIENCES PAR Vasileios TRIGONAKIS acceptée sur proposition du jury: Prof. J. R. Larus, président du jury Prof. R. Guerraoui, directeur de thèse Dr T. Harris, rapporteur Dr G. Muller, rapporteur Prof. W. Zwaenepoel, rapporteur Suisse 2016 “We can only see a short distance ahead, but we can see plenty there that needs to be done.” — Alan Turing To my parents, Eirini and Charalampos Acknowledgements “The whole is greater than the sum of its parts.” — Aristotle To date, my education (i.e., diploma, M.Sc., and Ph.D.) has lasted for 13 years. I could not possibly be here and sustain all the pressure (and of course the financial expenses) without the help and support of my family, Eirini (my mother), Charalampos (my father), and Eleni (my sister). I want to deeply thank them for being there for me throughout these years. In my experience, a successful Ph.D. thesis in the area called “systems” (i.e., with a focus on software systems) requires either 10 years of solo work, or 5–6 years of fruitful collaborations. I was lucky enough to belong in the latter category and to have the chance to collaborate with many amazing people in producing the research that is included in this dissertation. This is actually the main reason why in the main body of this dissertation I use “we” instead of “I.” First and foremost, I would like to thank my advisor, Rachid Guerraoui.
    [Show full text]
  • Synchronizations in Linux
    W4118 Operating Systems Instructor: Junfeng Yang Learning goals of this lecture Different flavors of synchronization primitives and when to use them, in the context of Linux kernel How synchronization primitives are implemented for real “Portable” tricks: useful in other context as well (when you write a high performance server) Optimize for common case 2 Synchronization is complex and subtle Already learned this from the code examples we’ve seen Kernel synchronization is even more complex and subtle Higher requirements: performance, protection … Code heavily optimized, “fast path” often in assembly, fit within one cache line 3 Recall: Layered approach to synchronization Hardware provides simple low-level atomic operations , upon which we can build high-level, synchronization primitives , upon which we can implement critical sections and build correct multi-threaded/multi-process programs Properly synchronized application High-level synchronization primitives Hardware-provided low-level atomic operations 4 Outline Low-level synchronization primitives in Linux Memory barrier Atomic operations Synchronize with interrupts Spin locks High-level synchronization primitives in Linux Completion Semaphore Futex Mutex 5 Architectural dependency Implementation of synchronization primitives: highly architecture dependent Hardware provides atomic operations Most hardware platforms provide test-and-set or similar: examine and modify a memory location atomically Some don’t, but would inform if operation attempted was atomic 6 Memory
    [Show full text]
  • Université De Montréal Low-Impact Operating
    UNIVERSITE´ DE MONTREAL´ LOW-IMPACT OPERATING SYSTEM TRACING MATHIEU DESNOYERS DEPARTEMENT´ DE GENIE´ INFORMATIQUE ET GENIE´ LOGICIEL ECOLE´ POLYTECHNIQUE DE MONTREAL´ THESE` PRESENT´ EE´ EN VUE DE L’OBTENTION DU DIPLOMEˆ DE PHILOSOPHIÆ DOCTOR (Ph.D.) (GENIE´ INFORMATIQUE) DECEMBRE´ 2009 c Mathieu Desnoyers, 2009. UNIVERSITE´ DE MONTREAL´ ECOL´ E POLYTECHNIQUE DE MONTREAL´ Cette th`ese intitul´ee : LOW-IMPACT OPERATING SYSTEM TRACING pr´esent´ee par : DESNOYERS Mathieu en vue de l’obtention du diplˆome de : Philosophiæ Doctor a ´et´edˆument accept´ee par le jury constitu´ede : Mme. BOUCHENEB Hanifa, Doctorat, pr´esidente M. DAGENAIS Michel, Ph.D., membre et directeur de recherche M. BOYER Fran¸cois-Raymond, Ph.D., membre M. STUMM Michael, Ph.D., membre iii I dedicate this thesis to my family, to my friends, who help me keeping balance between the joy of sharing my work, my quest for knowledge and life. Je d´edie cette th`ese `ama famille, `ames amis, qui m’aident `aconserver l’´equilibre entre la joie de partager mon travail, ma quˆete de connaissance et la vie. iv Acknowledgements I would like to thank Michel Dagenais, my advisor, for believing in my poten- tial and letting me explore the field of operating systems since the beginning of my undergraduate studies. I would also like to thank my mentors, Robert Wisniewski from IBM Research and Martin Bligh, from Google, who have been guiding me through the internships I have done in the industry. I keep a good memory of these experiences and am honored to have worked with them. A special thanks to Paul E.
    [Show full text]
  • What Is RCU, Fundamentally?
    Portland State University PDXScholar Computer Science Faculty Publications and Presentations Computer Science 12-2007 What is RCU, Fundamentally? Paul E. McKenney IBM Linux Technology Center Jonathan Walpole Portland State University Follow this and additional works at: https://pdxscholar.library.pdx.edu/compsci_fac Part of the Computer and Systems Architecture Commons, and the OS and Networks Commons Let us know how access to this document benefits ou.y Citation Details "What is RCU, Fundamentally?" Paul McKenney and Jonathan Walpole, LWN.net (http://lwn.net/Articles/ 262464/), December 17, 2007. This Article is brought to you for free and open access. It has been accepted for inclusion in Computer Science Faculty Publications and Presentations by an authorized administrator of PDXScholar. Please contact us if we can make this document more accessible: [email protected]. What is RCU, Fundamentally? [LWN.net] Weekly edition Kernel Security Distributions Contact Us Search Archives Calendar Subscribe Write for LWN LWN.net FAQ Sponsors What is RCU, Fundamentally? [Editor's note: this is the first in a three-part series on how the read-copy-update mechanism works. Many thanks to Paul McKenney and Jonathan Walpole for allowing December 17, 2007 us to publish these articles. The remaining two sections will appear in future weeks.] This article was contributed by Paul McKenney Part 1 of 3 of What is RCU, Really? Paul E. McKenney, IBM Linux Technology Center Jonathan Walpole, Portland State University Department of Computer Science Introduction Read-copy update (RCU) is a synchronization mechanism that was added to the Linux kernel in October of 2002. RCU achieves scalability improvements by allowing reads to occur concurrently with updates.
    [Show full text]
  • Locking in Linux Kernel
    Locking in Linux kernel Galois @ USTC Linux Users Group [email protected] Slides are powered by OpenOffice.org+Linux+GNU+X31-150$ Copyright © 2005 Galois Y.F. Zheng Permissions is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be downloaded from GNU's home: http://www.gnu.org/licenses/fdl.txt Locking in Linux kernel • OS review: Kernel Control Paths • Locking in Linux • Locking and Coding • Conclusions OS review: Kernel Control Paths cpu, operating system, and human • CPU is stupid, running endlessly! • But the codes in RAM is intelligent. (They compete for CPU resources.) • We people control the codes. endless rotating elevator: CPU 2 2nd floor 2 3 1 “CPU” running endlessly 3 1 entrance 4 4 1st floor Human exit ... X : Codes 1 1 2 3 4 : Kernel Control Path 1 X : Codes 2 1 2 ... 3 4 : Kernel Control Path 2 OS review: Kernel Control Paths Pre-KCP: What is Kernel Control Path ? • Interrupt handlers • Exception handlers • User-space threads in kernel(system calls) • Kernel threads(idle, work queue, pdflush…) • Bottom halves(soft irq, tasklet,BH...) Post-KCP: Is mm subsystem a KCP? NO, But mm codes are called by KCP. OS review: Kernel Control Paths What is the composition of a kernel? • Kernel Control Paths(KCP). • Kernel Data (global or local). • Kernel Codes called by the KCPs.
    [Show full text]
  • Open Source Software License Information
    Open Source Software license information This document contains an open source software license information for the product VACUU·SELECT. The product VACUU·SELECT contains open source components which are licensed under the applicable open source licenses. The applicable open source licenses are listed below. The open source software licenses are granted by the respective right holders directly. The open source licenses prevail all other license information with regard to the respective open source software components contained in the product. Modifications of our programs which are linked to LGPL libraries are permitted for the customer's own use and reverse engineering for debugging such modifications. However, forwarding the information acquired during reverse engineering or debugging to third parties is prohibited. Furthermore, it is prohibited to distribute modified versions of our programs. In any case, the warranty for the product VACUU·SELECT will expire, as long as the customer cannot prove that the defect would also occur without these modification. WARRANTY DISCLAIMER THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the applicable licenses for more details. Written offer This product VACUU·SELECT contains software components that are licensed by the holder of the rights as free software, or Open Source software, under GNU General Public License, Versions 2 and 3, or GNU Lesser General Public License, Versions 2.1, or GNU Library General Public License, Version 2, respectively. The source code for these software components can be obtained from us on a data carrier (e.g.
    [Show full text]