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

Real Time Operating Systems Questions and Answers

Answer: C

A fault that takes hours to appear is characteristic of a slow resource leak or a rare stack excursion, and both are cheap to instrument. Kernels provide high-water mark queries and allocation failure hooks precisely for this.

Please log in or register to report this question.

Answer: D

The task is released when the tick handler runs, and anything ahead of it in priority delays it by an unpredictable amount. A dedicated hardware timer interrupt driving the loop directly, with the kernel used for everything else, is the usual answer.

Please log in or register to report this question.

Answer: A

Correct answer: the figure is impossible, one cycle being 10 ns

At 100 MHz a single clock cycle is 10 nanoseconds, and a context switch saves and restores a register set - tens of cycles at best. Three nanoseconds is less than one cycle, so the figure cannot be right whatever the kernel does. Checking a claim against the clock period is the quickest test available.

Please log in or register to report this question.

Answer: B

Correct answer: worse, because of critical sections in the application itself

A kernel quotes the latency of its own paths, measured with nothing else disabling interrupts. In a real application the drivers and the application code have critical sections of their own, and the worst case is the longest of them added to the kernel’s figure. The published number is a floor, not a prediction.

Please log in or register to report this question.

Answer: C

Correct answer: blocked on a timeout

A task state is a run-time property recorded by the kernel - ready, running, blocked or suspended. Being linked, resident in flash or compiled in a particular way are all properties of the program image before it runs, and the kernel knows nothing of them.

Please log in or register to report this question.

Answer: D

Most kernels offer a static variant of each creation call that takes a pointer to memory the application has declared. Nothing is allocated, the call cannot fail for want of memory, and the object's lifetime is the lifetime of the storage.

Please log in or register to report this question.

Answer: A

Correct answer: preventing preemption for its duration

A critical section disables interrupts or the scheduler so that no other task or handler can touch the data while it is being changed. That is why it must be short: nothing else can run, so its length adds directly to the latency of everything in the system.

Please log in or register to report this question.

Answer: B

Correct answer: adds directly to the worst-case latency of every other activity

Nothing can preempt a critical section, so the highest priority task in the system waits behind it if the interrupt happens to arrive at the wrong moment. The worst-case response is therefore the longest critical section anywhere in the code, in the kernel, the drivers or the application alike.

Please log in or register to report this question.

Answer: C

Four separate byte reads can be interrupted between any two of them, and the handler may increment the counter across a carry, so the value assembled is one that never existed. On a 32-bit core an aligned word read would be atomic and no protection would be needed.

Please log in or register to report this question.

Answer: D

A kernel lock stops other tasks and leaves handlers running, which is enough when only tasks share the datum and much kinder to latency. Where a handler touches it too, interrupts must be disabled, and then the region has to be very short.

Please log in or register to report this question.

Loading…
Tags: Real Time Operating Systems Questions and Answers || Real Time Operating Systems MCQ Questions and Answers || Real Time Operating Systems GK Questions and Answers || Real Time Operating Systems GK MCQ Questions || Real Time Operating Systems Multiple Choice Questions and Answers || Real Time Operating Systems GK || GK on Real Time Operating Systems || Embedded Systems Questions and Answers || Embedded Systems MCQ Questions and Answers || Embedded Systems GK Questions and Answers || GK on Embedded Systems