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

Device Drivers Questions and Answers

Answer: A

Everything above it works in terms of open, read and write, or of the driver's own named operations, and knows nothing of bit positions. That separation is what allows the device to be changed without touching the application.

Please log in or register to report this question.

2.

The layer that hides the differences between two microcontrollers of the same family is usually called

Answer: B

It sits below the driver and offers uniform register access and clock and pin services, so a driver written once compiles for several parts. The board support package is the layer above it that says what is fitted on this particular board.

Please log in or register to report this question.

Answer: C

Correct answer: operations in terms of the device's function

A driver exists to hide the hardware, so its interface should speak of reading a temperature or sending a frame rather than of registers, vectors and channels. Exposing those ties every caller to the particular device, and a change of part then propagates through the whole application instead of stopping at the driver.

Please log in or register to report this question.

Answer: D

Correct answer: the application's decision about what to do with the data

The driver’s business is the device: starting it, servicing its interrupt, and converting its raw output into meaningful units. What is then done with the value is policy, and belongs above the driver - putting it inside makes the driver unusable for any other application.

Please log in or register to report this question.

Answer: A

Waiting in a loop for a status bit is the simplest code there is, and for a hundred microseconds of initialisation it costs nothing worth saving. It becomes indefensible the moment the wait is long or the arrival time unknown.

Please log in or register to report this question.

Answer: B

The device announces itself instead of being asked, so the waiting time becomes available to other tasks or to sleep. It costs more code, the latency of the handler, and the buffering that the asynchrony makes necessary.

Please log in or register to report this question.

7.

A DMA-driven driver differs from an interrupt-driven one in that the processor is involved

Answer: C

The controller moves every byte and raises one interrupt when the block is done, so a thousand samples cost one handler entry rather than a thousand. Setting up the descriptor and handling the completion are what remain for the processor.

Please log in or register to report this question.

Answer: D

A hundred thousand handler entries a second at even twenty cycles each is an eighth of the processor spent on overhead alone. One interrupt per buffer reduces it to nothing measurable, which is the ordinary reason DMA is chosen.

Please log in or register to report this question.

Answer: A

Correct answer: one buffer to be processed while the other fills

With two buffers the DMA controller fills one while the processor works on the other, and they exchange roles at each completion. Nothing is transferred faster; what is gained is that no data arrives while there is nowhere to put it, so a continuous stream can be handled without loss.

Please log in or register to report this question.

Answer: B

Blocking suits a task that has nothing else to do and keeps the calling code simple, since the data is there when the call returns. Non-blocking suits a task with other work and pushes the retry logic up into the caller.

Please log in or register to report this question.

Loading…
Tags: Device Drivers Questions and Answers || Device Drivers MCQ Questions and Answers || Device Drivers GK Questions and Answers || Device Drivers GK MCQ Questions || Device Drivers Multiple Choice Questions and Answers || Device Drivers GK || GK on Device Drivers || Embedded Systems Questions and Answers || Embedded Systems MCQ Questions and Answers || Embedded Systems GK Questions and Answers || GK on Embedded Systems