Hardest Embedded Software Engineer Interview Preparation Guide
Download PDF

Embedded Software Engineer Frequently Asked Questions in various Embedded Software Engineer job interviews by interviewer. The set of questions are here to ensures that you offer a perfect answer posed to you. So get preparation for your new job interview

100 Embedded Software Engineer Questions and Answers:

Table of Contents:

Hardest  Embedded Software Engineer Job Interview Questions and Answers
Hardest Embedded Software Engineer Job Interview Questions and Answers

1 :: Explain me can we use printf inside ISR?

Printf function in ISR is not supported because printf function is not reentrant, thread safe and uses dynamic memory allocation which takes a lot of time and can affect the speed of an ISR up to a great extent.

2 :: Tell me why embedded system is useful?

With embedded system, it is possible to replace dozens or even more of hardware logic gates, input buffers, timing circuits, output drivers, etc. with a relatively cheap microprocessor.

3 :: Explain what is return type of ISR?

ISR does not return anything. An ISR returns nothing because there is no caller in the code to read the returned values.

4 :: Tell me what is interrupt latency?

Interrupt latency is the time required for an ISR responds to an interrupt.

5 :: Tell me what does DMA address will deal with?

DMA address deals with physical addresses. It is a device which directly drives the data and address bus during data transfer. So, it is purely physical address.

6 :: Tell me what are the qualifiers in C?

Volatile- it is about instructing the compiler that a variable will change

Constant- it is about instructing the compiler that a variable will not change.

7 :: Tell me what are real-time embedded systems?

Real-time embedded systems are computer systems that monitor, respond or control an external environment. This environment is connected to the computer system through actuators, sensors, and other input-output interfaces.

8 :: Tell me can we use any function inside ISR?

We can use function inside ISR as long as that function is not invoked from other portion of the code.

9 :: Tell me how many types of IPC mechanism you know?

Different types of IPC mechanism are -

☛ Pipes
☛ Named pipes or FIFO
☛ Semaphores
☛ Shared memory
☛ Message queue
☛ Socket

10 :: Tell me can you have constant volatile variables?

Yes, we can have constant volatile variables

11 :: Explain me what is kernel paging?

Paging is a memory management scheme by which computers can store and retrieve data from the secondary memory storage when needed in to primary memory. In this scheme, the operating system retrieves data from secondary storage in same-size blocks called pages. The paging scheme allows the physical address space of a process to be non continuous. Paging allows OS to use secondary storage for data that does not fit entirely into physical memory.

12 :: Explain some of the commonly found errors in Embedded Systems?

Some of the commonly found errors in embedded systems are

☛ Damage of memory devices static discharges and transient current
☛ Address line malfunctioning due to a short in circuit
☛ Data lines malfunctioning
☛ Due to garbage or errors some memory locations being inaccessible in storage
☛ Inappropriate insertion of memory devices into the memory slots
☛ Wrong control signals

13 :: Suppose you buy some RTOS, what are the features you look for in?

☛ Deterministic operating system having guaranteed worst-case interrupt latency and context-switch times.
☛ Documentation providing for the minimum, average, and maximum number of clock cycles required by each system call.
☛ Interrupt response times should be very minute.
☛ Context switch time should be very low.
☛ Compatibility with several plugin devices.
☛ Overall it should be very reliable.

14 :: Tell me can a pointer be volatile?

If we see the declaration volatile int *p, it means that the pointer itself is not volatile and points to an integer that is volatile. This is to inform the compiler that pointer p is pointing to an integer and the value of that integer may change unexpectedly even if there is no code indicating so in the program.

15 :: Tell us what is the need for an infinite loop in embedded systems?

Embedded systems require infinite loops for repeatedly processing or monitoring the state of the program. For instance, the case of a program state continuously being verified for any exceptional errors that might just happen during run-time such as memory outage or divide by zero, etc.

16 :: Tell me why cannot arrays be passed by values to functions?

In C, the array name itself represents the address of the first element. So, even if we pass the array name as argument, it will be passed as reference and not its address.

17 :: Do you know what is priority inheritance?

Priority inheritance is a solution to the priority inversion problem. The process waiting for any resource which has a resource lock will have the maximum priority. This is priority inheritance. When one or more high priority jobs are blocked by a job, the original priority assignment is ignored and execution of critical section will be assigned to the job with the highest priority in this elevated scenario. The job returns to the original priority level soon after executing the critical section.

18 :: Tell me what is the function of simple thread poll in embedded system?

Simple thread poll allow the ready output to be passed for checking by giving it to the bus that is free and then the output is sent along the thread. The bus can send the output depending on the time that has been given and during the transfer the user won’t be able to perform any other operation. The input is given after finding out the bus is free or not and if it free then a check is made to see that the input exists or not. This thread poll is easy to understand but it is not efficient method to allow the data to be put over the bus manually. The problem of not doing multi-tasking can occur due to doing one task at a time. The method is only be used when input/output occurs at interval that are infrequent.

19 :: Please explain can structures be passed to the functions by value?

Passing structure by its value to a function is possible, but not a good programming practice. First of all, if we pass the structure by value and the function changes some of those values, then the value change is not reflected in caller function. Also, if the structure is big, then passing the structure by value means copying the whole structure to the function argument stack which can slow the program by a significant amount.

20 :: Explain what are the uses of the keyword static?

Static keyword can be used with variables as well as functions. A variable declared static will be of static storage class and within a function, it maintains its value between calls to that function. A variable declared as static within a file, scope of that variable will be within that file, but it can't be accessed by other files.

Functions declared static within a module can be accessed by other functions within that module. That is, the scope of the function is localized to the module within which it is declared.

21 :: Tell me why do we need virtual device drivers when we have physical device drivers?

Device drivers are basically a set of modules/routines so as to handle a device for which a direct way of communication is not possible through the user's application program and these can be thought of as an interface thus keeping the system small providing for minimalistic of additions of code, if any.
Physical device drivers can’t perform all the logical operations needed in a system in cases like IPC, Signals and so on...
The main reason for having virtual device drivers is to mimic the behaviour of certain hardware devices without it actually being present and these could be attributed to the high cost of the devices or the unavailability of such devices.
These basically create an illusion for the users as if they are using the actual hardware and enable them to carryout their simulation results.
Examples could be the use of virtual drivers in case of Network simulators,also the support of virtual device drivers in case a user runs an additional OS in a virtual box kind of a software.

22 :: Do you know what is virtual memory?

Virtual memory is a technique that allows processes to allocate memory in case of physical memory shortage using automatic storage allocation upon a request. The advantage of the virtual memory is that the program can have a larger memory than the physical memory. It allows large virtual memory to be provided when only a smaller physical memory is available. Virtual memory can be implemented using paging.
A paging system is quite similar to a paging system with swapping. When we want to execute a process, we swap it into memory. Here we use a lazy swapper called pager rather than swapping the entire process into memory. When a process is to be swapped in, the pager guesses which pages will be used based on some algorithm, before the process is swapped out again. Instead of swapping whole process, the pager brings only the necessary pages into memory. By that way, it avoids reading in unnecessary memory pages, decreasing the swap time and the amount of physical memory.

23 :: Tell me what are buses used for communication in embedded system?

For embedded system, the buses used for communication includes

I2C: It is used for communication between multiple ICs
CAN: It is used in automobiles with centrally controlled network
USB: It is used for communication between CPU and devices like mouse, etc.
While ISA, EISA, PCI are standard buses for parallel communication used in PCs, computer network devices, etc.

24 :: Tell me significance of watchdog timer in Embedded Systems?

Watchdog timer is basically a timing device that is set for predefined time interval and some event should occur during that time interval else the device generates a time out signal.

One application where it is most widely used is when the mobile phone hangs and no activity takes place, in those cases watchdog timer performs a restart of the system and comes to the rescue of the users.

It is used to reset to the original state whenever some inappropriate events take place such as too many commands being given at the same time or other activities that result in malfunctioning of the GUI. It is usually operated by counter devices.

25 :: Explain me what are the rules followed by Mutexes?

Mutex is also called as Mutual Exclusion is a mechanism that is used to show the preemptive environment and allow providing security methods like preventing an unauthorized access to the resources that are getting used in the system. There are several rules that has to be followed to ensure the security policies:

Mutex are directly managed by the system kernel that provides a secure environment to allow only the applications that passes the security rules and regulations. The mutex consists of objects that are allowed to be called by the kernel.

Mutex can have only one process at a time in its area that is owned by the process using it. This allows less conflict between the different applications or processes that wait for their turn to execute it in the kernel area.

Mutex can be allocated to another mutex that is running some task at a particular time and allow the kernel to have synchronization in between them.

If Mutex is allocated to some other process then the area will consist of the process till the area is having the process in it.
Embedded Software Engineer Interview Questions and Answers
100 Embedded Software Engineer Interview Questions and Answers