Realtime Operating System Interview Questions & Answers

Realtime Operating System Interview Questions

Are you a software engineer with experience in Realtime Operating System? If yes, then wisdomjobs can definitely help you to build your career in this ever growing IT industry. In a Realtime Operating System job, you will be able to process the data in a fixed time constraint without any buffer delays. It will help you gain experience in creating, maintaining and updating the components of the fastest growing products of the embedded industry. To advance your career as a Realtime embedded software developer, you can browse the wisdomjobs page. Here you will get all the information of the qualification skills, training courses, job opportunities and salary details related to the Realtime Operating System job. Our experts have made the Realtime Operating System job interview questions and answers, that will prepare you for the big interview.

Realtime Operating System Interview Questions And Answers

Realtime Operating System Interview Questions
    1. Question 1. What Is A Non Re­entrant Code?

      Answer :

      Re entrant code is code which does not rely on being executed without interruption before completion. Reentrant code can be used by multiple, simultaneous tasks. Reentrant code generally does not access global data. Variables within a reentrant function are allocated on the stack, so each instance of the function has its own private data. Non­reentrant code, to be used safely by multiple processes, should have access controlled via some synchronization method such as a semaphore.

    2. Question 2. How Is Rtos Different From Other Os?

      Answer :

      A RTOS offers services that allow tasks to be performed within predictable timing constraints.

    3. Question 3. Is Unix A Multitasking Or Multiprocessing Operating System? Whats The Difference Between The Two?

      Answer :

      unix is a multitasking operating system, multiprocessing means it can run on multiple processors, the multiproceesing os coordinates with multiple processors running in parallel.

    4. Question 4. What Is A Core Dump?

      Answer :

      A core dump is the recorded state of the working memory of a computer program at a specific time, generally when the program has terminated abnormally includes the program counter and stack pointer, memory management information, and other processor and operating system flags and information a fatal error usually triggers the core dump, often buffer overflows, where a programmer allocates too little memory for incoming or computed data, or access to null pointers, a common coding error when an unassigned memory reference variable is accessed.

    5. Question 5. What Is Stack Overflow And Heap Overflow?

      Answer :

      • stack overflow occurs when when the program tries to access memory that is outside the region reserved for the call stack.
      • call stack contains the subroutines called, the local variables.
      • overflow occurs when too many functions are called,huge amount of local variables are allocated.

    6. Question 6. Windows Also Has Multiple Processes Has Process Priorities Switches Between Multiple Process, How Rtos Is Different From That?

      Answer :

      RTOS has predictable timing constraints.

    7. Question 7. How Will U Create A Process In Unix Or Our Os Ose?

      Answer :

      We can use thr fork system call to create a process in UNIX and in OSE the system call create_process is used.

    8. Question 8. What Is A Flat Memory Model And A Shared Memory Model?

      Answer :

      • In a flatmemory model the code and data segment occupies single address space.
      • In a shared model the large memory is divided into different segments and needs a qualifier to identify each segment.
      • In a flat memory model the programmer doesnt need to switch for data and code.

    9. Question 9. What Is Paging, Segmentation Y Do We Need It?

      Answer :

      Paging: Paging is a technique where in the OS makes available the data required as quickly as possible. It stores some pages from the aux device to main memory and when a prog needs a page that is not on the main memory it fetches it from aux memory and replaces it in main memory. It uses specialised algorithms to choose which page to replace from in main memory.

      Caching: It deals with a concept where the data is temperorarily stored in a high speed memory for faster access. This data is duplicated in cache and the original data is stored in some aux memory. This concepts brings the average access time lower.

      Segmentation: Segmentation is a memory management scheme. This is the technique used for memory protection. Any accesses outside premitted area would result in segmentation fault.

      Virtual Memory: This technique enables non­contiguous memory to be accessed as if it were contiguous. Same as paging.

    10. Question 10. Write A Code To Check Whether A Stack Grows Upwards Or Downwards?

      Answer :

      void checkStack()


      int i=2;

      int j=3;

      if(&i > &j) printf("stack grown downwards");

      else printf("stack grows upwards");


      define 2 local variables one after other and try to print the address

    11. Question 11. Why Do We Require Semaphore?

      Answer :

      For process synchronization, it is a mechanism to invoke the sleeping process to become ready for execution. Its mechanism where a process can wait for resources to be available.typical example is producer consumer process. The producer process creates resources and signals the semaphore saying resource is available. Consumer process waiting on the semaphore gets the signal that resource is available.

    12. Question 12. Write A Small Piece Of Code Protecting A Shared Memory Variable With A Semaphore?

      Answer :

      int global_i;

      void increment_shared_memory 






    13. Question 13. What Are The Different Types Of Semaphores And Where They Are Used?

      Answer :

      Binary semaphore and counting semaphore. Binary semaphore is same as mutex. Binary semaphore tries to protect only one resource.
      Counting semaphore is used in case of multiple resource.

      For ex: we have 4 printers then the counting semaphore value will be init to 4. When it reaches 0, the task waiting on the semaphore is suspended.

    14. Question 14. What Are The Different Inter Process Communications?

      Answer :

      semaphore, mutex, message passing, shared memory, socket connections.

    15. Question 15. What Is Present In .bss?

      Answer :

      The bss section contains uninitialized data, and is allocated at run­time.  Until it is written to, it remains zeroed.

    16. Question 16. What Are The Different Segments Of A Program?

      Answer :

      Memory Segments: Code segment

      This phrase used to refer to a portion of memory or of an object file that contains executable computer instructions. It is generally read­only segment.

      Data segment: This is one of the sections of a program in an object file or in memory, which contains the global variables that are initialized by the programmer. It has a fixed size, since all of the data in this section is set by the programmer before the program is loaded. However, it is not read­only, since the values of the variables can be altered at runtime.

      .bss: This segment of memory is part of data segment that contains uninitialized data (static variables). These are initialized to 0 and later assigned values during runtime.

      Stack segment: This segment of memory is a special stack which stores information about the active subroutines of a task. It contains the return address to be branched to after a sub­routine has finished execution. It contains local variables of the sub­routines and the parameters that are passed to those sub­ routines.

      Heap segment: The segment of memory which is used for dynamic memory allocation is known as heap. It is the responsibility of the programmer to deallocate it after its use. Or alternatively it will be garbage collected by the OS.

    17. Question 17. What Is An Elf?

      Answer :

      Executable and Linking Format is a common standard file format for executables, object code, shared libraries, and core dumps.

    18. Question 18. What Is Priority Inversion?

      Answer :

      In a scenario where a low priority task holds a shared resource (example semaphore) that is required by a high priority task. This causes the execution of the high priority task to be blocked until the low priority task has released the resource. This scenario is averted by the OS by increasing the priority of the low­proi process until it completes the task and releases the resources.

Popular Interview Questions

All Interview Questions

Realtime Operating System Practice Test

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Windows 10 Tutorial