OPEN FILES o Several pieces of data are needed to manage open files: File pointer:pointer to last read/write location,per process that has the file open File-open count:counter of number of times a file is open -to allow removal of data from open-file table when last processes closes it Disk location of the file:cache of data access information Access rights:per-process access mode information
OPEN FILES Several pieces of data are needed to manage open files: File pointer: pointer to last read/write location, per process that has the file open File-open count: counter of number of times a file is open – to allow removal of data from open-file table when last processes closes it Disk location of the file: cache of data access information Access rights: per-process access mode information
OPEN FILE LOCKING o Provided by some operating systems and file systems o Mediates access to a file o Mandatory or advisory: Mandatory-access is denied depending on locks held and requested Advisory-processes can find status of locks and decide what to do
OPEN FILE LOCKING Provided by some operating systems and file systems Mediates access to a file Mandatory or advisory: Mandatory – access is denied depending on locks held and requested Advisory – processes can find status of locks and decide what to do
FILE TYPES-NAME,EXTENSION file type usual extension function executable exe,com,bin ready-to-run machine- or none language program object obj,o compiled,machine language,not linked source code c,cc,java,pas, source code in various asm,a languages batch bat,sh commands to the command interpreter text txt,doc textual data,documents word processor wp,tex,rtf, various word-processor doc formats library lib,a,so,dll libraries of routines for programmers print or view ps,pdf,jpg ASCll or binary file in a format for printing or viewing archive arc,zip,tar related files grouped into one file,sometimes com- pressed,for archiving or storage multimedia mpeg,mov,rm, binary file containing mp3,avi audio or A/V information
FILE TYPES – NAME, EXTENSION