RTOS Question:
What is RTOS?
Real-Time Operating System
is a multitasking operating system intended for real-time applications. It is
used on every device/system needing real time operations that means operations
based not only on correctness but also upon the time (clock cycles) in which
they are performed.
In general, an operating
system (OS) is responsible for managing the hardware resources of a
computer and hosting applications that run on the computer. An RTOS performs
these tasks, but is also specially designed to run applications with very
precise timing and a high degree of reliability. This can be especially
important in measurement and automation systems where downtime is costly or a
program delay could cause a safety hazard. To be considered “real-time”, an operating
system must have a known maximum time for each of the critical operations that
it performs (or at least be able to guarantee that maximum most of the time).
Some of these operations include OS calls and interrupt handling. Operating
systems that can absolutely guarantee a maximum time for these operations are
commonly referred to as “hard real-time”, while operating systems that can only
guarantee a maximum most of the time are referred to as “soft real-time”.
Example:
Imagine that you are designing an airbag system for a new model of car. In this
case, a small error in timing (causing the airbag to deploy too early or too
late) could be catastrophic and cause injury. Therefore, a hard real-time
system is needed; you need assurance as the system designer that no single
operation will exceed certain timing constraints. On the other hand, if you
were to design a mobile phone that received streaming video, it may be ok to
lose a small amount of data occasionally even though on average it is important
to keep up with the video stream. For this application, a soft real-time
operating system may suffice. An RTOS can guarantee that a program will run
with very consistent timing. Real-time operating systems do this by providing
programmers with a high degree of control over how tasks are prioritized, and
typically also allow checking to make sure that important deadlines are met.
How Real-Time OSs
Differ from General-Purpose OSs?
Operating systems such as
Microsoft Windows and Mac OS can provide an excellent platform for developing
and running your non-critical measurement and control applications. However,
these operating systems are designed for different use cases than real-time
operating systems, and are not the ideal platform for running applications that
require precise timing or extended up-time. This section will identify some of
the major under-the-hood differences between both types of operating systems,
and explain what you can expect when programming a real-time application.
Interrupt
Latency
Interrupt latency is
measured as the amount of time between when a device generates an interrupt and
when that device is serviced. While general-purpose operating systems may take
a variable amount of time to respond to a given interrupt, real-time operating
systems must guarantee that all interrupts will be serviced within a certain
maximum amount of time. In other words, the interrupt latency of real-time
operating systems must be bounded
Unanswered Interview Questions If
you know comment as reply)
What is the use of Passive
error node?
Error Passive receivers can
no longer interrupt the data transfer as a recessive Error Flag does not
influence the bus levels. An Error Passive transmitter can still interrupt its
own message by sending a passive Error Flag. Attention, if one Receiver is in
error passive mode no data consistency is guaranteed any more.
How to find the bug in code
using debugger if pointer is pointing to a illegal value?
If two CAN messages with
same ID sending at a same time, different data which can node will gain
arbitration? How to test it?
Is it possible to declare
struct and union one inside other? Explain with example
- Spi and I2C difference.?
- What is UDS advantages?
- What is cross compiler
- Unit/integration/all testings.
- Regression testing.
- Test case types.
- Malloc calloc
- Function pointers Advantage where it is used?
How many can database files
are required for CAN Network simulation in CANoe tool.
what is the difference
between CANalyzer,CANoe and CANape tools?
Mention the few uses of the
CANoe tool?
what is a panel is CANoe
Tool and its Use?
Why CAPL scripting is used
in CANoe tool?
Is it possible to simulate
other ECU’s Except Test ECU without CAPL Scripting in CANoe tool?
what is purpose of CCP
protocol which is also used in CANape tool?
Embedded Development
Documents:
RTOS
1.
What is a Real-Time System?2. Does the RTOS give you a flexible set of scheduling policies?
3. Does the RTOS use the dynamic object’s address as its identifier?
4. Are interrupts handled with a macro/function or do you have to write your own prologue (entry) and epilogue (exit)?
5. How does the RTOS synchronize with events? Do your event synchronization objects automatically clear with a task release or can events be missed? Can multiple tasks wait on a single event? Can a single task wait on multiple events?
6. Does the RTOS allow you to count both periodic or aperiodic ticks?
7. Can the RTOS count ticks other than time?
8. Are Timers/Alarms globally available so that they can be used by multiple tasks or are they tied to a single task? Does the RTOS allow you to define future actions to be taken when any counter reaches a predefined value?
9. Does the RTOS manage RAM with a heap that can create non-deterministic response and fragmentation?
10.Does the RTOS provide multiple data passing options?
11. Does the RTOS allow data to be passed between tasks and ISRs (or just between tasks)?
12. How does the RTOS provide exclusive access to resources? Does it use binary semaphores or mutexes?
13. Does the RTOS have a mechanism to prevent priority inversion—when a low priority task has control of a resource that is required by a higher priority task?
14. How the RTOS is coded. Is it designed for deterministic operation? Does it ensure low system overhead? Low latency? Responsive services?
15. Write a code to connect Hardware interrupt to ISR?
16. What is priority inversion ? and What is the solution ?
17. Explain Priority Inheritance
18. Explain various types of Scheduling
19. Which RTOS supports Non-Preemptive scheduling ? Why other scheduling methods are supported by such Oses?
20. RTOS vs OS
21. what is a non re-entrant code?
22. Is unix a multitasking or multiprocessing operating system? whats the difference between the two?
23. What is stack overflow and heap overflow?
24. What is a core dump?
25. Windows also has multiple processes has process priotities switches between multiple process, how RTOS is different from that?
26. what is paging, segmentation Why do we need it?
27. write a code to check wther a stack grows upwards or downwards?
28. Why do we require semaphore mutex?
29. write a small piece of code protecting a shared memory variable with a semaphore?
What is RTOS?
Real-Time Operating System
is a multitasking operating system intended for real-time applications. It is
used on every device/system needing real time operations that means operations
based not only on correctness but also upon the time (clock cycles) in which
they are performed.
In general, an operating
system (OS) is responsible for managing the hardware resources of a
computer and hosting applications that run on the computer. An RTOS performs
these tasks, but is also specially designed to run applications with very
precise timing and a high degree of reliability. This can be especially
important in measurement and automation systems where downtime is costly or a
program delay could cause a safety hazard. To be considered “real-time”, an operating
system must have a known maximum time for each of the critical operations that
it performs (or at least be able to guarantee that maximum most of the time).
Some of these operations include OS calls and interrupt handling. Operating
systems that can absolutely guarantee a maximum time for these operations are
commonly referred to as “hard real-time”, while operating systems that can only
guarantee a maximum most of the time are referred to as “soft real-time”.
Example:
Imagine that you are designing an airbag system for a new model of car. In this
case, a small error in timing (causing the airbag to deploy too early or too
late) could be catastrophic and cause injury. Therefore, a hard real-time
system is needed; you need assurance as the system designer that no single
operation will exceed certain timing constraints. On the other hand, if you
were to design a mobile phone that received streaming video, it may be ok to
lose a small amount of data occasionally even though on average it is important
to keep up with the video stream. For this application, a soft real-time
operating system may suffice. An RTOS can guarantee that a program will run
with very consistent timing. Real-time operating systems do this by providing
programmers with a high degree of control over how tasks are prioritized, and
typically also allow checking to make sure that important deadlines are met.
How Real-Time OSs
Differ from General-Purpose OSs?
Operating systems such as
Microsoft Windows and Mac OS can provide an excellent platform for developing
and running your non-critical measurement and control applications. However,
these operating systems are designed for different use cases than real-time
operating systems, and are not the ideal platform for running applications that
require precise timing or extended up-time. This section will identify some of
the major under-the-hood differences between both types of operating systems,
and explain what you can expect when programming a real-time application.
Interrupt
Latency
Interrupt latency is
measured as the amount of time between when a device generates an interrupt and
when that device is serviced. While general-purpose operating systems may take
a variable amount of time to respond to a given interrupt, real-time operating
systems must guarantee that all interrupts will be serviced within a certain
maximum amount of time. In other words, the interrupt latency of real-time
operating systems must be bounded
Unanswered Interview Questions If
you know comment as reply)
What is the use of Passive
error node?
Error Passive receivers can
no longer interrupt the data transfer as a recessive Error Flag does not
influence the bus levels. An Error Passive transmitter can still interrupt its
own message by sending a passive Error Flag. Attention, if one Receiver is in
error passive mode no data consistency is guaranteed any more.
How to find the bug in code
using debugger if pointer is pointing to a illegal value?
If two CAN messages with
same ID sending at a same time, different data which can node will gain
arbitration? How to test it?
Is it possible to declare
struct and union one inside other? Explain with example
- Spi and I2C difference.?
- What is UDS advantages?
- What is cross compiler
- Unit/integration/all testings.
- Regression testing.
- Test case types.
- Malloc calloc
- Function pointers Advantage where it is used?
No comments:
Post a Comment