System Programming - dejanu/linux GitHub Wiki

  • What is an inode? What is inode 0 in UNIX? INODE is a data structure that holds metadata (owner, permissions, file type etc.) of a file but not the actual data or the file name. ls -i filename to check the inode of a file. inode 0 is reserved for / folder

  • What is the difference between PID and PPID? PID = Process ID and PPID = Parent PID

  • How do you terminate a process running in the background? By sending SIGINT to the process. If the process is in the foreground a CTRL+Z works, if the process is in background kill -2 PID is needed.

  • Explain the difference between signals and exit codes. Exit code = a way to communicate with the parent process, i.e. send the status from child to parent. echo ?$ Signals = an inter-process communication method

  • What is the difference between user and group? UserGroupOthers A User identifies the account that owns the files and processes A Group is a mechanism for sharing permission for a file

  • What is a swap file swp? When using PAGED memory, the memory is divided in FRAMES. A swap file is an extension of the physical memory (RAM), it allows the system to offload inactive pages from RAM to disk