Multicore Software Development Techniques
eBook - ePub

Multicore Software Development Techniques

Applications, Tips, and Tricks

  1. 236 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Multicore Software Development Techniques

Applications, Tips, and Tricks

About this book

This book provides a set of practical processes and techniques used for multicore software development. It is written with a focus on solving day to day problems using practical tips and tricks and industry case studies to reinforce the key concepts in multicore software development.Coverage includes: - The multicore landscape- Principles of parallel computing- Multicore SoC architectures- Multicore programming models- The Multicore development process- Multicore programming with threads- Concurrency abstraction layers- Debugging Multicore Systems- Practical techniques for getting started in multicore development- Case Studies in Multicore Systems Development- Sample code to reinforce many of the concepts discussed- Presents the 'nuts and bolts' of programming a multicore system- Provides a short-format book on the practical processes and techniques used in multicore software development- Covers practical tips, tricks and industry case studies to enhance the learning process

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Multicore Software Development Techniques by Robert Oshana in PDF and/or ePUB format, as well as other popular books in Computer Science & Digital Media. We have over one million books available in our catalogue for you to explore.

Information

Chapter 1

Principles of Parallel Computing

Abstract

The principle of parallel computing is using multiple processors in parallel to solve problems more quickly than with a single processor, or with less energy consumption. This chapter will overview some key principles including concurrency versus parallelism, SMP and AMP systems, limits to parallel computing, and Amdahl’s Law.

Keywords

Concurrency; parallelism; SMP; AMP; Amdahl’s Law; Gustufsons Law
A multicore processor is a computing device that contains two or more independent processing elements (referred to as ā€œcoresā€) integrated on to a single device, that read and execute program instructions. There are many architectural styles of multicore processors, and many application areas, such as embedded processing, graphics processing, and networking.
There are many factors driving multicore adoption:
• Increases in mobile traffic
• Increases in communication between multiple devices
• Increase in semiconductor content (e.g., automotive increases in semiconductor content are driving automotive manufacturers to consider multicore to improve affordability, ā€œgreenā€ technology, safety, and connectivity, see Figure 1.1)
image

Figure 1.1 Semiconductor content in automotive is increasing.
A typical multicore processor will have multiple cores which can be the same (homogeneous) or different (heterogeneous) accelerators (the more generic term is ā€œprocessing elementā€) for dedicated functions such as video or network acceleration, as well as a number of shared resources (memory, cache, peripherals such as ethernet, display, codecs, UART, etc.) (Figure 1.2)
image

Figure 1.2 A generic multicore system (left) and an example multicore device from industry (right).

1.1 Concurrency versus Parallelism

There are important differences between concurrency and parallelism as they relate to multicore processing.
Concurrency: A condition that exists when at least two software tasks are making progress, although at different times. This is a more generalized form of parallelism that can include time-slicing as a form of virtual parallelism. Systems that support concurrency are designed for interruptability.
Parallelism: A condition that arises when at least two threads are executing simultaneously. Systems that support parallelism are designed for independentability, such as a multicore system.
A program designed to be concurrent may or may not be run in parallel; concurrency is more an attribute of a program, parallelism may occur when it executes (see Figure 1.3).
image

Figure 1.3 Concurrency versus parallelism.
It is time to introduce an algorithm that should be memorized when thinking about multicore systems. Here it is:
image
• ā€œParallelismā€ is all about exposing parallelism in the application
• ā€œMemory hierarchyā€ is all about maximizing data locality in the network, disk, RAM, cache, core, etc.
• ā€œContentionā€ is all about minimizing interactions between cores (e.g., locking, synchronization, etc.)
To achieve the best HPC or ā€œHigh Peformance Computingā€ result, to get the best performance we need to get the best possible parallelism, use memory efficiently, and reduce the contention. As we move forward we will touch on each of these areas.

1.2 Symmetric and Asymmetric Multiprocessing

Efficiently allocating resources in multicore systems can be a challenge. Depending on the configuration, the multiple software components in these systems may or may not be aware of how other components are using these resources. There are two primary forms of multiprocessing, as shown in Figure 1.4;
• Symmetric multiprocessing
• Asymmetric multiprocessing
image

Figure 1.4 Asymmetric multiprocessing (left) and symmetric multiprocessing (right).

1.2.1 Symmetric Multiprocessing

Symmetric multiprocessing (SMP) uses a single copy of the operating system on all of the system’s cores. The operating system has visibility into all system element, and can ...

Table of contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright
  5. Dedication
  6. Chapter 1. Principles of Parallel Computing
  7. Chapter 2. Parallelism in All of Its Forms
  8. Chapter 3. Multicore System Architectures
  9. Chapter 4. Multicore Software Architectures
  10. Chapter 5. Multicore Software Development Process
  11. Chapter 6. Putting it All Together, A Case Study of Multicore Development
  12. Chapter 7. Multicore Virtualization
  13. Chapter 8. Performance and Optimization of Multicore Systems
  14. Chapter 9. Sequential to Parallel Migration of Software Applications
  15. Chapter 10. Concurrency Abstractions
  16. Appendix A. Source Code Examples
  17. Index