Linked list for parallel algorithms, Computer Networking

Assignment Help:

Linked List

A linked list is a data structure composed of zero or extra nodes linked by pointers. Each node consists of two parts, as shown in Figure: info field having specific information and next field having address of next node. First node is pointed by an external pointer called head. Last node called tail node does not have address of any node. Therefore, its next field points to null. Linked list with zero nodes is known as null linked list.

1692_linked list.png

                                                                                               Linked List

A large number of operations can be presented using the linked list. For some of the operations like insertion or deletion of the latest data, linked list takes constant time, but it is time consuming for a few other operations like searching a data. We are giving here an instance where linked list is used:

Example 3:

Given a linear linked list, rank the list elements in terms of the distance from each to the last element.

A parallel algorithm for this query is given here. The algorithm assumes there is p number of processors.

Algorithm:

Processor j, 0≤ j

else rank[j] =1 endif

while rank[next[first]]≠0 Processor j, 0≤ j

rank[j]=rank[j]+rank[next[j]]

next[j]=next[next[j]]

endwhile

The working of this algorithm is showing by the following diagram:

1344_Finding rank of elements.png

                                                                    Finding rank of elements


Related Discussions:- Linked list for parallel algorithms

Data and block distribution, Data Distribution Data distribution direct...

Data Distribution Data distribution directives tell the compiler how the program data is to be distributed between the memory areas associated with a set of processors. The log

What is the difference between trigger and rule, What is the difference bet...

What is the difference between trigger and rule? The triggers are known as implicitly by database generated events, whereas stored procedures are known as explicitly by client

What is extranet and intranet, Extranet and Intranet An Extranet is a t...

Extranet and Intranet An Extranet is a type of Intranet (Internal TCP/IP Network) that has been selectively opened to a firm's suppliers, customers. Intranet An intrane

Show the parity check - performance, Q. Show the Parity Check - Performance...

Q. Show the Parity Check - Performance? Parity Check - Performance Is able to detect all single-bit errors Can as well detect burst errors if the total number of

What do you understand by service access point, Q. How two adjacent layers ...

Q. How two adjacent layers communicate in a layered network or what do you understand by Service Access Point? Ans: In layered network, each layer has several entities and enti

Program to use of lastprivate clause, This example illustrate the use of la...

This example illustrate the use of lastprivate clause void for_loop (int n, float *a, float *b) { int i; #pragma omp parallel { #pragma omp for lastprivate(i) for

State the disadvantages of adaptive routing process, State the Disadvantage...

State the Disadvantages of adaptive routing process  (1) The routing decision is more difficult; thus, the processing burden on network nodes enhances. (2) In most cases, ad

What is network layer of osi model, Q. What is network layer of osi model? ...

Q. What is network layer of osi model? - Describe end-to-end delivery of packets. - Defines logical addressing thus that any endpoint can be identified. - Defines how ro

Shared programming using library routines, Shared Programming Using Library...

Shared Programming Using Library Routines The most well-liked of them is the use of combo function called fork() and join(). Fork() function is used to make a new child proces

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd