Dynamic Analysis and Profiling of Multithreaded Systems

Dynamic Analysis and Profiling of Multithreaded Systems

Daniel G. Waddington (Lockheed Martin, USA), Nilabja Roy (Vanderbilt University, USA) and Douglas C. Schmidt (Vanderbilt University, USA)
Copyright: © 2009 |Pages: 45
DOI: 10.4018/978-1-59904-699-0.ch010
OnDemand PDF Download:


As software-intensive systems become larger, more parallel, and more unpredictable the ability to analyze their behavior is increasingly important. There are two basic approaches to behavioral analysis: static and dynamic. Although static analysis techniques, such as model checking, provide valuable information to software developers and testers, they cannot capture and predict a complete, precise, image of behavior for large-scale systems due to scalability limitations and the inability to model complex external stimuli. This chapter explores four approaches to analyzing the behavior of software systems via dynamic analysis: compiler-based instrumentation, operating system and middleware profiling, virtual machine profiling, and hardware-based profiling. We highlight the advantages and disadvantages of each approach with respect to measuring the performance of multithreaded systems and demonstrate how these approaches can be applied in practice.
Chapter Preview


Microprocessors execute code as a sequential flow of instructions. Most contemporary operating systems support multitasking, which allows more than one program to execute simultaneously. Multitasking is achieved by dynamically scheduling different executions to the available processors over time (sometimes referred to as time slicing).

The unit of logical flow within a running program is a thread. Although the exact definition of a thread can vary, threads are typically defined as a lightweight representation of execution state. The underlying kernel data structure for a thread includes the address of the run-time stacks, priority information, and scheduling status. Each thread belongs to a single process (a process requires at least one thread). Processes define initial code and data, a private virtual address space, and state relevant to active system resources (e.g., files and semaphores). Threads that belong to the same process share the same virtual address space and other system resources. There is no memory protection between threads in the same process, which makes it easy to exchange data efficiently between threads. At the same time, however, threads can write to many parts of the process’ memory. Data integrity can be quickly lost, therefore, if access to shared data by individual threads is not controlled carefully.

Threads have traditionally been used on single processor systems to help programmers implement logically concurrent tasks and manage multiple activities within the same program (Rinard, 2001). For example, a program that handles both GUI events and performs network I/O could be implemented with two separate threads that run within the same process. Here the use of threads avoids the need to “poll” for GUI and packet I/O events. It also avoids the need to adjust priorities and preempt running tasks, which is instead performed by the operating system’s scheduler.

With the recent advent of multicore and symmetric multiprocessor (SMP) systems, threads represent logically concurrent program functions that can be mapped to physically parallel processing hardware. For example, a program deployed on a four-way multicore processor must provide at least four independent tasks to fully exploit the available resources (of course it may not get a chance to use all of the processing cores if they are occupied by higher priority tasks). As parallel processing capabilities in commodity hardware grow, the need for multithreaded programming has increased because explicit design of parallelism in software is now key to exploiting performance capabilities in next-generation processors (Sutter, 2005).

This chapter reviews key techniques and methodologies that can be used to collect thread-behavior information from running systems. We highlight the strengths and weaknesses of each technique and lend insight into how they can be applied from a practical perspective.

Complete Chapter List

Search this Book:
Table of Contents
Pierre F. Tiako
Chapter 1
Alf Inge Wang, Carl-Fredrik Sørensen
This chapter presents a framework for differentiated process support in large software projects. Process support can be differentiated in different... Sample PDF
Differentiated Process Support for Large Software Projects
Chapter 2
Holger Giese, Stefan Henkler, Martin Hirsch, Vladimir Rubin, Matthias Tichy
Software has become the driving force in the evolution of many systems, such as embedded systems (especially automotive applications)... Sample PDF
Modeling Techniques for Software-Intensive Systems
Chapter 3
Jaroslav Král, Michal Žemlicka
Software intensive systems are systems strongly depending on supporting software. The software is typically large, complex, and it as a rule... Sample PDF
Service Orientation and Software-Intensive Systems
Chapter 4
Alf Inge Wang, Carl-Fredrik Sørensen, Hien Nam Le, Heri Ramampiaro, Mads Nygård, Reidar Conradi
This chapter describes a requirement analysis framework that may be used as a tool for developing client-server systems for mobile workers. The... Sample PDF
From Scenarios to Requirements in Mobile Client-Server Systems
Chapter 5
Gan Deng, Douglas C. Schmidt, Aniruddha Gokhale, Jeff Gray, Yuehua Lin, Gunther Lenz
This chapter describes our approach to model-driven engineering (MDE)-based product line architectures (PLAs) and presents a solution to address the... Sample PDF
Evolution in Model-Driven Software Product-Line Architectures
Chapter 6
Ståle Walderhaug, Erlend Stav, Ulrik Johansen, Gøran K. Olsen
This chapter introduces a tracability solution for use in a model-driven software development approach. It argues that a trace model based on a... Sample PDF
Traceability in Model-Driven Software Development
Chapter 7
Gerhard Chroust, Erwin Schoitsch
When designing a complex software-intensive system it is unavoidable to make some a-priori basic assumptions about its architecture. We introduce... Sample PDF
Choosing Basic Architectural Alternatives
Chapter 8
Rafael Capilla, Margarita Martínez, Francisco Nava, Cristina Muñoz
Virtual reality systems are a kind of complex software systems that need a lot of effort and resources during its development phase. Because rigid... Sample PDF
Architecting Virtual Reality Systems
Chapter 9
Kendra M.L. Cooper, Lirong Dai, Renee Steiner, Rym Zalila Mili
This chapter presents a survey of software architecture approaches. It is intended for a broad audience of students, practitioners, and researchers... Sample PDF
A Survey of Software Architecture Approaches
Chapter 10
Daniel G. Waddington, Nilabja Roy, Douglas C. Schmidt
As software-intensive systems become larger, more parallel, and more unpredictable the ability to analyze their behavior is increasingly important.... Sample PDF
Dynamic Analysis and Profiling of Multithreaded Systems
Chapter 11
James H. Hill, Douglas C. Schmidt, John M. Slaby
This chapter introduces the next generation of system execution modeling tools designed around modeldriven engineering (MDE) coupled with... Sample PDF
Evaluating Quality of Service for Enterprise Distributed Systems
Chapter 12
Jules White, Douglas C. Schmidt, Andrey Nechypurenko, Egon Wuchner
Model-driven development is one approach to combating the complexity of designing software intensive systems. A model-driven approach allows... Sample PDF
Reducing the Complexity of Modeling Large Software Systems
Chapter 13
Enis Afgan, Purushotham Bangalore, Jeff Gray
Grid computing environments are dynamic and heterogeneous in nature. In order to realize applicationspecific Quality of Service agreements within a... Sample PDF
A Domain-Specific Language for Describing Grid Applications
Chapter 14
Jeff Elpern, Sergiu Dascalu
Traditional software engineering methodologies have mostly evolved from the environment of proprietary, large-scale software systems. Here, software... Sample PDF
A Framework for Understanding the Open Source Revolution
Chapter 15
Syed Ahsan, Abad Shah
With the proliferation of Web, a tremendous amount of data is available to researchers and scientists in computational sciences, business... Sample PDF
Quality Metrics for Evaluating Data Provenance
Chapter 16
Krishnakumar Balasubramanian, Douglas C. Schmidt, Zoltán Molnár, Ákos Lédeczi
With the emergence of commercial-off-the-shelf (COTS) component middleware technologies software system integrators are increasing faced with the... Sample PDF
System Integration Using Model-Driven Engineering
About the Contributors