 |
Is Parallel Programming Hard, And If So, What Can You Do About It?
新一代平行處理架構的技術戰略
Paul E. McKenney,
Distinguished Engineer, IBM, Linaro
|
Introduction:
Paul E. McKenney is an IBM Distinguished Engineer at the Linux Technology Center, where he maintains the RCU implementation [1] within the Linux kernel, which serves workloads all the way from cellphones to supercomputers. Prior to that, he worked on the parallel DYNIX/ptx UNIX kernel at Sequent, and prior to that on packet-radio and Internet protocols (but long before it was polite to mention Internet at cocktail parties), system administration, business applications, and embedded/real-time systems.
Paul has recently returned to the embedded space, leading the IBM Linaro-consortium [2] assignees. In that role, he analyzed the Android wakelock requirements [3], which might someday help to appropriate Android support appear in the upstream Linux kernel. Now that multicore CPUs are appearing in many hand-held embedded devices, Paul is able to combine his parallel-programming and embedded experience, which is not something he would have guessed during his first stint with embedded in the early 1980s!
Paul received bachelors degrees in Computer Science and in Mechanical Engineering from Oregon State University in 1981, a masters degree in Computer Science from Oregon State University in 1988, as well as a Ph.D. in Computer Science and Engineering from Oregon Health and Sciences University in 2004. His Ph.D. topic was of course RCU [4].
References:
[1] http://www.rdrop.com/users/paulmck/RCU
[2] http://www.linaro.org
[3] https://wiki.linaro.org/WorkingGroup/KernelConsolidation/Projects/AndroidSuspendBlockers
[4] http://www.rdrop.com/users/paulmck/RCU/RCUdissertation.2004.07.14e1.pdf
Abstract:
Parallel programming has earned a reputation of being extremely difficult. However, given the large quantity of production-quality parallel code being produced all around the world for a variety of open-source projects, it is worth asking whether this reputation is justified. Decades ago, parallelism's bad reputation was in fact justified for the following reasons:
- Parallel systems were rare and expensive.
- Very few people got the chance to use parallel systems.
- There was almost no publicly available parallel code.
- Parallel engineering discipline was confined to a few companies creating proprietary parallel systems.
- Technological obstacles such as synchronization overhead, deadlock, and data races.
But some things have changed dramatically over the past ten years. Parallel systems are dirt cheap and readily available. As a result, almost anyone can now use and program parallel systems. Any number of open-source projects ranging from the Linux kernel to MariaDB to Samba support parallelism, and their code can be downloaded and studied by anyone with Internet access. These projects do their work in the open, so that successful parallel programming engineering disciplines can also be studied by anyone with Internet access [3] [4] [5] [6].
Of course, some things have not changed. Despite all the progress over the past few decades, if you acquire locks out of order, you will still get a deadlock condition. However, engineering discipline, in other words, using the right tool for the job, can help you and your team avoid these pitfalls. This talk will give a brief overview of the technical and organizational measures you should take to successfully make use of parallelism.
References:
[1] http://www.rdrop.com/~paulmck/scalability
[2] http://www.rdrop.com/~paulmck/RCU
[3] http://kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html
[4] http://paulmck.livejournal.com/tag/perfbook
[5] http://paulmck.livejournal.com/18755.html
[6] http://paulmck.livejournal.com/tag/is%20parallel%20programming%20hard |