Combining Lock-Free Programming with Cooperative Multitasking for a Portable Multiprocessor Runtime System

Total Page:16

File Type:pdf, Size:1020Kb

Combining Lock-Free Programming with Cooperative Multitasking for a Portable Multiprocessor Runtime System Research Collection Doctoral Thesis Combining Lock-Free Programming with Cooperative Multitasking for a Portable Multiprocessor Runtime System Author(s): Negele, Florian Publication Date: 2014 Permanent Link: https://doi.org/10.3929/ethz-a-010335528 Rights / License: In Copyright - Non-Commercial Use Permitted This page was generated automatically upon download from the ETH Zurich Research Collection. For more information please consult the Terms of use. ETH Library DISS. ETH NO. 22298 Combining Lock-Free Programming with Cooperative Multitasking for a Portable Multiprocessor Runtime System A thesis submitted to attain the degree of DOCTOR OF SCIENCES of ETH ZURICH (Dr. sc. ETH Zurich) presented by FLORIAN NEGELE MSc ETH CS, ETH Zurich born 15 August 1981 citizen of the Principality of Liechtenstein accepted on the recommendation of Prof. Dr. Jürg Gutknecht, examiner Prof. Dr. Thomas Gross, co-examiner Prof. Dr. Bernhard Egger, co-examiner 2014 ii Whatever can go wrong, will go wrong. (attributed to Edward A. Murphy) Murphy was an optimist. (according to authors of lock-free programs) iii iv Acknowledgements A dissertation is never the achievement of a single person. Now is the time to thank all people who enabled me to create and complete this thesis. First and foremost I would like to express my special appreciation and sin- cere thanks to my good friend and advisor Dr. Felix Friedrich who tirelessly encouraged me for this work and always provided me with outstanding support and reliable expertise. It has been a great pleasure working with you all of these years. I am also greatly indebted to my supervisor Prof. Jürg Gutknecht for giving me the opportunity and free reign to realise my ideas within this doctoral thesis. I am sincerely grateful for the comfortable working envir- onment and his continuous guidance, help and patience. Additional thanks go to Prof. Thomas Gross and Prof. Bernhard Egger for their valuable assistance and kind agreement to co-examine this work. I would also like to show my deep gratitude to Paul Reed who was always generous in scrutinising drafts and providing me steadily with helpful comments and much appreciated suggestions. Last but not least, I would like to thank all of my past co-workers and colleagues for the interesting discussions, helpful insights, and the overall pleasant working environment. These people include Luc Bläser, Matthias Büchler, Olivier Clerc, André Fischer, Ulrike Glavitsch, Thomas Kägi, Daniel Keller, Sven Knudsen, Ling Liu, Roman Mitin, Georg Ofenbeck, Sven Stauber, Lars Widmer, and many others. I owe special thanks to Ruth Hidalgo, Franziska Mäder, and Martina Wirth for their reliable administrat- ive support. v vi Contents 1 Introduction 1 1.1 Motivation . .1 1.2 Scope . .3 1.3 Related Work . .7 1.4 Contributions . .9 1.5 Overview . 10 2 Lock-Free Programming 11 2.1 Introduction . 11 2.2 Memory Models . 15 2.3 Programming Techniques . 21 3 Case Study: Lock-Free Queues 33 3.1 Introduction . 33 3.2 Linearisation Points . 37 3.3 Intermediate Nodes . 44 3.4 The ABA Problem . 51 3.5 Safe Memory Deallocation . 58 4 Lock-Free Scheduling 67 4.1 Introduction . 67 4.2 Foundations . 70 4.3 Synchronisation Primitives . 80 4.4 Multiprocessor Support . 93 4.5 Interrupt Handling . 95 vii 5 Lock-Free Memory Management 101 5.1 Heap Management . 101 5.2 Stack Management . 113 5.3 Garbage Collection . 116 6 Case Study: Software Portability 127 6.1 Introduction . 127 6.2 Cross Compilation . 129 6.3 Generic Object Files . 131 6.4 Runtime System Structure . 138 7 Evaluation 145 7.1 Contention Management . 146 7.2 Performance Measurements . 150 7.3 Portability and Flexibility . 168 8 Conclusion 171 8.1 Summary . 171 8.2 Future Work . 174 A Digital Material 179 B Module Reference 181 C Enhancements to Active Oberon 203 Bibliography 225 viii Abstract The application of mutual exclusion in order to protect shared data from concurrent access is a recurring programming pattern found in contempor- ary application software. Although alternatives to blocking synchronisation like lock-free programming solve several critical problems and offer better progress guarantees, they have not become as popular. This especially ap- plies to operating system kernels that provide support for multiprocessing environments. This thesis describes our approach to design and implement an operating system kernel which is based solely on non-blocking algorithms. Its goal is to provide a completely lock-free runtime system for object-oriented programming languages that support concurrency and automatic memory management. We also strived for an uncompromisingly high portability of its source code and replaced all features provided by the hardware with machine-independent software solutions wherever possible. In particular, we abandoned the prevalent preemptive scheduler of modern systems in favour of a compiler-guaranteed cooperative multitasking. The combina- tion of lock-free programming with cooperative multitasking presents a novel approach and enables several practical and beneficial non-blocking programming techniques such as processor-local storage. The result of this work is a concise and reliable operating system kernel providing flexible language support for multithreading and garbage collec- tion. Its source code is easily portable to a variety of hardware architectures ranging from powerful multicore machines to small embedded devices and microcontrollers. In addition, its rigorous machine independence also allows the runtime system to be used as a library for applications running on top of existing operating systems. Despite its simplicity, the performance of our lock-free approach is often comparable to established and optimised operating systems and is clearly superior to solutions based on locking. ix x Kurzfassung Die heutige Softwareentwicklung setzt häufig Verfahren des wechselseiti- gen Ausschlusses ein, um gemeinsam genutzte Daten vor gleichzeitigem Zugriff nebenläufiger Prozesse zu schützen. Vielversprechende Alternativen zu dieser blockierenden Art der Prozesssynchronisation wie beispielsweise die lockfreie Programmierung lösen zahlreiche der damit verbundenen Pro- bleme, sind aber längst nicht so weit verbreitet. Vor allem Betriebssystem- kerne für Mehrprozessorsysteme bauen immer noch häufig auf gegenseitige Zugriffssperren. Diese Arbeit geht dem Entwurf und der Entwicklung eines Betriebs- systemkerns nach, welcher stattdessen ausschliesslich auf nicht blockie- renden Algorithmen basiert. Das Ziel des Kerns ist es, ein durchgängig lockfreies Laufzeitsystem für objektorientierte Programmiersprachen mit Unterstützung für Nebenläufigkeit und automatischer Speicherbereinigung anzubieten. Ein weiteres Anliegen ist die kompromisslose Portabilität des Quellcodes, welche soweit möglich versucht, hardwarespezifische Funk- tionalitäten durch unabhängige Softwarelösungen zu ersetzen. Das bedeu- tendste Beispiel für diesen Ansatz stellt die Verwendung von kooperativem Multitasking dar, welches als Ersatz für das typischerweise präemptive Scheduling moderner Systeme zum Einsatz kommt. Die Verbindung von lockfreier Programmierung mit kooperativem Multitasking wurde bislang kaum ausgenutzt und ermöglicht einige praktische Programmiertechniken, die für die Entwicklung von nicht blockierenden Algorithmen von grossem Vorteil sind. Das Ergebnis dieser Dissertation ist ein schlanker und zuverlässiger Betriebssystemkern mit flexibler Sprachunterstützung für Multithreading und Garbage Collection. Der Quellcode ist mühelos auf eine Vielzahl von Hardwarearchitekturen portierbar und läuft sowohl auf leistungsstarken Mehrkernrechnern als auch eingebetteten Systemen und Mikrocontrollern. xi Die konsequent umgesetzte Maschinenunabhängigkeit erlaubt es dem Lauf- zeitsystem ausserdem, als Bibliothek für Applikationen bestehender Be- triebssysteme zur Verfügung zu stehen. Die Auswertung der vorliegenden Arbeit hat gezeigt, dass die Leistungsfähigkeit unserer unkomplizierten und lockfreien Implementation in einigen Bereichen durchaus mit der von bewährten und optimierten Betriebssystemen vergleichbar ist. Dies gilt vor allen Dingen für Systeme, welche auf blockierender Prozesssynchronisation beruhen. xii 1 Introduction This chapter describes the background, purpose, and scope of this thesis and puts it into perspective with related work. In addition, it summarises our main contributions by consolidating the ideas and concepts behind them. 1.1 Motivation Since several years now, many operating systems provide native support for multiple central processing units in order to utilise the fullest potential of modern hardware. The most prominent representatives include for example Microsoft Windows and many Unix-like operating systems. Although the internal design and implementation of these operating systems often varies considerably, all of them usually include a generic hardware abstraction layer for applications running on top of them. The basic idea is to allow all applications to access system specific services and resources independently of the underlying hardware architecture. The base at the lowest level of this abstraction mechanism consists of the so-called operating system kernel which manages and provides access to the most primitive but fundamental hardware resources such as logical processors, the main memory, and facilities to access peripheral devices. The functionality of the kernel is usually required directly or indirectly by all applications as well as higher-level components of the hardware abstraction layer like
Recommended publications
  • What Is an Operating System III 2.1 Compnents II an Operating System
    Page 1 of 6 What is an Operating System III 2.1 Compnents II An operating system (OS) is software that manages computer hardware and software resources and provides common services for computer programs. The operating system is an essential component of the system software in a computer system. Application programs usually require an operating system to function. Memory management Among other things, a multiprogramming operating system kernel must be responsible for managing all system memory which is currently in use by programs. This ensures that a program does not interfere with memory already in use by another program. Since programs time share, each program must have independent access to memory. Cooperative memory management, used by many early operating systems, assumes that all programs make voluntary use of the kernel's memory manager, and do not exceed their allocated memory. This system of memory management is almost never seen any more, since programs often contain bugs which can cause them to exceed their allocated memory. If a program fails, it may cause memory used by one or more other programs to be affected or overwritten. Malicious programs or viruses may purposefully alter another program's memory, or may affect the operation of the operating system itself. With cooperative memory management, it takes only one misbehaved program to crash the system. Memory protection enables the kernel to limit a process' access to the computer's memory. Various methods of memory protection exist, including memory segmentation and paging. All methods require some level of hardware support (such as the 80286 MMU), which doesn't exist in all computers.
    [Show full text]
  • Mac OS X: an Introduction for Support Providers
    Mac OS X: An Introduction for Support Providers Course Information Purpose of Course Mac OS X is the next-generation Macintosh operating system, utilizing a highly robust UNIX core with a brand new simplified user experience. It is the first successful attempt to provide a fully-functional graphical user experience in such an implementation without requiring the user to know or understand UNIX. This course is designed to provide a theoretical foundation for support providers seeking to provide user support for Mac OS X. It assumes the student has performed this role for Mac OS 9, and seeks to ground the student in Mac OS X using Mac OS 9 terms and concepts. Author: Robert Dorsett, manager, AppleCare Product Training & Readiness. Module Length: 2 hours Audience: Phone support, Apple Solutions Experts, Service Providers. Prerequisites: Experience supporting Mac OS 9 Course map: Operating Systems 101 Mac OS 9 and Cooperative Multitasking Mac OS X: Pre-emptive Multitasking and Protected Memory. Mac OS X: Symmetric Multiprocessing Components of Mac OS X The Layered Approach Darwin Core Services Graphics Services Application Environments Aqua Useful Mac OS X Jargon Bundles Frameworks Umbrella Frameworks Mac OS X Installation Initialization Options Installation Options Version 1.0 Copyright © 2001 by Apple Computer, Inc. All Rights Reserved. 1 Startup Keys Mac OS X Setup Assistant Mac OS 9 and Classic Standard Directory Names Quick Answers: Where do my __________ go? More Directory Names A Word on Paths Security UNIX and security Multiple user implementation Root Old Stuff in New Terms INITs in Mac OS X Fonts FKEYs Printing from Mac OS X Disk First Aid and Drive Setup Startup Items Mac OS 9 Control Panels and Functionality mapped to Mac OS X New Stuff to Check Out Review Questions Review Answers Further Reading Change history: 3/19/01: Removed comment about UFS volumes not being selectable by Startup Disk.
    [Show full text]
  • CS 151: Introduction to Computers
    Information Technology: Introduction to Computers Handout One Computer Hardware 1. Components a. System board, Main board, Motherboard b. Central Processing Unit (CPU) c. RAM (Random Access Memory) SDRAM. DDR-RAM, RAMBUS d. Expansion cards i. ISA - Industry Standard Architecture ii. PCI - Peripheral Component Interconnect iii. PCMCIA - Personal Computer Memory Card International Association iv. AGP – Accelerated Graphics Port e. Sound f. Network Interface Card (NIC) g. Modem h. Graphics Card (AGP – accelerated graphics port) i. Disk drives (A:\ floppy diskette; B:\ obsolete 5.25” floppy diskette; C:\Internal Hard Disk; D:\CD-ROM, CD-R/RW, DVD-ROM/R/RW (Compact Disk-Read Only Memory) 2. Peripherals a. Monitor b. Printer c. Keyboard d. Mouse e. Joystick f. Scanner g. Web cam Operating system – a collection of files and small programs that enables input and output. The operating system transforms the computer into a productive entity for human use. BIOS (Basic Input Output System) date, time, language, DOS – Disk Operating System Windows (Dual, parallel development for home and industry) Windows 3.1 Windows 3.11 (Windows for Workgroups) Windows 95 Windows N. T. (Network Technology) Windows 98 Windows N. T. 4.0 Windows Me Windows 2000 Windows XP Home Windows XP Professional The Evolution of Windows Early 80's IBM introduced the Personal PC using the Intel 8088 processor and Microsoft's Disk Operating System (DOS). This was a scaled down computer aimed at business which allowed a single user to execute a single program. Many changes have been introduced over the last 20 years to bring us to where we are now.
    [Show full text]
  • Real-Time Operating Systems with Example PICOS18
    Real-Time Operating Systems With Example PICOS18 Sebastian Fischmeister 1 What is an Operating System? . A program that acts as an intermediary between a user of a computer and the computer hardware . Operating system goals: o Execute user programs and make solving user problems easier. o Make the computer system convenient to use . Use the computer hardware in an efficient manner CSE480/CIS700 S. Fischmeister 2 1 Computer System Components 1. Hardware – provides basic computing resources (CPU, memory, I/O devices) 2. Operating system – controls and coordinates the use of the hardware among the various application programs for the various users 3. Applications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs) 4. Users (people, machines, other computers) CSE480/CIS700 S. Fischmeister 3 Abstract View of System Components CSE480/CIS700 S. Fischmeister 4 2 What is an RTOS? . Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems . Well-defined fixed-time constraints CSE480/CIS700 S. Fischmeister 5 More Precisely? . The system allows access to sensitive resources with defined response times. o Maximum response times are good for hard real-time o Average response times are ok for soft real-time . Any system that provides the above can be classified as a real-time system o 10us for a context switch, ok? o 10s for a context switch, ok? CSE480/CIS700 S. Fischmeister 6 3 Taxonomy of RTOSs .
    [Show full text]
  • Quantifying the Performance of Garbage Collection Vs. Explicit Memory Management
    Quantifying the Performance of Garbage Collection vs. Explicit Memory Management ¤ Matthew Hertz Emery D. Berger Computer Science Department Dept. of Computer Science Canisius College University of Massachusetts Amherst Buffalo, NY 14208 Amherst, MA 01003 [email protected] [email protected] ABSTRACT physical memory is scarce, paging causes garbage collection to run Garbage collection yields numerous software engineering benefits, an order of magnitude slower than explicit memory management. but its quantitative impact on performance remains elusive. One Categories and Subject Descriptors can compare the cost of conservative garbage collection to explicit memory management in C/C++ programs by linking in an appro- D.3.3 [Programming Languages]: Dynamic storage management; priate collector. This kind of direct comparison is not possible for D.3.4 [Processors]: Memory management (garbage collection) languages designed for garbage collection (e.g., Java), because pro- General Terms grams in these languages naturally do not contain calls to free. Experimentation, Measurement, Performance Thus, the actual gap between the time and space performance of explicit memory management and precise, copying garbage collec- Keywords tion remains unknown. oracular memory management, garbage collection, explicit mem- We introduce a novel experimental methodology that lets us quan- ory management, performance analysis, time-space tradeoff, through- tify the performance of precise garbage collection versus explicit put, paging memory management. Our system allows us to treat unaltered Java programs as if they used explicit memory management by relying 1. Introduction on oracles to insert calls to free. These oracles are generated Garbage collection, or automatic memory management, provides from profile information gathered in earlier application runs.
    [Show full text]
  • CS 450: Operating Systems Michael Lee <[email protected]>
    The Process CS 450: Operating Systems Michael Lee <[email protected]> Agenda - The Process: what is it and what’s in it? - Forms of Multitasking - Tracking processes in the OS - Context switches and Scheduling - Process API a process is a program in execution - its behavior is largely defined by the program being executed - but a process is much more than just a program! Multitasking - Modern general-purpose OSes typically run dozens to hundreds of processes simultaneously - May collectively exceed capacity of hardware - Recall: virtualization allows each process to ignore physical hardware limitations and let OS take care of details CPU/Memory Virtualization - Time-slicing of CPU(s) is performed to simulate concurrency - Memory is partitioned and shared amongst processes - But per-process view is of a uniform address space - Lazy/On-demand loading of processes lowers total burden vs. “Batch” processing - Without multitasking, each program is run from start to finish without interruption from other processes - Including any I/O operations (which may be lengthy!) - Ensures minimal overhead (but at what cost?) - Is virtualization still necessary? Pros/Cons of Multitasking - Pro: may improve resource utilization if we can run some processes while others are blocking - Pro: makes process interaction possible - Con: virtualization introduces overhead (examples?) - Con: possibly reduced overall throughput Forms of Multitasking - Cooperative multitasking: processes voluntarily cede control - Preemptive multitasking: OS polices transitions (how?) - Real-time systems: hard, fixed time constraints (late is wrong!) What’s in a process? - Program (“text”) and data - Static/Stack/Heap memory contents - Registers (e.g., PC, SP, FP) - Open files and devices (e.g., network) - What else? Data vs.
    [Show full text]
  • Scheduling Techniques for Reducing Processor Energy Use in Macos
    Scheduling Techniques for Reducing Processor Energy Use in MacOS Jacob R. Lorch and Alan Jay Smith Computer Science Division, EECS Department, UC Berkeley Berkeley, CA 94720-1776 Abstract a number of engineering users. We found that, depending on the machine and user, up to 18±34% of total power was at- The CPU is one of the major power consumers in a tributable to components whose power consumption could be portable computer, and considerable power can be saved by reduced by power management of the processor, i.e. the CPU turning off the CPU when it is not doing useful work. In Ap- and logic that could be turned off when the CPU was inactive. ple's MacOS, however, idle time is often converted to busy This high percentage, combined with our intuition that soft- waiting, and generally it is very hard to tell when no use- ware power management could be signi®cantly improved for ful computation is occurring. In this paper, we suggest sev- the processor, led us to conclude that the most important tar- eral heuristic techniques for identifying this condition, and get for further research in software power management was for temporarily putting the CPU in a low-power state. These the processor. techniques include turning off the processor when all pro- Many modern microprocessors have low-power states, in cesses are blocked, turning off the processor when processes which they consume little or no power. To take advantage of appear to be busy waiting, and extending real time process such low-power states, the operating system needs to direct sleep periods.
    [Show full text]
  • Types of Operating System 3
    Types of Operating System 3. Batch Processing System The OS in the early computers was fairly simple. Its major task was to transfer control automatically from one job to the next. The OS was always resident in memory. To speed up processing, operators batched together jobs with similar requirement/needs and ran them through the computer as a group. Thus, the programmers would leave their programs with the operator. The operator would sort programs into batches with similar requirements and, as the computer became available, would run each batch. The output from each job would be sent back to the appropriate programmer. Memory layout of Batch System Operating System User Program Area Batch Processing Operating System JOBS Batch JOBS JOBS JOBS JOBS Monitor OPERATING SYSTEM HARDWARE Advantages: ➢ Batch processing system is particularly useful for operations that require the computer or a peripheral device for an extended period of time with very little user interaction. ➢ Increased performance as it was possible for job to start as soon as previous job is finished without any manual intervention. ➢ Priorities can be set for different batches. Disadvantages: ➢ No interaction is possible with the user while the program is being executed. ➢ In this execution environment , the CPU is often idle, because the speeds of the mechanical I/O devices are intrinsically slower than are those of electronic devices. 4. Multiprogramming System The most important aspect of job scheduling is the ability to multi-program. Multiprogramming increases CPU utilization by organizing jobs so that CPU always has one to execute. The idea is as follows: The operating system keeps several jobs in memory simultaneously.
    [Show full text]
  • I.T.S.O. Powerpc an Inside View
    SG24-4299-00 PowerPC An Inside View IBM SG24-4299-00 PowerPC An Inside View Take Note! Before using this information and the product it supports, be sure to read the general information under “Special Notices” on page xiii. First Edition (September 1995) This edition applies to the IBM PC PowerPC hardware and software products currently announced at the date of publication. Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the address given below. An ITSO Technical Bulletin Evaluation Form for reader′s feedback appears facing Chapter 1. If the form has been removed, comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. JLPC Building 014 Internal Zip 5220 1000 NW 51st Street Boca Raton, Florida 33431-1328 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. Copyright International Business Machines Corporation 1995. All rights reserved. Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Abstract This document provides technical details on the PowerPC technology. It focuses on the features and advantages of the PowerPC Architecture and includes an historical overview of the development of the reduced instruction set computer (RISC) technology. It also describes in detail the IBM Power Series product family based on PowerPC technology, including IBM Personal Computer Power Series 830 and 850 and IBM ThinkPad Power Series 820 and 850.
    [Show full text]
  • The Operating System the Operating System (OS) Is the He Low-Level Software Which Handles the Interface to Peripheral Hardware
    The Operating System The Operating System (OS) is the he low-level software which handles the interface to peripheral hardware, schedules tasks, allocates storage, and presents a default interface to the user when no application program is running. Main functions: - 1. Provides instructions to display the on screen elements with which you interact. Collectively, these elements are known as the user interface. 2. Loads programs into the computers memory so that you can use them. 3. Co-ordinates how programs work with the CPU, RAM, keyboard, mouse, printer and other hardware as well as with software. 4. Manages the way information is stored on and retrieved from disks. The User Interface With an OS you see and interact with a set of items on the screen, the user interface. Graphical User Interface - Most current OS provide a graphical user interface (GUI). Apple computer introduced the first GUI with its Macintosh computer in 1984. GUIs are so called because you use a mouse (or other pointing device) to point at graphical objects on the screen. The Desktop - The coloured area that is seen on the screen. The pictures stand for items you might see on a real desktop such as “my computer”. Icons - Icons are pictures that represent the parts of the computer you work with. Software designers try to design the icons so that they look like what they represent. You interact with your computers resources by activating the icon that represent the resource. This is done by using a pointing device. The Taskbar and the Start Button (windows only) - When you start a program a button appears for it on the taskbar – an area at the bottom of the screen whose purpose is to display the buttons for the programs you are running.
    [Show full text]
  • Mac OS 8 Revealed
    •••••••••••••••••••••••••••••••••••••••••••• Mac OS 8 Revealed Tony Francis Addison-Wesley Developers Press Reading, Massachusetts • Menlo Park, California • New York Don Mills, Ontario • Harlow, England • Amsterdam Bonn • Sydney • Singapore • Tokyo • Madrid • San Juan Seoul • Milan • Mexico City • Taipei Apple, AppleScript, AppleTalk, Color LaserWriter, ColorSync, FireWire, LocalTalk, Macintosh, Mac, MacTCP, OpenDoc, Performa, PowerBook, PowerTalk, QuickTime, TrueType, and World- Script are trademarks of Apple Computer, Inc., registered in the United States and other countries. Apple Press, the Apple Press Signature, AOCE, Balloon Help, Cyberdog, Finder, Power Mac, and QuickDraw are trademarks of Apple Computer, Inc. Adobe™, Acrobat™, and PostScript™ are trademarks of Adobe Systems Incorporated or its sub- sidiaries and may be registered in certain jurisdictions. AIX® is a registered trademark of IBM Corp. and is being used under license. NuBus™ is a trademark of Texas Instruments. PowerPC™ is a trademark of International Business Machines Corporation, used under license therefrom. SOM, SOMobjects, and System Object Model are licensed trademarks of IBM Corporation. UNIX® is a registered trademark of Novell, Inc. in the United States and other countries, licensed exclusively through X/Open Company, Ltd. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Addison-Wesley was aware of a trademark claim, the designations have been printed in initial capital letters or all capital letters. The author and publisher have taken care in the preparation of this book, but make no express or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.
    [Show full text]
  • ACDC: Towards a Universal Mutator for Benchmarking Heap Management Systems
    ACDC: Towards a Universal Mutator for Benchmarking Heap Management Systems Martin Aigner Christoph M. Kirsch University of Salzburg fi[email protected] Abstract liveness deallocation delay We present ACDC, an open-source benchmark that may be config- ured to emulate explicit single- and multi-threaded memory alloca- tion, sharing, access, and deallocation behavior to expose virtually time any relevant allocator performance differences. ACDC mimics pe- ... ... allocation accesses last access deallocation riodic memory allocation and deallocation (AC) as well as persis- tent memory (DC). Memory may be allocated thread-locally and shared among multiple threads to study multicore scalability and even false sharing. Memory may be deallocated by threads other lifetime than the allocating threads to study blowup memory fragmentation. Memory may be accessed and deallocated sequentially in alloca- Figure 1: The lifecycle of an object tion order or in tree-like traversals to expose allocator deficiencies in exploiting spatial locality. We demonstrate ACDC’s capabili- ties with seven state-of-the-art allocators for C/C++ in an empir- ical study which also reveals interesting performance differences accesses to the allocated memory, and ends with the deallocation between the allocators. of the allocated memory. The time from allocation to deallocation is called the lifetime of an object. The time from allocation to last Categories and Subject Descriptors D.3.4 [Programming Lan- access is called the liveness of an object which ACDC, unlike other guages]: Memory management benchmarking tools, also emulates explicitly by controlling object General Terms Performance, Measurement access. The difference between lifetime and liveness of an object, here called deallocation delay, emulates mutator inefficiencies in Keywords benchmark; explicit heap management; multicore identifying dead objects for deallocation which may in turn expose allocator inefficiencies in handling dead memory.
    [Show full text]