šŸ›ļø

Advanced Unix Programming

  • Thereā€™s such a thing called ā€œprocess groupsā€. One of the processes in the group is the leader. Every process on the group has ā€œprocess-group-IDā€ as the id of the leader. You can send a signal to the whole group.
  • Microsoft had a Unix distribution before(and quite popular): Xenix
  • A process group can have a control terminal, which is the first terminal device opened by the group leader.
  • For directories, the meaning of Read permission is obvious, since directories are stored in ordinary files. Write permission on a directory means the ability to modify the directory (add or remove a link). Execute permission means the ability to use the directory in a path (sometimes called search permission).
  • In Unix, processes are allowed to call only one system call at one time. So, for database manager processes, one main process creates and manages child processes for IO ops. And this increases inter process communication a lot.
  • Differences between child and parent processes after fork:
    • File descriptors are copied to child process. The file pointer is shared. If the child changes it with lseek, then the parentā€™s pointer will be changed as well. However, if the child process closes the file descriptor, the parentā€™s copy will be undisturbed.
    • The child's accumulated execution times are reset to zero, because it is at the beginning of its life.
  • If child processes are still alive when exit is called, child processes are not disturbed, but their parent process id's become 1.
    Ā