* general prep guidance for the exam ** start by completing the form: https://cscie28.dce.harvard.edu/~dce-lib215/final/ ** review the sample finals - gives a sense of exam structure ** approach to study *** review all of high-level notes from lecture - identify the system calls that were covered - identify important techniques for using the calls - useful to reread the chapter in the book about that lecture *** enumerate all of the system calls - brief description of its purpose - brief description of usage *** review the plans and code from all of the homework *** review gradesheets ... if there's something that stands out from the grades as needing review ** in the exam, showing that you understand the broad strokes of usage is more important than all of the specific details of usage - comment the code with a terse explanation - remember to error check! * using a console editor to write code for the exam ** this could be useful to get around the limitation of the web form ** also used for the oral exam ** if you're not familiar with vim or emacs (real coding editors), take a few minutes to learn nano * hard links vs symlinks ** file system structures that represent this file: an inode in a filesystem that references where some data is stored hard link: name-to-inode mapping stored in a directory because an inode number is unique within a filesystem, the inode must be in the same filesystem as the hardlink directory: specific type of file that stores hard link information symlink: specific type of file that stores a name-to-path mapping a symlink has an object of its own in the filesystem the symlink file: has an inode number and a hard link in a directory to that inode ** good explanation of inode use for files here https://www.geeksforgeeks.org/file-systems-in-operating-system/ * turning on and off flags ** termios struct ** options for various system calls * flags that can be set in termios raw mode: non-canonical -- char-by-char cooked mode: canonical -- line-by-line input modes: input control -- largely preprocessing chars from keyboard output modes: output control -- largely postprocessng chars to screen control modes: not used much today -- mostly related to modems and such local modes: changing basic device controls echo chars as typed? canonical vs non-canonical to set a mode flag (X is one of i o c l): c_Xflag |= MODE to get a mode flag (c_Xflag & MODE) == MODE to unset a mode flag c_Xflag &= ~MODE note that some modes have two bits, that's why get works as it does * details of how itimer / struct tv works recommend reviewing alarmlib.c also, bounce_select.c example from concurrency