Tuesday 30 September 2014

Open Quiz on basic OS Kernel concepts


Open Quiz on basic OS Kernel concepts

The quiz contains total 17 questions and only one option is correct and clue for the answer is also given.

  1. When does kernel starts loading? (Clue)

  2. When power on the system
    Before Bootloader starts (booting process)
    After Booting process
    When init process start

  3. What is the process id defined for init process (Clue)

  4. 0
    1
    Not defined
    Defined but vary from system to system

  5. Where does executable instructions of any program stored? (Clue)

  6. Text segment
    Stack memory segment
    Heap memory segment
    Block Started by Symbol (BSS) segment

  7. Which one of the followings is not responsibility of the Kernel (Clue)

  8. Process management
    Loading the operating system into memory
    File management
    Device Input/Output control

  9. Which one of the followings is not a device driver type (Clue)

  10. Character device driver
    Integer device driver
    Block device driver
    Network device driver

  11. What is a deferrable function in kernel? (Clue)

  12. Mechanism for supporting delayed execution of functions, used in interrupt handlers
    Used in kernel context to delay the execution of piece of code
    Used to find the behavior of a given function
    It is a function which signals the other function after receiving an interrupt

  13. Which one of the followings is not true about Mutex and Semaphore? (Clue)

  14. Mutex and Semaphore are kernel resources to provide synchronize services
    Mutex and Semaphore provides mutual exclusion property
    Mutex used within in a process and Semaphore can be used across processes
    Mutex and Semaphore both runs in kernel space

  15. Which of the followings memory allocation technique uses Page Table setup for accessing the allocated memory locations? (Clue)

  16. Kzalloc()
    Kcalloc()
    vmalloc()
    Kmalloc()

  17. Select the correct APIs which are used to find the time taken for a function of piece of code in kernel (Clue)
    A) ktime_get()
    B) do_gettimeofday()
    C) get_time()
    D) getnstimeofday()

  18. Only B
    Only C
    A and B and D
    Only A and B

  19. A mechanism that will suspend/block the execution of parent (caller) process (i.e. parent can’t continue its operation) until child terminates and instructs the process manager to destroy the child process and it is called as ____? (Clue)

  20. Synchronous mechanism
    Asynchronous mechanism
    Mutual exclusion
    Work queues

  21. fork() system call is used to create a new process and it returns integer value. Which of the followings is correct? (Clue)
    A) Returns 0 in the child process
    B) Returns process ID of child process in the parent process
    C) Child and Parent process share same address space after fork() call
    D) Copy on write approach is used.

  22. A and B
    Only D
    A, B, C and D
    A, B and D

  23. Identify the child process execution code (Clue)
    pid_t pid = fork();
    if (pid == 0)
    { ___A___
    } else {
    ___B___
    }

  24. A
    B
    A and B
    Syntax is wrong

  25. Which of the followings is not true about Busy Waiting? (Clue)

  26. A process/thread run in a loop by constantly checking the event occurred condition
    There is no overhead of context switching in Busy Waiting
    udelay(), mdelay() and ndelay() are examples of Busy waiting techniques
    A process/thread will be put into wait queue so that CPU can start the execution of the other process.

  27. What is a Memory leak? (Clue)

  28. Memory blocks which are allocated dynamically in heap, but not deallocated by the program
    Free memory block in the memory region
    A memory block which is part of the stack memory
    A memory block which is part of text segment

  29. Identify the macro, which is used to find the starting address of the structure by using its own member variables in kernel (Clue)

  30. container_of()
    base_str_addr()
    start_str_addr()
    None of the above, we don’t have such macro

  31. What is the use of __init macro? (Clue)

  32. Used for module initialization purpose and memory allotted to this function will be freed once this function tasks gets over
    Used for module initialization purpose but memory is not freed
    Used for module initialization purpose and the function will be in memory until system shutdown
    None of the above

  33. Identify the command to load a module into kernel (Clue)

  34. insmod module.ko
    insmod module
    loadmod module.ko
    loadmod module

You might also like

Related Posts Plugin for WordPress, Blogger...