LINUX Kernel - Base

  1. Explain monolithic kernel
    an operation system architecture where the entire operating system is working in kernel space and is alone in supervisor mode.
  2. Explain microkernel
    minimum amount of software which provides only basic IPC, virtual memory and scheduling. Protocol stacks, device driver and file systems are run in user mode
  3. Is Linux Monolithic kernel?
    No, microkernel
  4. Explain preemption
    temporarily interrupting a task without requiring its cooperation and with the intention of resuming the task at a later time
  5. Is Linux preemptive kernel?
    Yes as of Linux kernel 2.6 and 3.x
  6. Explain time slice or quantum
    The period of time for which a process is allowed to run in a preemptive multitasking system
  7. Explain preemptive multitask
    Using interruption to make running process interrupted and ask scheduler to decide which process is to run next
  8. Explain soft link
    a special type of file that contains a reference to another file or directory. Also called as sympolic link or symlink
  9. Explain hard link
    A directory entry that associates a name with a file on a file system. It's like an alias
  10. List up 5 main components of Linux Kernel
    • 1. Interrupt handler
    • 2. Scheduler
    • 3. Memory Manager
    • 4. Networking
    • 5. Inter-Process Communication (IPC)
  11. Explain difference between soft link and hard link
    Hard link is a link to another file or directory while softlink is a link to a file name. If a file is removed, hardlink will be automatically updated but softlink not
  12. To ensure that a file is not destroyed until all links to it are remove, what does linux do?
    each inode contains a link count that keeps track of the number of links within the file system that point to it. When a pathname is unlinked, the link count is decremented by one. Only when it reaches zero are the inode and its associated data actually removed from the file system
  13. Hard links can not span file systems. Why?
    Because an inode number is meaningless outside of the inode's own file system
  14. Symlink looks like regular files. Why?
    Because symlink has its own inode and data chunk which contains the complete pathname of the linked-to file.
  15. Symlink can point a file that resides on different file system. Why?
    Because the symlink has its own data chunk containing complete path name of the linked-to file
  16. Explain character device
    • devices through which the system transmits data one character at a time by.
    • For example keyboard, mouse, serial modem etc
  17. Explain block device
    • device that moves data in the form of blocks by.
    • e.g. hard disks, CD-ROMs, memory etc
  18. In Character devices, when there are no more chars left to read, what does the devices return?
  19. Explain named pipe
    An IPC mechanism that provides a communication channel over a file descriptor, accessed via a special file. Also called as a FIFO special file
  20. Explain regular pipe
    the output of one program into the input of another. Pipe is created in memory via a system call and does not exist on any filesystem
  21. Explain socket
    One of a special file which is one of IPC mechanisms.
  22. What is the smallest addressable unit on a block device?
  23. What size is common for sectors?
    512 bytes
  24. Can block device transfer or access a unit of data smaller than a sector?
  25. What is the smallest logically addressable unit on a file system?
  26. What size is usually set for a block?
    size of sector ^ 2
  27. Explain page size
    the smallest unit addressable by the memory management unit, a hardware component
  28. Blocks must be smaller than the page size. Yes or no?
  29. What are common block sizes?
    512 bytes, 1KB and 4KB
  30. Explain per-process namespaces
    Per-process namespaces allow each process to have a different mount point sets. By default each process inherits the namespace of its parent, but a process may elect to create its own namespace with its own set of mount points and a unique root directory
Card Set
LINUX Kernel - Base
LINUX Kernel .. intro