Monday, September 28, 2015

KERNEL - 1

KERNEL INTERVIEW QUESTIONS AND ANSWERS

PAGE - 1


1..What is kernel ?
The core of the Linux system is the kernel. The kernel controls all of the hardware and software on the computer system, allocating hardware when necessary, and executing software when required.

2..Explain the kernel versions?
Linux kernels come in two flavours: stable and development. Stable kernels are production level releases suitable for widespread deployment. New stable kernel versions are released typically only to provide bug fixes or new drivers

3..What is Process Scheduling in kernel?
The process scheduler decides which process runs, when, and for how long.The
process scheduler  divides the finite resource of processor time between the runnable processes on a system.The scheduler is the basis of a multitasking operating system such as Linux. By deciding which process runs next, the scheduler is responsible for best utilizing the system and giving users the impression that multiple processes are executing simultaneously.

4..What is system calls?
System calls (often called syscalls in Linux) are typically accessed via function calls defined in the C library.They can define zero, one, or more arguments (inputs) and might result in one or more side effects,3 for example writing to a file or copying some data into a provided pointer. System calls also provide a return value of type long that signifies success or error

5..What are Kernel Data Structures?
With large software project, the Linux kernel provides these generic data structures and primitives to encourage code reuse. Kernel developers should use these data structures whenever possible and not “roll your own” solutions. In the following sections, we cover the most useful of these generic data structures, which are the following:
Linked lists
Queues
Maps
Binary trees          


6..What is  kfifo?
Linux’s kfifo works like most other queue abstractions, providing two primary operations:enqueue (unfortunately named in) and dequeue (out).The kfifo object maintains two offsets into the queue: an in offset and an out offset.The in offset is the location in the queue to which the next enqueue will occur.The out offset is the location in the queue from which the next dequeue will occur

7..What is Work Queues?
Work queues are a different form of deferring work from what we have looked at so far. Work queues defer work into a kernel thread—this bottom half always runs in process context.Thus, code deferred to a work queue has all the usual benefits of process context

8..What is Kernel Notion of Time?
Certainly, the concept of time to a computer is a bit obscure. Indeed, the kernel must work with the system’s hardware to comprehend and manage time.The hardware provides a system timer that the kernel uses to gauge the passing of time.This system timer works off of an electronic time source, such as a digital clock or the frequency of the processor

9..What is Netfilter?
The Linux kernel’s network packet processing subsystem is  called Netfilter,

10..What is notification chains?
The kernel’s many subsystems are heavily interdependent, so an event detected or generated by one of them could be of interest to others. To fulfill the need for interaction, Linux uses so-called notification chains

No comments: