unix file system layout

5
Chang, Fall 1996 Operating System (II) Chapter 11 Supplement Slide 1 UNIX File System Layout boot block contains bootstrap code that is rea d into the machine to boot the operating syst em super block describes the state of a file syst em, how large it is, how many files it can sto re, where to find free space on the file syste m, etc inode list is a list of inodes (explained late r) data blocks store file data and administrative data data blocks inode list super block boot block

Upload: emma

Post on 17-Mar-2016

26 views

Category:

Documents


0 download

DESCRIPTION

UNIX File System Layout. boot block contains bootstrap code that is read into the machine to boot the operating system super block describes the state of a file system, how large it is, how many files it can store, where to find free space on the file system, etc - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: UNIX File System Layout

Yukon Chang, Fall 1996 Operating System (II) Chapter 11 Supplement Slide 1

UNIX File System Layout boot block contains bootstrap code that is read into the

machine to boot the operating system super block describes the state of a file system, how lar

ge it is, how many files it can store, where to find free space on the file system, etc

inode list is a list of inodes (explained later) data blocks store file data and administrative data

data blocksinode listsuperblock

bootblock

Page 2: UNIX File System Layout

Yukon Chang, Fall 1996 Operating System (II) Chapter 11 Supplement Slide 2

Inodes (Index Nodes) inodes exist in a statis form on disk, it consists of

• file owner (individual owner and group owner)• file type (regular, directory, character/block device, ...)• access permission (r-xr-x---)• access and last modify time (of file and inode)• number of links to the file• pointers to data blocks• file size

see Fig. 11.7 on the textbook

Page 3: UNIX File System Layout

Yukon Chang, Fall 1996 Operating System (II) Chapter 11 Supplement Slide 3

Directory Block notably missing from inode information is the file name file name is kept in a directory entry of directory block the first two entries in a directory have names . and ..

toinode

5 foo.c 3 bar mumble6

toinode

toinode

unusedspace

Page 4: UNIX File System Layout

Yukon Chang, Fall 1996 Operating System (II) Chapter 11 Supplement Slide 4

Hard Links an inode can be linked from many different directory e

ntries, i.e., it may have many names

toinode

5 foo.c 3 bar mumble6

inode2714 reference count = 2

Page 5: UNIX File System Layout

Yukon Chang, Fall 1996 Operating System (II) Chapter 11 Supplement Slide 5

Symbolic (Soft) Links a symbolic link is a special file that contains a

pathname.

directories

/usr/joe

/usr/sue

foo

bar

inodesfile

content

/usr/joe/foo

Hello, world