Professional Multicore Programming by Cameron Hughes & Tracey Hughes

Professional Multicore Programming by Cameron Hughes & Tracey Hughes

Author:Cameron Hughes & Tracey Hughes
Language: eng
Format: epub
Publisher: John Wiley & Sons
Published: 2011-02-10T16:00:00+00:00


A dependency graph is useful for documenting the type of dependency relationship, for example, C for communication or Co for cooperation. S is for synchronization if the communication or cooperation dependency requires synchronization. The dependency graph can be used during the design or testing phase of the Software Development Life Cycle (SDLC). To construct the dependency graph, the adjacency matrix is used. Where there is a 1 in a row column position, it is replaced by the type of relationship. Figure 7-3(B) shows the dependency graph for the three threads. The 0s and 1s have been replaced by C or Co. Where there was a 0, no relationship exists; the space is left blank. For A(1,2), A depends on B for synchronized cooperation, A(2,3) B depends on C for synchronized communication, and A(3,2) C depends on A for synchronized communication. Bidirectional relationships like A ↔ B can also be represented, but there are none in this example. So, as you can see, all of the relationships can be represented in the matrix. For a NULL relationship a 0 is used in the adjacency matrix, and in the dependency matrix that position will be left blank. Figure 7-4 shows the Unified Modeling Language (UML) dependency for these three threads.

Figure 7-4



Download



Copyright Disclaimer:
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.