Unix File System Department of Computer Science

Unix File System Department Of Computer Science-Free PDF

  • Date:15 Dec 2019
  • Views:97
  • Downloads:0
  • Pages:20
  • Size:2.10 MB

Share Pdf : Unix File System Department Of Computer Science

Download and Preview : Unix File System Department Of Computer Science


Report CopyRight/DMCA Form For : Unix File System Department Of Computer Science


Transcription:

SISTEMA DE FICHEROS UNIX J Santos, 1 Introduction to the UNIX File System logical vision. Silberschatz Galvin and Gagne 2005,Operating System Concepts 7th Edition. Feb 6 2005,Logical structure in each FS System V,BOOT SUPERBLOCK INODE LIST DATA AREA. Related commands du df,mount umount mkfs,SISTEMA DE FICHEROS UNIX J Santos. Typical directory structure in an UNIX platform, Silberschatz Galvin and Gagne 2005 Operating System Concepts 7th Edition Feb 6 2005.
SISTEMA DE FICHEROS UNIX J Santos, 2 Introduction to the UNIX File System physical vision of disk. partitions,Partitions of the disk in a PC,Master Boot Record structure. Information in each partition,SISTEMA DE FICHEROS UNIX J Santos. The widespread MBR partitioning scheme dating from the early 1980s imposed limitations. which affected the use of modern hardware Intel therefore developed a new partition table. format in the late 1990s GPT which most current OSs support. SISTEMA DE FICHEROS UNIX J Santos,2 1 System V vs BSD Fast File System. Logical structure in each FS System V,BOOT SUPERBLOCK INODE LIST DATA AREA.
Logical structure in each FS BSD,CILINDER CILINDER CILINDER. BOOT SUPERBLOCK,GROUP 0 GROUP1 GROUP N,SUPERBLOCK INODE LIST of DATA AREA of. CILINDER GROUP i HEAD,replicated CILINDER GROUP i CILINDER GROUP i. Organization of the disk in cylinder,groups M rquez 2004. BSD Blocks and fragments BSD uses blocks and a possible last fragment to assign. data space for a file in the data area, All the blocks of a file are of a large block size such as 8K except the last.
The last block is an appropriate multiple of a smaller fragment size i e 1024 to fill out the. Thus a file of size 18 000 bytes would have two 8K blocks and one 2K fragment which. would not be filled completely,SISTEMA DE FICHEROS UNIX J Santos. 3 Internal representation of files,3 1 Inodes,Inode in disk. The operating system associates an inode to each file. We have to differentiate between OWNER,o Inodes in disk in the Inode List GROUP. o In memory in the Inode Table with a,similar structure to the Buffer Cache. ACCESS PERMISSIONS,FILE DATES access data,modification inode.
modification,Number of LINKS,DISK ADDRESSES,3 2 Structure of the block layout in the disk. A file has associated,o An inode of the Inode List. o Blocks of the data area These blocks of the file are information contained in. the inode file with the following scheme,Disk addresses of the inode. Tanenbaum 2003, Using blocks of 1K and addresses of 4 bytes the maximum size is 10K 256K. Slower access to larger files,SISTEMA DE FICHEROS UNIX J Santos.
3 3 File types file permissions, Related command and system call with the file mode chmod. Related command and system call with the file owner chown. SISTEMA DE FICHEROS UNIX J Santos,4 Directories, A directory is a file whose content is interpreted as directory entries. Directory entry format,System V directory entry,Inode number. Name 14 bytes,BSD directory entry,Length of the Length of the file. Inode number Name 0 ended until a length multiple of. entry name 2 bytes,4 bytes 4 variable, Related system calls opendir readdir closedir defined in dirent h.
Example of the necessary steps in the search of the inode of the file usr ast correo. Tanenbaum 2003,SISTEMA DE FICHEROS UNIX J Santos, 5 Brief description of the kernel structures related with the file. Block diagram of the,system kernel,The buffering mechanism of. the Buffer Cache regulates,data flow between secondary. storage block devices and the,kernel decreasing the number. of accesses to the disk There,is a similar mechanism.
associated to virtual memory,with a Page Cache,SISTEMA DE FICHEROS UNIX J Santos. Scheme of the main kernel structures related with the file system. Silberschatz Galvin and Gagne 2005 Operating System Concepts 7th Edition Feb 6 2005. SISTEMA DE FICHEROS UNIX J Santos,6 System calls for the file system. int open char name int mode int permissions int read int df char buff int n. open mode df file descriptor open returns,mode 0 read buff address in the user space. mode 1 write where the data are transferred,mode 2 read write n number of bytes to be read. Or using the constatnts defined in the header fcntl h int write int df char buff int n. O RDONLY only read,O RDWR read write,O WRONLY only write.
O APPEND append,O CREAT create,Example of openings from two processes. Proc A Proc B, fd1 open etc passwd O RDONLY fd1 open etc passwd O RDONLY. fd2 open local O RDWR fd2 open private O RDONLY,fd3 open etc passwd O WRONLY. Data structures after the openings of Proc A, Data structures after the two processes opened the files. 12 Batch 1986 Bach M J The Design of the UNIX Operating System Prentice Hall 1986. SISTEMA DE FICHEROS UNIX J Santos,int newfd dup int df.
df file descriptor of an open file,newfd new file descriptor that. references the same file,dup2 fd newfd,fd1 open etc passwd O RDONLY. fd2 open local O RDWR,fd3 open etc passwd O WRONLY. It returns the first free,file descriptor number 6. in this case,Data structures after dup, Batch 1986 Bach M J The Design of the UNIX Operating System Prentice Hall 1986.
SISTEMA DE FICHEROS UNIX J Santos,7 SETUID executables. The kernel associates two user IDs to a UNIX process. 1 The real user ID user who runs the process, 2 The effective user ID used to check file access permissions to assign ownership of. newly created files and to check permission to send signals. The kernel allows a process to change its effective used ID when it execs a setuid program or. when it invokes the setuid system call explicitly, A SETUID program is an executable file that has the SETUID bit set in its permission model. field When a setuid program is executed the kernel sets the effective user ID to the. owner of the executable file,Example of application command passwd. Files in etc, rw r r root root passwd users defined in the system.
Currently in file shadow,rw r root shadow shadow encrypted passwords. rw r r root root group groups defined and their users. Permissions of the executable command,usr bin passwd root rws r x r x. It means that the SETUID bit is ON,Consequently,The effective user ID is set to the. owner of the executable file root,The passwd process can access the. 14 passwd file to change w permission,the encrypted password.
SISTEMA DE FICHEROS UNIX J Santos, In addition to the classic Data Encryption Standard DES there is an advanced symmetric key. encryption algorithm AES Advanced Encryption Standard The AES 128 AES 192 and AES 256 use. a 128 bit block size with key sizes of 128 192 and 256 bits respectively. Most linux systems use Hash Functions for authentication Common message digest functions include. MD5 which produces a 128 bit hash and SHA 1 which outputs a 160 bit hash. The Design of the UNIX Operating System Prentice Hall 1986 SISTEMA DE FICHEROS UNIX J Santos 14 7 SETUID executables The kernel associates two user IDs to a UNIX process 1 The real user ID user who runs the process 2 The effective user ID used to check file access permissions to assign ownership of newly created files and to check permission to send signals

Related Books