Skip to content

Instantly share code, notes, and snippets.

@s4eidhp
Last active November 9, 2024 11:17
Show Gist options
  • Save s4eidhp/c3c90c8c34e47beb692f76c9c738a970 to your computer and use it in GitHub Desktop.
Save s4eidhp/c3c90c8c34e47beb692f76c9c738a970 to your computer and use it in GitHub Desktop.

Linux Programming Interface

CHAPTER 2

  • Kernel Tasks:

    • Process Schedulling
    • Memory Managment
    • Provision of a file system
    • Creation and termination of processes
    • Access to devices
    • Networking
    • Provision of a system call application programming interface (API)
  • Virtual memory management advantages:

    • Processes are isolated from one another and from the kernel
    • Only part of a process needs to be kept in memory
  • Virtual memory split into user space and kernel space which in user mode progams can use just user space but in kernel mode both parts are available

  • Certain operations can be performed only while the processor is operating in kernel mode.

  • The superuser bypasses all permission checks in the system.

  • The term file is commonly used to denote a file of any type, not just a regular file.

  • For file names, it is advisable to employ only letters and digits, and the (period), (underscore), and (hyphen) characters which are refered as as portable filename character set.

  • A process inherits its current working directory from its parent process.

  • A daemon is a special-purpose process which is is long-lived and runs in the background

  • IPC mechanisms:

    • signals
    • pipes and FIFOs
    • sockets
    • file locking
    • message queues
    • semaphores
    • shared memory
  • Signals are sent to a process by the kernel, by another process (with suitable permissions), or by the process itself.

  • Threads are is a set of processes that share the same virtual memory, as well as a range of other attributes except stack which is unique for each of them.

  • Threads can communicate with each other via the global variables that they share and IPC mechanisms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment