Machine-translated by Google. Questions are authored in English.
Top

Inter Task Communication Questions and Answers

Answer: C

Copying decouples the two tasks completely: the sender may reuse its buffer at once and the receiver holds a private copy. For large messages the copying costs time, and a pointer to a pool buffer is then queued instead.

Please log in or register to report this question.

Answer: D

A four-byte pointer is copied where a kilobyte of data would be, which matters for an audio or network buffer. The cost is that ownership of the buffer must now be managed by convention, and getting that wrong gives a use-after-free.

Please log in or register to report this question.

Answer: A

Blocking is what applies back-pressure to a producer that is outrunning its consumer, and it is usually what is wanted. A zero timeout gives the immediate error instead, and an overwriting queue is a distinct construct offered by some kernels.

Please log in or register to report this question.

Answer: B

The timeout bounds the wait, which lets the task do something else, or report a fault, when nothing arrives. A zero timeout polls and an infinite one waits for ever, and choosing among the three is the ordinary design decision.

Please log in or register to report this question.

Answer: C

It is a queue of length one, so a second send either blocks or overwrites depending on the kernel. Where only the most recent value matters, an overwriting mailbox is exactly right and a queue would accumulate stale readings.

Please log in or register to report this question.

16.

For a sensor whose most recent reading is the only one of interest, the right construct is

Answer: D

Correct answer: an overwriting mailbox

Where only the latest value matters, queueing older readings is worse than useless: it delays the current one behind stale data and can block the producer. An overwriting mailbox holds one item and replaces it, so the reader always gets the most recent reading and the writer never blocks.

Please log in or register to report this question.

Answer: A

Correct answer: any or all of several distinct events

An event group is a set of bits with a single wait operation, so a task can block until any of several conditions occurs or until all of them have. A semaphore signals one thing, and building the same behaviour from several semaphores requires either several tasks or a polling loop.

Please log in or register to report this question.

Answer: B

Correct answer: every requested bit has been set

With the wait-for-all option the task remains blocked until each bit named in its request has been set, in any order and at any time. With the wait-for-any option the first of them releases it. Bits outside the requested set are ignored either way.

Please log in or register to report this question.

Answer: C

Nothing has to be created, and the send is a write into a field the task already owns, so it costs less time and less RAM than any separate object. The restriction is that it addresses one specific task rather than whoever happens to be waiting.

Please log in or register to report this question.

Answer: D

Correct answer: must name the receiving task

A notification is sent directly to one task, so the sender must know which, and only one task can wait on it. A semaphore is an independent object that any task may signal and any may wait on, which suits a broadcast or an anonymous producer. The notification is faster and lighter for exactly the case it fits.

Please log in or register to report this question.

Loading…
Tags: Inter Task Communication Questions and Answers || Inter Task Communication MCQ Questions and Answers || Inter Task Communication GK Questions and Answers || Inter Task Communication GK MCQ Questions || Inter Task Communication Multiple Choice Questions and Answers || Inter Task Communication GK || GK on Inter Task Communication || Embedded Systems Questions and Answers || Embedded Systems MCQ Questions and Answers || Embedded Systems GK Questions and Answers || GK on Embedded Systems