Linux Embedded systems Interview Questions & Answers

  1. Question 1. Explain What Is Embedded System In A Computer System?

    Answer :

    An embedded system is a computer system that is part of a larger system or machine.  It is a system with a dedicated function within a larger electrical or mechanical system.

  2. Question 2. Mention What Are The Essential Components Of Embedded System?

    Answer :

    Essential components of embedded system includes
    •I/O circuits
    •System application specific circuits
    •It ensures the availability of System Memory
    •It checks the Processor Speed availability
    •The need to limit power lost when running the system continuously
    •Real Time Operating System
    •It runs a process as per scheduling and do the switching from one process to another

  3. Red Hat Linux Essentials Interview Questions

  4. Question 3. Why Embedded System Is Useful?

    Answer :

    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.

  5. Question 4. Explain What Are Real-time Embedded Systems?

    Answer :

    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.

  6. Linux Embedded systems Tutorial

  7. Question 5. Explain What Is Microcontroller?

    Answer :

    The microcontroller is a self-contained system with peripherals, memory and a processor that can be used as embedded system.

  8. Red Hat Linux System Administration Interview Questions

  9. Question 6. Mention What Is The Difference Between Microprocessor And Microcontroller?

    Answer :

    Microprocessor is managers of the resources (I/O, memory) which lie outside of its architecture Microcontroller have I/O, memory, etc. built into it and specifically designed for control.

  10. Question 7. What Does Dma Address Will Deal With?

    Answer :

    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.

  11. Unix/Linux Tutorial
    Ubuntu Certified Professional Interview Questions

  12. Question 8. Explain What Is Interrupt Latency? How Can You Reduce It?

    Answer :

    Interrupt latency is a time taken to return from the interrupt service routine post handling a specific interrupt.  By writing minor ISR routines, interrupt latency can be reduced.

  13. Question 9. Mention What Are Buses Used For Communication In Embedded System?

    Answer :

    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.

  14. IBM AIX Interview Questions

  15. Question 10. List Out Various Uses Of Timers In Embedded System?

    Answer :

    Timers in embedded system are used in multiple ways

    • Real Time Clock (RTC) for the system
    • Initiating an event after a preset time delay
    • Initiating an even after a comparison of preset times
    • Capturing the count value in timer on an event
    • Between two events finding the time interval
    • Time slicing for various tasks
    • Time division multiplexing
    • Scheduling of various tasks in RTOS

  16. Question 11. Explain What Is A Watchdog Timer?

    Answer :

    A watchdog timer is an electronic device or electronic card that execute specific operation after certain time period if something goes wrong with an electronic system.

  17. Solaris Interview Questions

  18. Question 12. Explain What Is The Need For An Infinite Loop In Embedded Systems?

    Answer :

    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.

  19. Red Hat Linux Essentials Interview Questions

  20. Question 13. List Out Some Of The Commonly Found Errors In Embedded Systems?

    Answer :

    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

  21. Question 14. Explain What Is Semaphore?

    Answer :

    A semaphore is an abstract datatype or variable that is used for controlling access, by multiple processes to a common resource in a concurrent system such as multiprogramming operating system.  Semaphores are commonly used for two purposes

    • To share a common memory space
    • To share access to files

  22. Question 15. When One Must Use Recursion Function? Mention What Happens When Recursion Functions Are Declared Inline?

    Answer :

    Recursion function can be used when you are aware of the number of recursive calls is not excessive. Inline functions property says whenever it will called, it will copy the complete definition of that function. Recursive function declared as inline creates the burden on the compilers execution.

  23. HP-ux 11iv3 system administration Interview Questions

  24. Question 16. Explain Whether We Can Use Semaphore Or Mutex Or Spinlock In Interrupt Context In Linux Kernel?

    Answer :

    Semaphore or Mutex cannot be used for interrupt context in Linux Kernel. While spinlocks can be used for locking in interrupt context.

  25. Question 17. What Is The Need For An Infinite Loop In Embedded Systems?

    Answer :

    Infinite Loops are those program constructs where in there is no break statement so as to get out of the loop, it just keeps looping over the statements within the block defined.


    While(Boolean True) OR for(;;);

    Embedded systems need infinite loops for repeatedly processing/monitoring the state of the program. One example could be the case of a program state continuously being checked for any exceptional errors that might just occur during run time such as memory outage or divide by zero etc.,

  26. Red Hat cluster Interview Questions

  27. Question 18. A Vast Majority Of High Performance Embedded Systems Today Use Risc Architecture Why?

    Answer :

    •According to the instruction sets used, computers are normally classified into RISC and CISC. RISC stands for ‘Reduced Instruction Set Computing’ . The design philosophy of RISC architecture is such that only one instruction is performed on each machine cycle thus taking very less time and speeding up when compared to their CISC counterparts.
    •Here the use of registers is optimised as most of the memory access operations are limited to store and load operations.
    •Fewer and simple addressing modes, and simple instruction formats leads to greater efficiency, optimisation of compilers, re-organisation of code for better throughput in terms of space and time complexities. All these features make it the choice of architecture in majority of the Embedded systems.
    •CISC again have their own advantages and they are preferred whenever the performance and compiler simplification are the issues to be taken care of.

  28. Red Hat Linux System Administration Interview Questions

  29. Question 19. Why Do We Need Virtual Device Drivers When We Have Physical Device Drivers?

    Answer :

    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.

  30. Question 20. What Is The Need For Dmac In Es?

    Answer :

    •Direct memory access is mainly used to overcome the disadvantages of interrupt and progam controlled I/O.
    •DMA modules usually take the control over from the processor and perform the memory operations and this is mainly because to counteract the mismatch in the processing speeds of I/O units and the procesor. This is comparatively faster.
    •It is an important part of any embedded systems,and the reason for their use is that they can be used for bursty data transfers instead of single byte approaches.
    •It has to wait for the systems resources such as the system bus in case it is already in control of it.

  31. Embedded C Interview Questions

  32. Question 21. What Is Endianness Of A System And How Do Different Systems Communicate With Each Other?

    Answer :

    •Endianness basically refers to the ordering of the bytes within words or larger bytes of data treated as a single entity.
    •When we consider a several bytes of data say for instance 4 bytes of data,XYZQ the lower byte if stored in a Higher address and others in successively decreasing addresses, then it refers to the Big Endian and the vice versa of this refers to Little Endian architecture.
    •Intel 80×86 usually follows Little Endian and others like IBM systems follow Big Endian formats.
    •If the data is being transmitted care has to be taken so as to know as to which byte,whether the higher or the lower byte is being transmitted.
    •Hence a common format prior to communication has to be agreed upon to avoid wrong interpretation/calculations.
    •Usually layer modules are written so as to automate these conversion in Operating systems.

  33. Question 22. How Are Macros Different From Inline Functions?

    Answer :

    •Macros are normally used whenever a set of instructions/tasks have to be repeatedly performed. They are small programs to carryout some predefined actions.
    •We normally use the #define directive in case we need to define the values of some constants so in case a change is needed only the value can be changed and is reflected throughout.
    #define mul(a,b) (a*b) 
    •The major disadvantage of macros is that they are not really functions and the usual error checking and stepping through of the code does not occur. 
    •Inline functions are expanded whenever it is invoked rather than the control going to the place where the function is defined and avoids all the activities such as saving the return address when a jump is performed. Saves time in case of short codes.
    inline float add(float a,float b)
     return a+b;
    •Inline is just a request to the compiler and it is upto to the compiler whether to substitute the code at the place of invocation or perform a jump based on its performance algorithms.

  34. Question 23. What Could Be The Reasons For A System To Have Gone Blank And How Would You Debug It?

    Answer :

    Possible reasons could be:
    •PC being overheated.
    •Dust having being accumulated all around.
    •CPU fans not working properly .
    •Faulty power connections.
    •Faulty circuit board from where the power is being drawn.
    •Support Drivers not having being installed. 
    •Debugging steps which can be taken are:
    •Cleaning the system thoroughly and maintaining it in a dust-free environment. Environment that is cool enough and facilitates for easy passage of air should be ideal enough.
    •By locating the appropriate support drivers for the system in consideration and having them installed.

  35. Unix/Linux Interview Questions

  36. Question 24. Explain Interrupt Latency And How Can We Decrease It?

    Answer :

    1.Interrupt latency basically refers to the time span an interrupt is generated and it being serviced by an appropriate routine defined, usually the interrupt handler.
    2.External signals, some condition in the program or by the occurrence of some event, these could be the reasons for generation of an interrupt.
    3.Interrupts can also be masked so as to ignore them even if an event occurs for which a routine has to be executed.
    4.Following steps could be followed to reduce the latency

    •ISRs being simple and short.
    •Interrupts being serviced immediately
    •Avoiding those instructions that increase the latency period.
    •Also by prioritizing interrupts over threads.
    •Avoiding use of inappropriate APIs.

  37. Ubuntu Certified Professional Interview Questions

  38. Question 25. How To Create A Child Process In Linux?

    Answer :

    Prototype of the function used to create a child process is pid_t fork(void);
    •Fork is the system call that is used to create a child process. It takes no arguments and returns a value of type pid_t.
    •If the function succeeds it returns the pid of the child process created to its parent and child receives a zero value indicating its successful creation.
    •On failure, a -1 will be returned in the parent’s context, no child process will be created, and errno will be set.
    •The child process normally performs all its operations in its parents context but each process independently of one nother and also inherits some of the important attributes from it such as UID, current directory, root directory and so on.

    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.

  39. Question 26. If You Buy Some Rtos, What Are The Features You Look For In?

    Answer :

    •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.

  40. Unix Shell Scripting Interview Questions

  41. Question 27. Why Is Java Mostly Used In Embedded Systems?

    Answer :

    •Java was mainly designed and conceptualised for code that can work on different platforms without any hassles and also for being secure enough so as to not harm or corrupt other modules of code.
    •Features like exception handling, simple syntax and Automatic Garbage collection all work in its favour as the language for use in ES’s.
    •Also that it is widely used in the form of Java applets makes it very popular confining it to the limits of JVM. It is Dynamic in nature.
    •Its use is also being exploited in enterprise systems in the form of J2EE, J2SE, J2ME in case of mobile applications.

  42. IBM AIX Interview Questions

  43. Question 28. What Are The Commonly Found Errors In Embedded Systems?

    Answer :

    •Damage of memory devices due to transient current and static discharges.
    •Malfunctioning of address lines due to a short in the circuit.
    •Malfunctioning of Data lines.
    •Some memory locations being inaccessible in storage due to garbage or errors.
    •Improper insertion of Memory devices into the memory slots.
    •Faulty control signals.

  44. Question 29. What Is The Need For Having Multibyte Data Input And Output Buffers In Case Of Device Ports?

    Answer :

    •It’s normally the case that some devices transfer the output either in a bursty or a sequential manner and also during input entry. If we take the example of keyboards, all the data entered is stored in a buffer and given at a time or one character at a time.
    •In case of networking there may be several requests to access the same resource and all these are queued in a buffer and serviced in the order they are received. Hence to avoid the input/output units from getting overloaded with requests, we use multibyte buffers.

  45. Solaris Administrator Interview Questions

  46. Question 30. What Is The Difference Between Hardware Design And Software Design?

    Answer :

    •Hardware design is designed with the collaboration of interconnected parallel components that inherits the properties of each other. Whereas, Software design is designed with sequential components, that are based on objects and threads.
    •Hardware design structure doesn’t change dynamically and it can’t be created, modified or removed easily. Whereas, Software design structure can be changed dynamically and re-usability features, used to define the components. It also includes easy creation, modification and removal of the components from the software.
    •Hardware design focuses on individual components that are represented using analytical model that uses the transfer functions. Whereas, Software design represent the components using computation model that can have abstract execution engine or it can use the virtual machine that are non-deterministic.