Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Rewrite the following arithmetic expression to take advantage of concurrent proc

ID: 3723764 • Letter: R

Question

Rewrite the following arithmetic expression to take advantage of concurrent processing and then write the code utilizing the COBEGIN and COEND to mark sections of concurrent code. [ an example of what is being sought is seen on the lower part of Page 193 - see attached picture ]

ations of Concurrent Programming Applications of we evaluate this equation faster if we use multiple processors? Let LCOBEGIN and COEND—that identify the instructio cessed concurrently (assuming that a sufficient number of CPUs are a When we rewrite our expression to take advantage of concurrent processin Can we evaluate the two terms--COBEGIN processed concu tiple processors? Let's introduce that identify the instructions that can be place the results in three te * number of CPUs are available). look like this: e temporary storage locations (T1, T2, T3, and so on), it can COBEGIN T1 = A 7 B T2 = (D + E) T3 = (F - G) COEND COBEGIN T4 = 10 - T1 T5 = T2 ** T3 COEND Z = T4 + C (T5) As shown in Table 6.5, to solve Z = 10 – A / B + C (D + E) ** (F - G), the first three operations can be done at the same time if our computer system has at least three pro- cessors. The next two operations are done at the same time, and the last expression is performed serially with the results of the first two steps, as shown in Figure 6.9.

Explanation / Answer

Answer:

Advantages of Concurrent processing:

1. Concurrent processing Increases the program throughput.

2. Concurrent processing allows the time that would be spent waiting to be used for another task.

Given Expression W = (A-B)*X + (Y+C)**(D+E)

COBEGIN

T1=(A-B)

T2=(Y+C)

T3=(D+E)

COEND

COBEGIN

T4=T1 * X

T5=T2 ** T3

COEND

W=T4 + T5

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote