Commit 444d7c4
doc/10.md
@@ -1,4 +1,3 @@
-
## Disk Scheduling
One of the responsibilities of the operating system is to use the hardware efficiently.
doc/12.md
@@ -0,0 +1,48 @@
+# File-System Implementation
+
+## Efficiency and Performance
+
+### Efficiency
+
+* efficient use of disk space depends heavily on disk-allocation and directory algorithms.
+* UNIX inodes are preallocated on a volume.
+* empty disk has a percentage of its space lost to inodes.
+
+## Log structured file systems
+
+* log based transaction oriented (or journaling) file systems for consistency checking.
+* a circular buffer writes to the end of its space and then continues at the beginning, overwriting older values as it goes.
+
+# Summary
+
+The file system resides permanently on secondary storage, which is designed to hold a large amount of data permanently.
+The most common secondary-storage medium is the disk.
+
+Physical disks may be segmented into partitions to control media use and to allow multiple, possibly varying, file systems on a single spindle.
+These file systems are mounted onto a logical file system architecture to make them available for use.
+
+File systems are often implemented in a layered or moduluar structure.
+The lower levels deal with the physical properties of storage devices.
+Upper levels deal with symbolic file names and logical properties of files.
+Intermediate levels map the logical file concepts into physical device properties.
+
+Files can be allocated space on disk in three ways:
+
+* contiguous
+ * suffers from external fragmentation
+* linked
+ * direct access is bad
+* indexed allocation
+ * overhead for the index block.
+
+free space allocation methods influence efficiency of disk-space use, perf of file system and reliability of secondary storage.
+
+A hash table is commonly used because it is fast and efficient.
+However, damage to the table can result in inconsistency between directory info and content.
+
+Consistency checker can be used to repair damage.
+
+NFS uses client-server methodology to allow users to access files and directories from remote machines.
+
+Log structures and caching help improve performance, while log structures and RAID improve reliability.
+The WAFL file system is an example of optimization of performance to match a specified I/O load.