Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

CLA-R Sample Exam question 20

The "correct" answer is D, but my question is about answer B - "Two VIs in the API cannot perform ther operations simultaneously".

 

This statement is indeed false if one of the operations uses the Preview Queue Element VI to get a value for operating on, but the problem statement explicitly describes the API as, "each other VI in the API dequeues an element, performs its operations, and then re-enqueues the element." If every API function has to wait to dequeue the token (queue element) before it can operate, then any other function currently operating on the token will effectively have a semaphore on it. Right?

 

It seems like both D and B are true. What am I missing?

0 Kudos
Message 1 of 4
(6,946 Views)

You reallly should post the actual question so we don't have to go look it up.

 

You use a single element Queue to pass data between VIs in an API. Assume that an initialization VI creates the queue, a cleanup VI destroys it, and each other VI in the API dequeues an element, performs its operations, and then re-enqueues the element. The queue reference is passed between the VIs in the API using terminal connections. Assume that the API is used on Microsoft Windows targets. Which of the following statements is true?
a. A single element queue allocates memory when created and does not need to allocate memory afterwards
b. Two VIs in the API cannot perform their operations simultaneously
c. While waiting for an element to become available, a VI uses processor resources to poll the queue
d. The caller of the API can safely branch the queue reference wire without creating copies of the enqueued data


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(6,934 Views)

This is probably an example of poor word choice and, Frankly I boned on this myself going through the example. so lets run though it "bottom up"

D)The caller of the API can safely branch the queue reference wire without creating copies of the enqueued data.

Duh... you will copy an I32 not the entire queue totally and unequivically true.  Proof positive in the Help File or, even the Probe Watch Window

 

C)...a VI uses processor resources..yet we "Assume that the API is used on Microsoft Windows targets"  We are not overriding the OS we are an API inside an application.  Hair splitting fairly fine but..... D was True! C is not more true than D or even as true as D

 

B) Here is the really bad coice of words "perform their operations" especially when the question contained "each other VI in the API dequeues an element, performs its operations, and then re-enqueues the element."  redefining one of the member vi's "Operations" as "Its Operations"  but the member vis have specific "Operations" Wait, Dequeue, work, Enqueue.  Glad NI Retired that distractor.  AND D is true! so a branch could cause member vis to be doing their stuff (Waiting) at the same time, just not "performs its operations"   Really poor wording.  "vi perform operation" is totally ambiguous.

 

A)"A single element queue allocates memory when created and does not need to allocate memory afterwards"  I suspect that this is true EXCEPT for SEQs containing Strings or Arrays or clusters containing strings or arrays where the handle is queued rather than the data itself.  But, this bit me!

 

 

I hope that helps

 

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 4
(6,907 Views)

I was thinking that for answer B, there's not stated that the timeout input to the Dequeue element function is wired or not. So if it were to be wired then that vi didn't have to wait for the queue reference. If it would use the reference however it would generate an error. A weired way of using the oneelement queue but it could explain why B is not true. But maybe it’s just like Jeff wrote, a bad choice of words.

0 Kudos
Message 4 of 4
(6,511 Views)