Chapter 2 of tlpi

  • Processor kernel mode and user allow operating system to isolate kernel from processes using this feature(x86 has 4 modes from what I can remember from my undergrad studies)
  • Shell- is a program that executescommands given by user. Login shell is the the process under which the shell runs when user logs in for the first time.
  • Unix I/O model- everything in unix is a file: regular files, device files, sockets etc. This allows the processes to use open(), close(), read() and write() syscalls on anything and the kernel translates these accordingly depending on whether the file represents data, devices etc
  • Process creation - fork is used by a process to create another process which is a copy of the calling process. exec replaces the program run by the process.
  • Init - first process created by the kernel that then calls other processes
  • setrlimit() - used to define process resource limits. Shell limits can be seen using the ulimit command.
  • mmap() - memory mapping used to create a mapping into a processes memory. The mapping can be of a region of a file or just initialised to zeros