The Wisdom of Practice
Pages
Home
C Programming
Kernel/OS Programming
Attention/UsefulHome
Problem Solving
Blog Tips
Ubuntu/Linux
Presentations
Shell Scripts
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.
When does kernel starts loading? (
Clue
)
When power on the system
Before Bootloader starts (booting process)
After Booting process
When init process start
What is the process id defined for init process (
Clue
)
0
1
Not defined
Defined but vary from system to system
Where does executable instructions of any program stored? (
Clue
)
Text segment
Stack memory segment
Heap memory segment
Block Started by Symbol (BSS) segment
Which one of the followings is not responsibility of the Kernel (
Clue
)
Process management
Loading the operating system into memory
File management
Device Input/Output control
Which one of the followings is not a device driver type (
Clue
)
Character device driver
Integer device driver
Block device driver
Network device driver
What is a deferrable function in kernel? (
Clue
)
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
Which one of the followings is not true about Mutex and Semaphore? (
Clue
)
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
Which of the followings memory allocation technique uses Page Table setup for accessing the allocated memory locations? (
Clue
)
Kzalloc()
Kcalloc()
vmalloc()
Kmalloc()
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()
Only B
Only C
A and B and D
Only A and B
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
)
Synchronous mechanism
Asynchronous mechanism
Mutual exclusion
Work queues
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.
A and B
Only D
A, B, C and D
A, B and D
Identify the child process execution code (
Clue
)
pid_t pid = fork();
if (pid == 0)
{ ___A___
} else {
___B___
}
A
B
A and B
Syntax is wrong
Which of the followings is not true about Busy Waiting? (
Clue
)
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.
What is a Memory leak? (
Clue
)
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
Identify the macro, which is used to find the starting address of the structure by using its own member variables in kernel (
Clue
)
container_of()
base_str_addr()
start_str_addr()
None of the above, we don’t have such macro
What is the use of __init macro? (
Clue
)
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
Identify the command to load a module into kernel (
Clue
)
insmod module.ko
insmod module
loadmod module.ko
loadmod module
Thursday, 18 September 2014
Linux GIT commands
from
Raj Kumar Rampelli
Sunday, 14 September 2014
[Kernel] Introduction to Kernel and Device Drivers-Part-I
Introduction to Kernel and Device Drivers
from
Raj Kumar Rampelli
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
You might also like