O'Reilly logo

UPC: DISTRIBUTED SHARED MEMORY PROGRAMMING by Katherine Yelick, Thomas Sterling, William Carlson, Tarek El-Ghazawi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 6

Synchronization and Memory Consistency

Although parallel processing enables fast execution, it also creates the need for synchronization. Synchronization operations ensure that although threads execute independently, their efforts are coordinated such that the same result that would be produced by a sequential execution is achieved. It is, however, equally important not to overspecify such coordination, in order to give threads enough flexibility to overlap their activities and optimize the overall execution time. Synchronization is in general one of the more difficult issues in parallel computing. However, it should be noted that for most scientific codes, the needed synchronization concepts and constructs are typically the simpler ones, and Sections 6.1 and 6.2 might be providing all or most of what is needed for scientific applications. Software system applications (e.g., a parallel database management system) typically require the more advanced concepts. UPC supports a range of synchronization primitives from the simple to the sophisticated to support all application needs. Therefore, in addition to scientific applications, we consider a number of standard computer science problems that can illustrate some of the UPC concepts in this chapter, such as the dining philosophers and the bakery shop.

One can differentiate between control synchronization and data (memory consistency) synchronization. Along the lines of control synchronization, two questions that can be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required