The Art of Concurrency by Breshears Clay
Author:Breshears, Clay [Clay Breshears]
Language: eng
Format: epub
Tags: COMPUTERS / Software Development & Engineering / General
ISBN: 9780596555788
Publisher: O'Reilly Media
Published: 2009-05-06T16:00:00+00:00
This example uses a while loop to keep threads executing passes as long as there is still a chance that some data remains to be sorted. For each pass through the data, the maximum number of unsorted elements (iCounter) is accessed (protected by the CRITICAL_SECTION object BLock[0]) and stored locally in i. If the number of potential unsorted items is less than or equal to zero, the sorting is done and the Done flag is set. When other threads complete their current pass, the while conditional test will terminate them. Before this determination is made, the index of the last slot in the first data zone is stored in releasePoint.
The j loop passes through the array element by element, compares the values of A[j] with A[j+1], and swaps them if they are out of order. If the thread has reached the end of the current data zone, it releases the CRITICAL_SECTION object on that zone and waits for the thread in the next zone to release that lock before proceeding. Once the end of the array has been reached, the thread in that zone releases the last CRITICAL_SECTION object used. If no exchanges were made during the just completed pass, the thread sets the Done flag.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12592)
Hello! Python by Anthony Briggs(9928)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9802)
The Mikado Method by Ola Ellnestam Daniel Brolund(9787)
Dependency Injection in .NET by Mark Seemann(9348)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8310)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7772)
Grails in Action by Glen Smith Peter Ledbrook(7705)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7567)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7170)
Microservices with Go by Alexander Shuiskov(6941)
Practical Design Patterns for Java Developers by Miroslav Wengner(6855)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6801)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6424)
Angular Projects - Third Edition by Aristeidis Bampakos(6217)
The Art of Crafting User Stories by The Art of Crafting User Stories(5731)
NetSuite for Consultants - Second Edition by Peter Ries(5661)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5478)
Kotlin in Action by Dmitry Jemerov(5074)
