Presentation is loading. Please wait.

Presentation is loading. Please wait.

MSSYS - 67862 The Unix File System S5FS (circa 1980)

Similar presentations


Presentation on theme: "MSSYS - 67862 The Unix File System S5FS (circa 1980)"— Presentation transcript:

1 MSSYS - 67862 The Unix File System S5FS (circa 1980)

2 System V file system The file system resides on a single logical disk or partition A partition can be viewed as a linear array of blocks –block represents the granularity of space allocation for files –a disk block is 512 bytes * some power of 2 –physical block number identifies a block on a given disk partition –physical block number can be translated into physical location on a partition

3 Disk partition Boot area –Code required to bootstrap the operating system Superblock –Attributes and metadata of the file system itself inode list –a linear array of inodes data blocks –data blocks for files and directories, and indirect blocks BS inode listdata blocks

4 Superblock It contains –Size in blocks of the file system –Size in blocks of the inode list –Number of free blocks and inodes –Free block list(Partial) –Free inode list(Partial) The kernel reads the superblock and stores it in memory when mounting the file system

5 Inode Each file has an inode associated with it Inode contains metadata for file on-disk inode refers to inode stored in disk within the inode list

6 On-disk inode The size of on-disk inode is 64 bytes ::: Array of block addresses39di_addr Size in bytes4di_size Owner GID2di_gid Owner UID2di_uid File type, permissions2di_mode DescriptionSizeField

7 On-disk inode Unix files are not contiguous on disk File system need to maintain a map of the disk location of every block of the file 0 1 2 3 4 5 7 6 8 9 11 12 indirect Double indirect triple indirect 10

8 Structure of the File System File system is organised as a heirarchy of directories It starts from a single directory called root(represented by a /). /(root) | -------------------------------------------------------------------- | || || | /bin /dev/etc /tmp/usr /kernelfile

9 Directories Directory is file containing list of files and subdirectories It has fixed size records of 16 bytes each which contains a filename(14 bytes) an inode number (2 bytes) which acts as a pointer to where the system can find info about the file.

10 Results Simple but slow: 20KB/sec throughput (2% of disk maximum throughput) Each Disk divided into one or more partitions Each partition may contain one file system File system never spans multiple partitions. File name limit is 14 characters Maximum number of inodes: 65535 150-megabyte traditional UNIX file system consists of 4 megabytes of inodes and 146 megabytes of data.

11 Problems – Superblock can be lost or corrupted – The size of the blocks is too small - just 512 bytes file index becomes too large transfer rate is low – Consecutive blocks (of a file) not close together (suboptimal data block allocation) Poor access timings for sequential searches! – I-nodes far from data blocks (segregation of I-nodes/data blocks) Long seeks required to access a file – I-nodes of a directory not necessarily clustered Poor performance for the “ls” command.

12 First Effort to Improve Make the size of the data block bigger.. –Use 1024 bytes (instead of 512) –Speedup was somewhat > 2. Each disk access accesses twice the amount of data Most files were accessed without the help of “indirect” blocks (now direct blocks contained twice as much data as in the 512 page size case) Throughout doubled but still only 4% of the disk throughput used! Another (serious) problem affecting performance was the management of the list of Free Blocks. –Initially, was ordered (for optimal access) –Quickly it became scrambled.. –The latter forced long seeks for reading blocks –175 kbytes/sec to 30 kbytes/sec. Only solution: dump, rebuild, and restore file system

13 File Distributions – UFS93 Read the web page Heavily skewed toward small files Long tail Average file size: 22k 89% of files take up 11% of disk 11% of files take up 89% of disk How does this impact the file system?

14 Exercise Select optimal parameters for a S5FS file system Question 1: –How will you measure “optimal”. Question 2: –What values are optimal for the parameters?

15 Exercise Parameters Inode size (bytes) –Assume 48 bytes overhead –How big are your block addresses? 32bits? –Implied are the number of pointers per inode Block size –Multiple of 512 bytes –X ≤ 64Kbytes # of inodes –Pre-allocation uses disk space

16 Submission Due Nov 21 st at 11:59pm No delays since we will cover possible solutions in class on Nov 22 nd. Submit a written digital document (and associated materials) via web site.

17 Submission Describe your metric and why it is appropriate. Describe your design, and your chosen parameters. –Explain why your choices are good –Explain how they are impacted by the file size distribution (UFS93)


Download ppt "MSSYS - 67862 The Unix File System S5FS (circa 1980)"

Similar presentations


Ads by Google