- Shopping Bag ( 0 items )
A software engineer at a print imaging company asked me, "What can customers do with quad-core processors?" At first I grappled with the question thinking to a time where I did not have an answer. "I don't know," was my first impulse, but I held that comment to myself. I quickly collected my thoughts and recalled a time when I sought an answer to this very question:
Multiple processors have been available on computer systems for years.
Multi-core processors enable the same benefit as multiprocessors except at a reduced cost.
I remembered my graduate school days in the lab when banks of machines were fully utilized for the graphics students' ray-tracing project. I replied back, "Well, many applications can benefit from the horsepower made available through multi-core processors. A simple example is image processing where the work can be split between the different cores."
The engineer then stated, "Yeah, I can see some applications that would benefit, but aren't there just a limited few?"
My thoughts went to swarms of typical computer users running word processors or browsing the internet and not in immediate need of multi-core processors let alone the fastest single core processors available. I then thought the following:
Who was it that said 640 kilobytes of computer memory is all anyone would ever need?
Systems with multiple central processing units (CPUs) have not been targeted to the mass market before so developers have not had time to really develop applications that can benefit.
I said, "This is a classic chicken-and-egg problem. Engineers tend to be creative in finding ways to use the extra horsepower given to them. Microprocessor vendors want customers to see value from multi-core because value equates to price. I'm sure there will be some iteration as developers learn and apply more, tools mature and make it easier, and over time a greater number of cores become available on a given system. We will all push the envelope and discover just which applications will be able to take advantage of multi-core processors and how much."
The engineer next commented, "You mentioned 'developers learn.' What would I need to learn – as if I'm not overloaded already?"
At this point, I certainly didn't want to discourage the engineer, but also wanted to be direct and honest so ran through in my mind the list of things to say:
Parallel programming will become mainstream and require software engineers to be fluent in the design and development of multi-threaded programs.
Parallel programming places more of the stability and performance burden on the software and the software engineer who must coordinate communication and control of the processor cores.
"Many of the benefits to be derived from multi-core processors require software changes. The developers making the changes need to understand potential problem areas when it comes to parallel programming."
"Like what?" the overworked engineer asked knowing full well that he would not like the answer.
"Things like data races, synchronization and the challenges involved with it, workload balance, etc. These are topics for another day," I suggested.
Having satisfied this line of questioning, my software engineering colleague looked at me and asked, "Well what about embedded? I can see where multi-core processing can help in server farms rendering movies or serving web queries, but how can embedded applications take advantage of multi-core?"
Whenever someone mentions embedded, my first wonder is – what does he or she mean by "embedded"? Here's why:
Embedded has connotations of "dumb" devices needing only legacy technology performing simple functions not much more complicated than those performed by a pocket calculator.
The two applications could be considered embedded. The machines doing the actual work may look like standard personal computers, but they are fixed in function.
I responded, "One definition of embedded is fixed function which describes the machines running the two applications you mention. Regardless, besides the data parallel applications you mention, there are other techniques to parallelize work common in embedded applications. Functional decomposition is one technique or you can partition cores in an asymmetric fashion."
"Huh?" the software engineer asked.
At this point, I realized that continuing the discussion would require detail and time that neither of us really wanted to spend at this point so I quickly brought up a different topic. "Let's not talk too much shop today. How are the kids?" I asked.
The questions raised in the previous conversation include:
What are multi-core processors and what benefits do they provide?
What applications can benefit from multi-core processors and how do you derive the benefit?
What are the challenges when applying multi-core processors? How do you overcome them?
What is unique about the embedded market segments with regard to multi-core processors?
Many of the terms used in the conversation may not be familiar to the reader and this is intentional. The reader is encouraged to look up any unfamiliar term in the glossary or hold off until the terms are introduced and explained in detail in later portions of the book. The rest of this chapter looks at each of the key points mentioned in the conversation and provides a little more detail as well as setting the tone for the rest of the book. The following chapters expound on the questions and answers in even greater detail.
1.2 The Advent of Multi-core Processors
A multi-core processor consists of multiple central processing units (CPUs) residing in one physical package and interfaced to a motherboard. Multi-core processors have been introduced by semiconductor manufacturers across multiple market segments. The basic motivation is performance – using multi-core processors can result in faster execution time, increased throughput, and lower power usage for embedded applications. The expectation is that the ratio of multi-core processors sold to single core processors sold will trend even higher over time as the technical needs and economics make sense in increasing numbers of market segments. For example, in late 2006 a barrier was crossed when Intel® began selling more multi-core processors than single core processors in the desktop and server market segments. Single core processors still have a place where absolute cost is prioritized over performance, but again the expectation is that the continuing march of technology will enable multi-core processors to meet the needs of currently out-of-reach market segments.
1.3 Multiprocessor Systems Are Not New
A multiprocessor system consists of multiple processors residing within one system. The processors that make up a multiprocessor system may be single core or multi-core processors. Figure 1.1 shows three different system layouts, a single core/single processor system, a multiprocessor system, and a multiprocessor/multi-core system.
Multiprocessor systems, which are systems containing multiple processors, have been available for many years. For example, pick up just about any book on the history of computers and you can read about the early Cray machines or the Illiac IV. The first widely available multiprocessor systems employing x86 processors were the Intel iPSC systems of the late 1980s, which configured a set of Intel® i386™ processors in a cube formation. The challenge in programming these systems was how to efficiently split the work between multiple processors each with its own memory. The same challenge exists in today's multi-core systems configured in an asymmetric layout where each processor has a different view of the system. The first widely available dual processor IA-32 architecture system where memory is shared was based upon the Pentium® processor launched in 1994. One of the main challenges in programming these systems was the coordination of access to shared data by the multiple processors. The same challenge exists in today's multi-core processor systems when running under a shared memory environment.
Increased performance was the motivation for developing multiprocessor systems in the past and the same reason multi-core systems are being developed today. The same relative benefits of past multiprocessor systems are seen in today's multi-core systems. These benefits are summarized as:
Faster execution time
In the early 1990s, a group of thirty 60 Megahertz (MHz) Pentium processors with each processor computing approximately 5 million floating-point operations a second (MFLOPS) amounted in total to about 150 MFLOPS of processing power. The processing power of this pool of machines could be tied together using an Application Programming Interface (API) such as Parallel Virtual Machine (PVM) to complete complicated ray-tracing algorithms.
Today, a single Intel® Core™ 2 Quad processor delivers on the order of 30,000 MFLOPS and a single Intel® Core™ 2 Duo processor delivers on the order of 15,000 MFLOPS. These machines are tied together using PVM or Message Passing Interface (MPI) and complete the same ray-tracing algorithms working on larger problem sizes and finishing them in faster times than single core/single processor systems. The Dual-Core Intel® Xeon® Processor 5100 series is an example of a multi-core/ multi-processor that features two dual-core Core™ processors in one system. Figure 1.2 is a sample embedded platform that employs this particular dual-core dual processor.
1.4 Applications Will Need to be Multi-threaded
Paul Otellini, CEO of Intel Corporation, stated the following at the Fall 2003 Intel Developer Forum:
We will go from putting Hyper-threading Technology in our products to bringing dual-core capability in our mainstream client microprocessors over time. For the software developers out there, you need to assume that threading is pervasive.
This forward-looking statement serves as encouragement and a warning that to take maximum advantage of the performance benefits of future processors you will need to take action. There are three options to choose from when considering what to do with multi-core processors:
1. Do nothing
2. Multi-task or Partition
The first option, "Do nothing," maintains the same legacy software with no changes to accommodate multi-core processors. This option will result in minimal performance increases because the code will not take advantage of the multiple cores and only take advantage of the incremental increases in performance offered through successive generations of improvements to the microarchitecture and the software tools that optimize for them.
The second option is to multi-task or partition. Multi-tasking is the ability to run multiple processes at the same time. Partitioning is the activity of assigning cores to run specific operating systems (OSes). Multi-tasking and partitioning reap performance benefits from multi-core processors. For embedded applications, partitioning is a key technique that can lead to substantial improvements in performance or reductions in cost.
The final option is to multi-thread your application. Multi-threading is one of the main routes to acquiring the performance benefits of multi-core processors. Multi-threading requires designing applications in such a way that the work can be completed by independent workers functioning in the same sandbox. In multi-threaded applications, the workers are the individual processor cores and the sandbox represents the application data and memory.
Excerpted from Software Development for Embedded Multi-core Systems by Max Domeika Copyright © 2008 by Elsevier Inc. . Excerpted by permission of Newnes. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.