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

Real Time Operating Systems Questions and Answers

Answer: C

Blocking ends when the awaited event or timeout arrives; suspension ends only when another task or the kernel resumes it. A suspended task will therefore sit through the very event it was waiting for, which is occasionally what is wanted and often a bug.

Please log in or register to report this question.

12.

Put the states a task passes through in order, from creation to first execution.

1. Running   2. Created   3. Ready   4. Selected by the scheduler

Answer: D

Creation builds the control block and the stack, the task then becomes ready, the scheduler picks it when it is the highest priority ready task, and it runs. Every later transition is a cycle among the last three states.

Please log in or register to report this question.

Answer: A

Only the volatile state has to move, and how much that is depends on the core: a part with a floating point unit has far more to save. The switch is pure overhead, which is why its cost is quoted in cycles and why very frequent switching is wasteful.

Please log in or register to report this question.

Answer: B

A switch costing a hundred cycles at a thousand switches a second spends a hundred thousand cycles a second on bookkeeping. In a well designed kernel the cost is independent of the number of tasks, which is part of what determinism means.

Please log in or register to report this question.

15.

A kernel whose context switch takes 120 cycles on a 48 MHz core spends, at 1000 switches per second, about

Answer: C

A hundred and twenty thousand cycles a second out of forty-eight million is one four-hundredth. It becomes a real concern at ten or a hundred times that switching rate, which is why a thousand-hertz tick with many tasks deserves a check.

Please log in or register to report this question.

Answer: D

Thirty-two extra registers double or treble the state to be preserved, which is why many kernels save them lazily, only for tasks that actually use them. Marking which tasks need it is part of configuring such a system.

Please log in or register to report this question.

Answer: A

Correct answer: can take the processor from a running task without its consent

Preemption is what makes response time predictable: the moment a higher priority task becomes ready, the kernel switches to it. A cooperative kernel depends on every task yielding voluntarily, so one badly behaved task blocks everything and no latency can be guaranteed.

Please log in or register to report this question.

Answer: B

A task that loops without yielding starves everything else, and the latency of every other task becomes the longest run between yields anywhere in the system. In exchange, shared data is safe between yields, which greatly simplifies the code.

Please log in or register to report this question.

Answer: C

Correct answer: measure timeouts and delays and to drive time slicing

The tick is a periodic interrupt from which the kernel counts time, so every delay and timeout is expressed in ticks and expires on one. That is why the tick period sets the resolution of all timing the kernel provides.

Please log in or register to report this question.

Answer: D

Correct answer: delay it by up to a whole tick, the resolution being 10 ms

A delay expires on a tick, and the request arrives at an arbitrary point within one, so the actual delay lies between the requested value and that value plus a tick. Asking for less than a tick therefore yields anything up to 10 ms, and shorter delays need a hardware timer rather than the kernel.

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